Wednesday, March 7, 2012

Change the logical name....

How to change the logical name of the database?
SQL2K.
Thanks,
Harry
exec sp_renamedb
<http://msdn.microsoft.com/library/en...ra-rz_3yle.asp>
'OldName', 'NewName'
*mike hodgson*
blog: http://sqlnerd.blogspot.com
HarrySmith wrote:

>How to change the logical name of the database?
>SQL2K.
>Thanks,
>Harry
>
>
|||Hi Harry,
U can use sp_password for change of password
use sp_changedbowner for change of db owner
from
doller
|||U can also use ep_renamedb
for user rename
from
doller
|||U can also use sp_renamedb
for user rename
from
doller
|||U can also use sp_renamedb
for user rename
from
doller
|||Hi,
Looks like Harry asked to change the logical file name. For that you have to
ALTER DATABASE command.
Command is:-
ALTER DATABASE <DBNAME> modify file (NAME = 'old_MDF_NAME', NEWNAME =
'NEW_MDF_NAME')
do the same for LDF file as well.
Note:
We can not change the logical file name in SQL 7. The command will only work
in SQL 2000.
THnaks
Hari
SQL Server MVP
"HarrySmith" <HarrySmith_56@.hotmail.com> wrote in message
news:%2304iYpBtFHA.2348@.tk2msftngp13.phx.gbl...
> How to change the logical name of the database?
> SQL2K.
> Thanks,
> Harry
>
|||Yes. Hari's solution is the right one for my requirement. I did not try
other postings.
Thanks,
Harry
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:%23Fob8BCtFHA.3080@.TK2MSFTNGP15.phx.gbl...
> Hi,
>
> Looks like Harry asked to change the logical file name. For that you have
to
> ALTER DATABASE command.
> Command is:-
> ALTER DATABASE <DBNAME> modify file (NAME = 'old_MDF_NAME', NEWNAME =
> 'NEW_MDF_NAME')
>
> do the same for LDF file as well.
>
> Note:
> We can not change the logical file name in SQL 7. The command will only
work
> in SQL 2000.
> THnaks
> Hari
> SQL Server MVP
> "HarrySmith" <HarrySmith_56@.hotmail.com> wrote in message
> news:%2304iYpBtFHA.2348@.tk2msftngp13.phx.gbl...
>

No comments:

Post a Comment