SQL Server Solutions

How to Copy the Schemas & Statistics of Multiple Databases without Data via TSQL

With the service pack 2 of SQL Server 2014, you can create a copy of a user database without the actual data. i.e., you would be creating just the schema and statistics of your source database. In this article, we will learn how to quickly create clone of multiple user databases A copy needed for investigation: To find the root cause of a performance problem, you might need a copy of your existing database. In such cases, you can use the following query to create copies of multiple SQL Server...

Read more »

How to Fix Inactive Connections to Your Primary Replica in SQL Server

You might have added databases to your always-on group. When you use multi-subnet cluster and set up SQL Server Always On, you might receive an error message stating that the connection to your primary is inactive. In this article, we will learn how to fix that and synchronize databases participating in Always On. Using Wizard or script SQL Server always-on availability group can be created using the new availability group wizard or a TSQL script. One common reason that the action might fail...

Read more »

2 Workarounds to Update a Read-only Database in SQL Server

If a database is read-only, you can easily identify the status from the sys.databases or from the SSMS. A well-known fact is that you cannot update data in a read-only database. In this article, we will learn how to troubleshoot and fix this. Two options We can either use SQL Server Management Studio i.e., SSMS or T-SQL script to convert a read-only database into a read-write database. To understand these options better, let us Create a database Create tables within it Add records...

Read more »