rename of logical file name

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bharadwaj
    New Member
    • Jun 2007
    • 22

    rename of logical file name

    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
  • hariharanmca
    Top Contributor
    • Dec 2006
    • 1977

    #2
    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.

    Comment

    • bharadwaj
      New Member
      • Jun 2007
      • 22

      #3
      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_n ame =@db_name + '_' + 'data'
      set @logial_log_nam e =@db_name + '_' + 'log'
      ---
      ---
      RESTORE DATABASE @db_name
      FROM DISK = @backup_filenam e
      with replace,
      MOVE @logical_data_n ame to @phsical_data_n ame
      MOVE @logial_log_nam e TO @physical_ldf_f ilename

      So,my script supports if the logicalname and physical names are same.
      ex:: logical names are abc_data,abc_lo g
      phsyical names are abc_data.mdf,ab c_log.ldf

      But for 3 databases say dbname is test.
      logical names are test1_data,test 1_log
      phsyical names TEST_DATA.MDF,T EST_LOG.LDF

      so, I am planning to rename the logical names to(test_data,te st_log) in production. My question is will it creates any issues.
      Thanks
      Bharat

      Comment

      Working...