My master doesn't start after I migrated its database to another server. What should I should I update when I'm migrating my database to a new server? How should I recreate the db owner on the new sql server I am migrating my DB to? |
All these possibilities might need to be combined, depending on your situation. 1- Update DB information on ../master/config/Vision64database.ini: If the hostname of the new server is different from the old one you will need to either update the vision64database.ini or the ODBC connector on the master to reflect the change: A- DatabaseType=ODBCDirect
If this is set at the beginning of the file then something similar to "Driver={SQL Server};Server=MyServerName;Database=myDatabaseName" must be set later in the file. "MyServerName" would be the "old" server name I suppose that the name of the database did not change when you migrated the DB (change it as well if it does) but you will have to update "MyServerName" with the new hostname. B- DatabaseType=ODBC This means that the master connects to the DB through an ODBC Connector set on the master. The name of the ODBC connector is set in the field "DatabaseName=". Edit the connector configuration and set the new hostname to it. 2- Update the SID of the DB owner on the new DB server: It is not sufficient to migrate your DB then recreate the same user on the new DB server because their SID will differ. As a result the two users will be considered as different users by SQL Server and the master will not connect. Connect to the DB (you can use SQL Server Management Studio) then: - recreate the same user as the owner of the db on the new server - run the following query: exec sys.sp_change_users_login 'update_one', 'MyUserName', 'MyUserName';
Replace "MyUserName" by the owner of the DB (you can find this information on the DB properties and in the field "User=" of the file ../master/config/Vision64database.ini . |