Solved

Renaming / relocating the IAM_ont database

  • 18 September 2019
  • 3 replies
  • 89 views

Userlevel 3
Badge +11
We have a new server with SQL server 2016 installed. I would like to relocate our Software Factory to the new location. Simultaneously I would like to rename the database.

I was able to backup and restore the iam_ont and sf database to the new server. However, I cannot seem to rename the iam_ont database. When I do, the application wants me to login to the 'old name' iam_ont. All logins fail because the 'old name' database no longer exists.

Is there a way to do this?
icon

Best answer by Anne Buit 18 September 2019, 16:59

View original

3 replies

Userlevel 7
Badge +5
Hi Hugo,

Can you run the following queries on the renamed IAM_ONT database:

code:
select db_name
from gui_appl
where project_id = 'SQLSERVER_IAM'

select s.server_address
from server s
join gui_appl g
on g.server_id = s.server_id
where g.project_id = 'SQLSERVER_IAM'


This returns the server and database for the IAM itself. These should always return current_server and current_database.

If these are correct, you should be able to access IAM and update the server and database of the Software Factory application accordingly.
Userlevel 3
Badge +11
Hi Anne,

It returns the name of the original database itself, not current_database. It does return current_server.

Can I simply change the name to current_database using the SSMS?
Userlevel 7
Badge +5
Yes, feel free to do so. This should resolve the problem.

Reply