Your queries are running slow and you want to determine which queries are running slowly. You can perform this operation by using SQL Server …
Read More »MSSQL
CAST and CONVERT Functions in SQL Server(TSQL)
The CAST and CONVERT functions are conversion functions. We use these functions to convert a data type to another data type. Of course, every …
Read More »Cannot drop the database because it is being used for replication
You may need to uninstall a replication that you previously installed and drop the database. You may receive an error if you want to …
Read More »How To Get the Last Generated Identity Value For a Table or View(IDENT_CURRENT Function)
The use of “Auto Increment Identitiy Column” in tables is common. In some cases, we may want to find the last Identitiy value generated. …
Read More »Cannot drop database because it is currently in use
If you want to delete the database, you will get this error if there is an open session on the database. First, set the …
Read More »DATALENGTH Function in SQL Server(TSQL)
With the DATALENGTH function, we can calculate the size of the data in a column in bytes. Usually, its useful for calculating the size of …
Read More »No global profile is configured. Specify a profile name in the @profile_name parameter
With Database Mail, you can get this error when you want to send mail using msdb.dbo.sp_send_dbmail. This is because none of the Database Mail …
Read More »@@SPID Function in SQL Server(TSQL)
With the @@ SPID Function, we can find the session id of the current session. Usually we use when we want to exclude the …
Read More »How To Find Total Size of All Databases in All Instance
Finding the total size of all your databases may be a bit difficult when your number of instances and your database count increases. Sometimes …
Read More »SQL Server Logon Trigger
Hello there, User management is very important in our database systems. We prefer DBAs to create or use more windows authentication instead of sql authentication. …
Read More »