IBM Support

How do I rename an IBM i2 database?

How To


Summary

IBM i2 iBase databases can be renamed using a combination of SQL Server backups and i2 iBase designer.

Objective

The following instructions will explain how to take your existing database and rename it. The instructions will change…

  • The database (.idb) file name
  • The database name in SQL Server and
  • The name as it appears in iBase User and Designer.

Environment

You will need access to SQL Server Management Studio and i2 iBase Designer in order to complete these steps.

In the example we will be taking our existing i2 Database Old_Database and renaming it to New_Database.

In these instructions we will be continuing to use our old Security (.ids) file, as one Security file can link to many databases.

Here is the database in its starting form.

image-20210721152201-1

You can see that the database in the database explorer view is listed as ‘Old_Database’ and it contains a simple entity structure. In Windows, the database uses the ‘Security.ids’ security file (which we will be retaining) and has a database file named ‘Old_Database.idb’.

In SQL Server Management Studio (SSMS), the database is listed in the Object Explorer view as Old_Database, and has an Audit log named Old_Database_Log (which we will not be retaining in this example).

image-20210721152201-2

Steps

  1. First, we must take backups of our existing database in SSMS. Ensure that there are no users in iBase user or iBase designer. Open SSMS and login as a system administrator, right click the database which you wish to backup, and select Tasks -> Back Up…image-20210721152252-3
  2. Ensure that your correct database is selected and do a Full database backup. Choose to back up to disk and select an appropriate location for your backup. In this example, I am selecting the default location for the location. Click OK.image-20210721152253-4image-20210721152253-5
  3. Exit SSMS and login to your existing Security file in i2 iBase Designer, but do not open any databases. Instead, select Create New Database, once you are logged in.
    image-20210721152253-6
  4. Give the new database the name that you wish your old database to be replaced with. In my example, I am going to select ‘New_Database’. You do NOT need to select a template of any kind for this database. It can simply be blank, but you should ensure that the name you choose is unique and that your database is upsized to SQL Server.
    image-20210721152253-7
  5. You should now have a new blank database which shows the name which you will use going forward. image-20210721152253-8
    As well as a new database (.idb) file
    image-20210721152253-9
    And it should also appear with its new name in SSMS along with a new audit log database.
    image-20210721152253-10
  6. Exit iBase designer and now log back in to SSMS.
  7. Right click your newly created database, and select Tasks -> Restore -> Database…image-20210721152253-11
  8. In the Restore Database wizard, select the Device: radio button, and then press the … button to select your backup device. image 10997
  9. Select File as your backup media type and press the Add button.
  10. In the Locate Backup File window, locate the backup file which you created earlier of your old database, select it and press OK. image-20210721152253-13
  11. Press OK in the Select backup devices Window to return to the Restore Database wizard.
  12. Ensure that your Destination Database is set to New_Database (or the name of the new database which you just created). image-20210721152253-14
  13. Under the Files page, ensure that under the Restore database files as options, you are selecting to Restore As the name of your new database.
  14. image 10998
  15. Under the Options page, select the Overwrite the existing database (WITH REPLACE) checkbox. image-20210721152253-16
  16. Click OK to begin the restore.
  17. Once the restore has completed, exist SSMS.
  18. Open i2 iBase Designer and login to the existing Security File, but not the database.
  19. Now open your newly renamed database in iBase designer. You should find that the old databases contents are now available within the new database, however some elements of the old name still remain. image-20210721152253-17
  20. To change the title of the new database to reflect it’s new name, in i2 iBase designer select File -> Database propertiesimage-20210721152253-18
  21. Change your Title to match your new database name and press OK.
    image-20210721152253-19
  22. The database name is then shown in database explorer and in the i2 iBase menusimage-20210721152253-20
  23. Finally, it is important to remember that as we have created a new database, any previous search 360 jobs or imports which we set up, will need to be recreated again and point to the new database. You should then be able to let your users back into the new database in iBase User.

Additional Information

Note: These instructions will effectively leave you with 2 iBase databases. This is an important distinction to note because many of your existing analysis objects such as IBM i2 Analyst's Notebook charts may link to the originally named existing database. If you were to delete the old database, these links within your i2 Analyst's Notebook Charts will break, which is likely not a desired outcome.
As such, we suggest you rename i2 iBase databases using this method only when absolutely necessary to avoid this pitfall.

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB24","label":"Security Software"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSXW43","label":"i2 iBase"},"ARM Category":[{"code":"a8m50000000Ci9pAAC","label":"i2 iBase and i2 Analyst's WorkStation->Database"}],"ARM Case Number":"TS006257736","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Historical Number

TS006257736

Document Information

Modified date:
22 July 2021

UID

ibm16474201