Tuesday, March 20, 2012

Rename a Database

Hi everybody
I have a question
Could you tell me How can i do to renae a database?
thanks for all
best regardsYou can use the ALTER DATABASE command.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Ivan" <Ivan@.discussions.microsoft.com> wrote in message
news:4F639024-6CBE-448C-A765-95E00BA33034@.microsoft.com...
> Hi everybody
> I have a question
> Could you tell me How can i do to renae a database?
> thanks for all
> best regards|||Thanks Tibor, but Could you send me a example please,
best regards
"Tibor Karaszi" escribió:
> You can use the ALTER DATABASE command.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Ivan" <Ivan@.discussions.microsoft.com> wrote in message
> news:4F639024-6CBE-448C-A765-95E00BA33034@.microsoft.com...
> > Hi everybody
> > I have a question
> > Could you tell me How can i do to renae a database?
> >
> > thanks for all
> >
> > best regards
>
>|||I would use the sp_rename stored procedure:
EXEC sp_rename 'old_name', 'new_name', 'DATABASE'
"Ivan" <Ivan@.discussions.microsoft.com> wrote in message
news:F510612C-A655-44C8-9F96-3B1E93739CC0@.microsoft.com...
> Thanks Tibor, but Could you send me a example please,
> best regards
> "Tibor Karaszi" escribió:
> > You can use the ALTER DATABASE command.
> >
> > --
> > Tibor Karaszi, SQL Server MVP
> > http://www.karaszi.com/sqlserver/default.asp
> > http://www.solidqualitylearning.com/
> >
> >
> > "Ivan" <Ivan@.discussions.microsoft.com> wrote in message
> > news:4F639024-6CBE-448C-A765-95E00BA33034@.microsoft.com...
> > > Hi everybody
> > > I have a question
> > > Could you tell me How can i do to renae a database?
> > >
> > > thanks for all
> > >
> > > best regards
> >
> >
> >|||I suggest you get familiar with checking up syntax in Books Online:
ALTER DATABASE dbname MODIFY name = newdbname
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Ivan" <Ivan@.discussions.microsoft.com> wrote in message
news:F510612C-A655-44C8-9F96-3B1E93739CC0@.microsoft.com...
> Thanks Tibor, but Could you send me a example please,
> best regards
> "Tibor Karaszi" escribió:
>> You can use the ALTER DATABASE command.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "Ivan" <Ivan@.discussions.microsoft.com> wrote in message
>> news:4F639024-6CBE-448C-A765-95E00BA33034@.microsoft.com...
>> > Hi everybody
>> > I have a question
>> > Could you tell me How can i do to renae a database?
>> >
>> > thanks for all
>> >
>> > best regards
>>|||Sp_rename is for objects. You are probably thinking of sp_renamedb. As of SQL Server 2000, MS
recommend us using ALTER DATABASE instead of sp_renamedb.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Ron Hinds" <__NoSpam__ron@.__ramac__.com> wrote in message
news:%230HkU83PFHA.3156@.TK2MSFTNGP15.phx.gbl...
>I would use the sp_rename stored procedure:
> EXEC sp_rename 'old_name', 'new_name', 'DATABASE'
> "Ivan" <Ivan@.discussions.microsoft.com> wrote in message
> news:F510612C-A655-44C8-9F96-3B1E93739CC0@.microsoft.com...
>> Thanks Tibor, but Could you send me a example please,
>> best regards
>> "Tibor Karaszi" escribió:
>> > You can use the ALTER DATABASE command.
>> >
>> > --
>> > Tibor Karaszi, SQL Server MVP
>> > http://www.karaszi.com/sqlserver/default.asp
>> > http://www.solidqualitylearning.com/
>> >
>> >
>> > "Ivan" <Ivan@.discussions.microsoft.com> wrote in message
>> > news:4F639024-6CBE-448C-A765-95E00BA33034@.microsoft.com...
>> > > Hi everybody
>> > > I have a question
>> > > Could you tell me How can i do to renae a database?
>> > >
>> > > thanks for all
>> > >
>> > > best regards
>> >
>> >
>> >
>|||Thanks very much Ron I appreciate your help
best regards
"Ron Hinds" escribió:
> I would use the sp_rename stored procedure:
> EXEC sp_rename 'old_name', 'new_name', 'DATABASE'
> "Ivan" <Ivan@.discussions.microsoft.com> wrote in message
> news:F510612C-A655-44C8-9F96-3B1E93739CC0@.microsoft.com...
> > Thanks Tibor, but Could you send me a example please,
> >
> > best regards
> >
> > "Tibor Karaszi" escribió:
> >
> > > You can use the ALTER DATABASE command.
> > >
> > > --
> > > Tibor Karaszi, SQL Server MVP
> > > http://www.karaszi.com/sqlserver/default.asp
> > > http://www.solidqualitylearning.com/
> > >
> > >
> > > "Ivan" <Ivan@.discussions.microsoft.com> wrote in message
> > > news:4F639024-6CBE-448C-A765-95E00BA33034@.microsoft.com...
> > > > Hi everybody
> > > > I have a question
> > > > Could you tell me How can i do to renae a database?
> > > >
> > > > thanks for all
> > > >
> > > > best regards
> > >
> > >
> > >
>
>

No comments:

Post a Comment