Home » SQL Server Administration

SQL Server Administration

sql server DBA 999

SQL Server Error : 1222, Severity: 16. Lock request time out period exceeded.

SQL Server Error : 1222 Details

SQL Server Error: 1222 Severity: 16 Event Logged or not: No Description: Lock request time out period exceeded. Severity 16 Description: Indicates general errors that can be corrected by the user.

 

What is MS SQL server error 1222?

The error occurs as a result of a longer query running wait time than lock timeout settings. The lock timeout indicates the time spent waiting for a backend resource to be available.

Reading sql server error log location from SQL Query

Identifying SQL Server Error Log File used by SQL Server Database Engine can be done by reading SQL Server Error Logs. DBA can execute the XP_READERRORLOG extended stored procedure … Read the rest

sql server DBA 999

SQL Server- Unable to connect to SQL Server Error 26

Error Description:

SQL server error 26- Unable to connect to SQL Express Error: 26-Error Locating Server/Instance Specified

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 – Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)

SQL Server- Unable to connect to SQL Server Error 26

Error Details: this sql server error 26 error locating server instance message is often encountered when connection to a SQL Server is tried and don’t know where to start to solve the problem.

We get this sql server error 26 error message only … Read the rest

sql server DBA 999

SQL Server Error : 21899 Severity: 0. The query at the redirected pu

SQL Server Error : 21899 Details

SQL Server Error: 21899 Severity: 0 Event Logged or not: No Description: The query at the redirected publisher ‘%s’ to determine whether there were sysserver entries for the subscribers of the original publisher ‘%s’ failed with error ‘%d’, error message ‘%s’. Severity 0 Description: Informational messages that return status information or report errors that are not severe. The Database Engine does not raise system errors with severities of 0 through 9.

Reading sql server error log location from SQL Query

Identifying SQL Server Error Log File used by SQL Server Database Engine can be done by reading SQL Server Error Logs. DBA can execute the XP_READERRORLOG extended stored procedure to read the SQL Server … Read the rest

sql server DBA 999

SQL Server Error : 135, Severity: 15. Cannot use a BREAK statement outside the

SQL Server Error : 135 Details

SQL Server Error: 135 Severity: 15 Event Logged or not: No Description: Cannot use a BREAK statement outside the scope of a WHILE statement. Severity 15 Description: Indicates syntax errors in the Transact-SQL command.

Reading sql server error log location from SQL Query

Identifying SQL Server Error Log File used by SQL Server Database Engine can be done by reading SQL Server Error Logs. DBA can execute the XP_READERRORLOG extended stored procedure to read the SQL Server Error Log and search for its location used by the instance of SQL Server.

USE master
Go
xp_readerrorlog 0, 1, N'Logging SQL Server messages in file', NULL, NULL, N'asc'
Go

The parameters for XP_READERRRORLOG are:
1. Value … Read the rest

sql server DBA 999

SQL Server Error : 136, Severity: 15. Cannot use a CONTINUE statement outside

SQL Server Error : 136 Details

SQL Server Error: 136 Severity: 15 Event Logged or not: No Description: Cannot use a CONTINUE statement outside the scope of a WHILE statement. Severity 15 Description: Indicates syntax errors in the Transact-SQL command.

Reading sql server error log location from SQL Query

Identifying SQL Server Error Log File used by SQL Server Database Engine can be done by reading SQL Server Error Logs. DBA can execute the XP_READERRORLOG extended stored procedure to read the SQL Server Error Log and search for its location used by the instance of SQL Server.

USE master
Go
xp_readerrorlog 0, 1, N'Logging SQL Server messages in file', NULL, NULL, N'asc'
Go

The parameters for XP_READERRRORLOG are:
1. Value … Read the rest

sql server DBA 999

SQL Server Error : 138, Severity: 15. Correlation clause in a subquery not per

SQL Server Error : 138 Details

SQL Server Error: 138 Severity: 15 Event Logged or not: No Description: Correlation clause in a subquery not permitted. Severity 15 Description: Indicates syntax errors in the Transact-SQL command.

Reading sql server error log location from SQL Query

Identifying SQL Server Error Log File used by SQL Server Database Engine can be done by reading SQL Server Error Logs. DBA can execute the XP_READERRORLOG extended stored procedure to read the SQL Server Error Log and search for its location used by the instance of SQL Server.

USE master
Go
xp_readerrorlog 0, 1, N'Logging SQL Server messages in file', NULL, NULL, N'asc'
Go

The parameters for XP_READERRRORLOG are:
1. Value of error log file we … Read the rest

sql server DBA 999

SQL Server Error : 139, Severity: 15. Cannot assign a default value to a local

SQL Server Error : 139 Details

SQL Server Error: 139 Severity: 15 Event Logged or not: No Description: Cannot assign a default value to a local variable. Severity 15 Description: Indicates syntax errors in the Transact-SQL command.

Reading sql server error log location from SQL Query

Identifying SQL Server Error Log File used by SQL Server Database Engine can be done by reading SQL Server Error Logs. DBA can execute the XP_READERRORLOG extended stored procedure to read the SQL Server Error Log and search for its location used by the instance of SQL Server.

USE master
Go
xp_readerrorlog 0, 1, N'Logging SQL Server messages in file', NULL, NULL, N'asc'
Go

The parameters for XP_READERRRORLOG are:
1. Value of error log … Read the rest

sql server DBA 999

How to Resolve SQL Server Error 5172 – Fix SQL Server Header Error 5172

How to Resolve SQL Server Error 5172 – Fix SQL Server Header Error 5172

SQL Server stores its physical data in the primary database file, which contains the data by pages which store data. The header information of a .mdf file is stored by the first page, called a header page. This page contains the important information of this database file like file size, signature etc…. When a user attempts to attach the MDF / LDF database file stored on their system, a message box appears “The header for the “databasename.mdf” is not a valid database file header. The FILE SIZE property is incorrect. (SQL Server error 5172). It occurs when the header information of a .mdf file becomes corrupted.

Read the rest
sql server DBA 999

SQL Server Database mirroring modes and patner timeout

The Two modes of Database Mirroring in SQL Server for HA/DR Solutions are

  1. Synchronous mirroring( High Availability / HA )
  2. Asynchronous mirroring( Disaster Recovery / DR )

Synchronous mirroring :

In all SQL Server databases, data changes are recorded in the transaction log before any changes to actual data pages are made. The transaction log records are placed first in a database’s log buffer in memory, and then flushed to disk (or ‘hardened’) as quickly as possible. In database mirroring, as the principal server writes the principal database’s log buffer to disk, it simultaneously sends that block of log records to the mirror instance.The mirror receives the log records in mirror database’s log buffer and then hardens them to disk … Read the rest

sql server DBA 999

How to check Deadlocks in SQL Server

What is a SQL Server deadlock?What is a SQL Server deadlock?

A deadlock in SQL Server occurs when 2 processes/sessions are competing for exclusive access to data in the tables but is unable to obtain exclusive access to it because the other process/session is preventing it. This results in a situation where neither process can proceed and gets struck. The only way out of this deadlock when happens is that for one of the processes to be terminated. SQL Server automatically detects when deadlocks have occurred and takes action by killing one of the processes known as the victim.
Deadlocks are not confined to table locks now but from SQL Server 2012 onwards it can happen with memory, Multiple Active … Read the rest