Start a conversation

How to rename an Archive Store incl. all components (database, MDF and LDF files, binary and index folders)

Answer

This procedure outlines how to rename an Archive Store including all of its components (like database, MDF and LDF files, binary and index folders). In this example the Archive Store [2013 Jan - Dec OLD] is renamed to [2013 Jan - Dec NEW].
  1. Open the GFI Archiver web page
  2. Navigate to Configuration > Archive Stores
  3. Select the Archive Store that you want to rename
  4. Click on the Summary button
  5. Take a screenshot to keep a record of the database and paths
    • For this guide, let's assume:
    • Archive Store Name: [2013 Jan - Dec OLD]
    • Database Name: [2013 Jan - Dec OLD]
    • Server: [SQLSERVER\SQLINSTANCE]
    • Path to the binary source: [C:\Program Files\GFI\Archiver\Databases\2013 Jan - Dec OLD\Binary]
    • Path to search index: [C:\Program Files\GFI\Archiver\Indexes\2013 Jan - Dec OLD]
  6. Close the Summary dialog
  7. Use the detach button to detach Archive Store from GFI Archiver
  8. Open the Microsoft SQL Management Studio
  9. Connect to the Micosoft SQL instance on which the database resides [SQLSERVER\SQLINSTANCE]
  10. Expand the Databases node in the tree in the Object Explorer
  11. Right click on the database that you want to rename and click on Properties
  12. Open the Files page
  13. Take a record (screenshot) of the paths and file names of the MDF and LDF files
    • For this guide, let's assume:
    • [C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\2013 Jan - Dec OLD.mdf]
    • [C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\2013 Jan - Dec OLD_log.ldf]
  14. Close the Database Properties dialog by clicking on cancel
  15. Right click on the database that you want to rename and click on Tasks > Detach...
  16. Tick the option "Drop connections"
  17. Click on the OK button to detach the database from the Microsoft SQL Server
  18. Open the folder in which the MDF file is located [C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\]
  19. Rename the MDF file to: [2013 Jan - Dec NEW.mdf]
  20. Open the folder in which the LDF file is located [C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\]
  21. Rename the LDF file to: [2013 Jan - Dec NEW_log.ldf]
  22. In the Microsoft SQL Management Studio, right click on the Databases node in the Object Explorer and choose the option "Attach..."
  23. Within the "Databases to attach" section, click on the Add button
  24. Choose the file [2013 Jan - Dec NEW.mdf]
  25. Within the "Databases to attach" section, change the value of the "Attach As" column to match the new database name [2013 Jan - Dec NEW]
  26. Within the "Original File Name" section, change the values of the "Current File Path" column to the renamed MDF and LDF files
    • [C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\2013 Jan - Dec NEW.mdf]
    • [C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\2013 Jan - Dec NEW_log.ldf]
  27. Click on the OK button to attach the database
  28. Right click on the database that you want to rename and click on Properties
  29. Open the Files page
  30. Change the values of the "Logical Name" column to the new database name
    • [2013 Jan - Dec NEW]
    • [2013 Jan - Dec NEW_log]
  31. Close the dialog by clicking on the OK button
  32. Open Windows Explorer and rename the binary and index folder to the desired new names (reference the screenshot in step 5)
    • [C:\Program Files\GFI\Archiver\Databases\2013 Jan - Dec NEW\Binary]
    • [C:\Program Files\GFI\Archiver\Indexes\2013 Jan - Dec NEW]
  33. Open the GFI Archiver web page
  34. Navigate to Configuration > Archive Stores
  35. Click on the Attach button
  36. Go through the wizard and attach the Archive Store again choosing / specifying the new database name and folders for the binary / index locations
Notes
  1. Not all Archive Stores have a binary folder
  2. This procedure is based on Microsoft SQL Server 2012 and that the dialogues and options might differ in other versions of Microsoft SQL Server, however the same principles should apply though
Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Priyanka Bhotika

  2. Posted

Comments