If I will rename the logical file name in production will it create any issues.(sql server 2000).
I am getting the problem while restore the production database to other server. So,that I am planning to rename the logical name. The restoration is automated job for all the databases. That restoration script is working fine execpt for 3 databases because the logical names are different for these databases
Any advice.
Regards
Bharat
Quote:
Originally Posted by bharadwaj
Hi,
If I will rename the logical file name in production will it create any issues.(sql server 2000).
I am getting the problem while restore the production database to other server. So,that I am planning to rename the logical name. The restoration is automated job for all the databases. That restoration script is working fine execpt for 3 databases because the logical names are different for these databases
Any advice.
Regards
Bharat
can you explain your problem little bit more.|||Hi,
Thanks 4 ur response.
I have taken the backups from production and copy to other server ,then I will execute this restoration automated script for all the databases.
My script is given below.
--
--
set @.logical_data_name =@.db_name + '_' + 'data'
set @.logial_log_name =@.db_name + '_' + 'log'
--
--
RESTORE DATABASE @.db_name
FROM DISK = @.backup_filename
with replace,
MOVE @.logical_data_name to @.phsical_data_name
MOVE @.logial_log_name TO @.physical_ldf_filename
So,my script supports if the logicalname and physical names are same.
ex:: logical names are abc_data,abc_log
phsyical names are abc_data.mdf,abc_log.ldf
But for 3 databases say dbname is test.
logical names are test1_data,test1_log
phsyical names TEST_DATA.MDF,TEST_LOG.LDF
so, I am planning to rename the logical names to(test_data,test_log) in production. My question is will it creates any issues.
Thanks
Bharat
No comments:
Post a Comment