SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Archives: March 2013

SQL Server – Executing Multiple Script Files Using SQLCMD

There are different options available when you want to execute a .sql script file on a server. You can open the script file in SQL Server Management Studio and execute it, or you can use SQLCMD to execute a script from command line. However, when you have large number of… Read more

2 comments, 8,728 reads

Posted in SQL and Me on 25 March 2013

SQL Server – Changing Default Database Location for Server

When you create a new database in SQL Server without explicitly specifying database file locations, SQL Server created files in default location. This default location is configured when installing SQL Server.

If you need to change this default location once SQL Server is installed, you can change this in server… Read more

2 comments, 2,086 reads

Posted in SQL and Me on 18 March 2013

SQL Server – Start/Stop SQL Server from command line

You can start/stop SQL Server services using Services Console or SQL Server Configuration Manager. You can also perform these operation using command line in Windows. For this you must run command prompt with Administrative privileges.

Method 1: Start/Stop SQL Server using NET command:

You can start/stop SQL Server from command… Read more

1 comments, 2,052 reads

Posted in SQL and Me on 11 March 2013

SQL Server – How to Rename Table/Column in SQL Server

To rename an object in SQL Server you can use sp_rename system stored procedure or you can do this via Object Explorer in SQL Server Management Studio.

Method 1: To rename an object using SQL Server Management Studio:

Step 1. Right Click on the object in Object Explorer and select… Read more

1 comments, 1,926 reads

Posted in SQL and Me on 4 March 2013