What command do we use to rename a db?

Answer Posted / swetha

sp_renamedb ?oldname? , ?newname?

alter database ?databasename?
modify name = ?newdatabasename?

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sql server agent and what are the two modes of authentication in sql server?

737


What are the new features introduced in SQL Server 2000 (or the latest release of SQL Server at the time of your interview)? What changed between the previous version of SQL Server and the current version?

802


tell me the disaster recovery plan

2188


How to stop log file growing too big?

747


Explain difference between control flow and data flow?

711






What is compound operators?

709


What purpose does the model database server?

851


Find first and last day of current month in sql server

763


What are the transaction properties?

731


How to create new databases with "create database" statements?

756


What is a trigger and its types?

730


how would you write a sql query to compute a frequency table of a certain attribute involving two joins? What changes would you need to make if you want to order by or group by some attribute? What would you do to account for nulls?

1355


What is buffer cash and log cache in sql server?

799


How does normalization work?

689


What is the current pricing model of SQL Azure?

98