Wednesday, March 7, 2012

Is renaming a SQL database easy?

Is renaming a SQL database easy? Can it be done via the GUI only or must
one use SQL transact statements?
--
SpinYes, it is reasonably easy.
Use the sp_renamedb stored procedure. You need to provide the old and
new database names. Note that you also need to be in the SysAdmin or
DB_Creator fixed server roles to execute this stored proc.
More info can be found in Books Online.
Spin wrote:
> Is renaming a SQL database easy? Can it be done via the GUI only or must
> one use SQL transact statements?
> --
> Spin|||Spin
In SQL Server 2005 you can rename the database by right click on the db and
then rename...
"Spin" <Spin@.spin.com> wrote in message
news:4c001mF13nr5bU1@.individual.net...
> Is renaming a SQL database easy? Can it be done via the GUI only or must
> one use SQL transact statements?
> --
> Spin
>|||... or as of SQL Server 2000, do it using ALTER DATABASE.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<nate.vu@.gmail.com> wrote in message news:1146801410.782933.236750@.i40g2000cwc.googlegroups.com...
> Yes, it is reasonably easy.
> Use the sp_renamedb stored procedure. You need to provide the old and
> new database names. Note that you also need to be in the SysAdmin or
> DB_Creator fixed server roles to execute this stored proc.
> More info can be found in Books Online.
>
> Spin wrote:
>> Is renaming a SQL database easy? Can it be done via the GUI only or must
>> one use SQL transact statements?
>> --
>> Spin
>

No comments:

Post a Comment