What command do we use to rename a db?
Answers were Sorted based on User's Feedback
Answer / visala
sp_renamedb 'oldname','newname'
alter database <databasename>
modify name=<newdatabasename>
Is This Answer Correct ? | 17 Yes | 0 No |
Answer / swetha
sp_renamedb ?oldname? , ?newname?
alter database ?databasename?
modify name = ?newdatabasename?
Is This Answer Correct ? | 7 Yes | 0 No |
Answer / karthick.r
sp_rename olddatabasename newdatabasename
for eg
sp_rename prodetails empdetails;
in this eg the name of the prodetails is changed into
empdetails using above command
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / 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 |
How would we use distinct statement? What is its use?
Introduction of rollup clause using sum and group by clause?
In which tcp/ip port does sql server run? Can it be changed?
Why should you use or avoid select * statements?
What is temporary stored procedure?
How we can refresh the view?
How can we solve concurrency problems?
Using the customer, and order table in northwind database, please write a query to produce xml?
What is not null constraint?
How to list all dsn entries on your local machine using odbc_data_source()?
What is model database? : SQL Server Architecture
Name the different type of indexes in sql?