When the first row of long running queries is returned after a long initial wait, check the fragmentation of the indexes. On MSSQL execute this query in the database
Tag Archives: MSSQL
Find blocking queries in MSSQL
To find queries that block others in Microsoft SQL databases, execute This returns the list of active sessions and indicates what session blocked it. To get the query of a session, execute
MSSQL database migration to another database server
When a database is migrated to another server by copying the database file or restoring it from a backup file, the original database user account references are also carried with it. Those accounts contain the account IDs specific to the original database server. To provide access to the restored database on the new database server …
Continue reading “MSSQL database migration to another database server”
Using MSSQL
Assign a database security role to a Windows security group List the members of a database server group
Microsoft SQL Server clients
To connect to an MSSQL database on Macintosh Install the Azure Data Studio Download it from Download and install Azure Data Studio on Windows Install SSMS (SQL Server Management Studio Download it from Download SQL Server Management Studio (SSMS) Install the Azure Data Studio Download it from Download and install Azure Data Studio
How to restore a Microsoft SQL database from backup with the Microsoft SQL Server Management Studio (MSSMS) user interface
There are multiple reasons to restore a database from backup. One of them can be disaster recovery, the other is to bring the production database to the developer machine. In both cases, the computer already has the old version of the database. In the new version of Microsoft SQL Server Management Studio (MSSMS) we cannot find …
How to migrate the Visual Studio 2013 user database to SQL Server 2008
When you create a new web application in Microsoft Visual Studio 2013 the user database it creates is version 706. SQL Server 2008 can only open databases up to version 663 or earlier. To migrate the new Visual Studio 2013 databases to SQL Server 2008 script the database tables and create them again in the …
Continue reading “How to migrate the Visual Studio 2013 user database to SQL Server 2008”
Remote procedure call failed (0x800706be)
When you get the Remote procedure call failed (0x800706be) error message in the SQL Server Configuration Manager 2008 R2 install the SQL Server 2008 R2 Service Pack 1 from http://www.microsoft.com/en-us/download/details.aspx?id=26727
Padding numbers with leading zeros in Microsoft SQL Server
If you want to pad numeric values with leading zeros use the following line. Change the number “3” to the length of the string you need. SELECT REPLICATE(‘0’, 3 – LEN(numeric_field)) + CAST(numeric_field as varchar)
Insert multiple rows into a Microsoft SQL Server database
There is a great way to insert multiple rows into a Microsoft SQL Server database in one statement. This notation has multiple advantages: simplicity and the grouping of multiple instructions into one transaction. INSERT MyTable (name, description)VALUES(‘John’, ‘Manager’),(‘Bill’, ‘Truck driver’) Script from Ernie Cruz