Archives: June 2013
When an account is disable it cannot be used to login to SQL Server. You will receive below error when logging-in to SQL Server using a disabled Login account:
You can enable a disabled SQL Server Login using SQL Server Management Studio or via T-SQL code.
To enable a… Read more
Often we may need to update a column in a table based of another column in another table.
In SQL Server you can do this using UPDATE statement by joining tables together.
To understand this better let’s take a look at below contrived example.
SELECT CustomerID Read more
To get database size information we can use sys.master_files catalog view. This view contains a row per file of a database for all databases.
The columns of interest for retrieving database size information are:
|database_id||ID of the database to which the file belongs to|
To move a database from one location to other you fist need to detach the database from server. In this article we will learn different ways to detach a database from server.
There are two different methods available to detach a database from a server.
Method 1. Detach a Database… Read more