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 different types of backups avaialabe in sql server? : Sql server database administration

599


What is the use of =,==,=== operators?

590


Is sql server is free?

552


What is apply operator in sql?

568


How to loop through returning rows?

581






How to rebuild master databse?

673


Where is localdb stored?

572


Explain what is raid and what are different types of raid levels?

539


How to connect ms access to sql servers through odbc?

557


How do I schedule a sql server profiler trace?

545


What is the importance of concurrency control?

677


How do indexes help, types?

556


What is single-user mode and what are the steps you should follow to start sql server in single-user mode?

561


What are ddl triggers and types of ddl trigger?

618


What is the difference between a stored procedure and a user defined function?

550