From time to time we have to check the integrity of our bases for any corruptions. In this article we will see the easiest and most efficient way to check for corruption in all instance databases. This… read more
How to bulk detach / attach databases in SQL Server
Sometimes we will need to move databases to SQL Server. This process can also be done with backup / restore or by changing the status of the base to offline, but in the article we will deal with the detach and attach processes. read more
How we collect deadlocked queries via Extended Event and how we read its data
In an earlier article we saw how we create an Extended Event to see queries with a long duration. In this article we will build Extended Event that records deadlocks. All we need to do is create it with a T-SQL command. After… read more
How can we from SQL Server read Excel / CSV / TXT and insert the records into a table
SQL Server allows us to read and import files at will without the use of SSIS (Integration Services) and Wizard packages. This process is done using the OPENROWSET function and the BULK INSERT. We can… read more
How can we see what CPU Usage we had per minute in SQL Server
SQL Server during its installation creates a lightweight Extended Event with a size of up to 5mb in which it records performance information. This Extended Event is called system_health and in this article we will see how we can with… read more
How can we find when a database was last used in SQL Server
In the article we will see an easy and quick way to see which databases are in use and which users are currently connected to them. To see when a database was last accessed in... read more
How can we run multiple SQL Scripts in SQL Server from within Windows with batch script
In this article we will see an easy way to be able to run SQL Scripts en masse in SQL Server with batch script and keep the results for each separately in CSV. The example Suppose we have… read more
How to replicate tables from SQL Server to Oracle Database using GoldenGate
In a previous article we saw how we can replicate tables from Oracle Database to SQL Server using GoldenGate. In this article we will see how we can do the reverse from SQL Server to… read more
How do we enable auditing in SQL Server?
In this article we will see the steps and options we have to enable the database auditing specification in SQL Server. Through the database auditing specification we can record who accesses and how... read more