What command do we use to rename a db?

Answer Posted / babuli

To rename a SQL database follow the these seps:

1. Alter database to single user mode. So that all the
active connection will be terminated. (Database properties
-> options > single usermode)
2. Then rename the database using sp_renamedb oldname, newname

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain primary key?

553


How should i optimize the time for execution of stored procedure having single input and many output from the different tables?

1478


Why do we use stored procedures in sql server?

505


Describe the functionalities that views support.

672


What is the use of sign function?

567






How many types of functions are there in sql server?

469


How can you check the level of fragmentation on a table?

612


Write a SQL command to insert and update only a particular field?

642


what is a schema in sql server 2005? : Sql server database administration

523


What is 2nf normalization?

548


Write a sql query to sort on different column name according to the parameters passed in the function?

540


Define full outer join?

527


What are the different acid properties?

635


What are the differences between INNER JOIN, LEFT JOIN and RIGHT JOIN in SQL Server?

622


How can you check the version of sql server?

567