You can get this error when you want to inset data into a table that has the Foreing Key. It means that there is …
Read More »MSSQL
Setting the Database AUTO_CLOSE Option to OFF to Improve Performance
Auto_Close is an option of the database. If set to ON, the database is opened and closed each connection. The procedure cache is cleared …
Read More »@@VERSION, SERVERPROPERTY and @@MAX_CONNECTIONS Functions in SQL Server(TSQL)
The maximum number of connections that an instance can accept varies by version. With the @@MAX_CONNECTIONS function, we can query the number of default maximum …
Read More »Mail not queued. Database Mail is stopped. Use sysmail_start_sp to start Database Mail
You can receive this error even if you configure Database Mail and activate it via sp_configure. You can reach details in my article “How …
Read More »SET LOCK_TIMEOUT and @@LOCK_TIMEOUT Function in SQL Server(TSQL)
With SET LOCK_TIMEOUT, we can set the maximum amount of time a session will wait to access a blocked resource in milliseconds. If a …
Read More »How To Export SQL Server Table to CSV File
We usually export a dataset in SQL Server to Excel instead of CSV. But in some cases we may need to export to csv …
Read More »SET LANGUAGE and @@LANGUAGE Function in SQL Server(TSQL)
We can set a session’s language With SET LANGUAGE Command. This command affects the system datetime format and system messages. If you want to …
Read More »The Extended Events session named “x” could not be found. Make sure the session exist and is started.
One day I opened SSMS (SQL Server Management Studio) and wanted to check the Extended Events Session that captured Timeouts. To find out how …
Read More »SUM Function in SQL Server(TSQL)
We use SUM Function to calculate the sum of values in a column. SUM is a aggregated function and generally we use it with …
Read More »“Database ‘x’ cannot be opened due to inaccessible files or insufficient memory or disk space” and “Initializing/Recovery Pending”
There may be several reasons for this error. A friend of mine said that when he received this error, the database files were deleted. …
Read More »