cancel
Showing results for 
Search instead for 
Did you mean: 

Error applying SP4 to BackupExec 2012

TomazicM
Level 3

Hello!

I get the following error when trying to apply SP4 to BackupExec 2012 installation on Windows Server 2008 R2. SQL database is on separate SQL server.

03-19-2016,18:04:38 : VSR-SIST
03-19-2016,18:04:38 : DRIVER={SQL Server};SERVER=VSR-SQL;Trusted_Connection=Yes;DATABASE=BEDB
03-19-2016,18:04:38 : Connected to SQL Server VSR-SQL.
+ 03-19-2016,18:04:41 : V-225-205: ERROR -1: There are still remote logins or linked logins for the server 'BESERVER_DB'. ***To search for information about this error, click here
03-19-2016,18:04:41 : Declare @sourcedb nvarchar(128) DECLARE key_cursor CURSOR FOR select datasource from master.dbo.syss
+ 03-19-2016,18:04:41 : ERROR: -1 - Failed to execute dbupgradebuildtobuild.sql.

I manually stoped all BackupExec services before installation and checked on SQL server that there are no logins on BackupExec database.

1 ACCEPTED SOLUTION

Accepted Solutions

TomazicM
Level 3

After digging into the process of installing SP I found out where the problem is and also solution to the problem.

I looked into SQL upgrade script C:\Program Files\Symantec\Backup Exec\dbupgradebuildtobuild.sql. It shows that for the sake of SP install linked server BESERVER_DB is created which points to the SQL server with BEDB database. In this case it is the server itself. If linked server BESERVER_DB already exists (from previous installations), it is first deleted and then new one created. Linked server is created with default login (login using current security context). Previous liked server is deleted with command sp_dropserver  'BESERVER_DB'. This command deletes linked server and default login, but not any extra defined logins.

In our case existing linked server  'BESERVER_DB' had additional login tied to specific user. When upgrade procedure deleted linked server, extra login was not deleted and this then caused error. Correct command for linked server delete in the upgrade script would be sp_dropserver  'BESERVER_DB', 'droplogins'.

I simply deleted linked server BESERVER_DB and then SP4 install went OK.

View solution in original post

3 REPLIES 3

CraigV
Moderator
Moderator
Partner    VIP    Accredited

Hi,

 

You might have this error relating to trying to patch to SP3...

https://www.veritas.com/support/en_US/article.TECH211171

Run LiveUpdate and install all the relevant updates excluding SP4, and once done, try upgrading to SP4.

Otherwise see if this helps:

https://www.veritas.com/support/en_US/article.000020033

Thanks!

TomazicM
Level 3

I went on the conservative side and first installed SP1a. It went OK.

Then I installed SP2. It went OK.

Then I tried SP3. It failed with the same error as with SP4:

03-20-2016,20:08:49 : Action 20:08:49: PatchBEDBData.
03-20-2016,20:08:49 : Entered IM_PatchBEDBData.
03-20-2016,20:08:49 : Executing patch BEDB data fixes.
03-20-2016,20:08:49 : m_bUseNativeClient = 0
03-20-2016,20:08:49 : GetClusterUpgradeState returning 0
03-20-2016,20:08:49 : Executing Attach_BEDB.
03-20-2016,20:08:49 : SQL_GetServiceName. GetComputerName
03-20-2016,20:08:49 : VSR-SIST
03-20-2016,20:08:49 : DRIVER={SQL Server};SERVER=VSR-SQL;Trusted_Connection=Yes
03-20-2016,20:08:49 : Connected to SQL Server.
03-20-2016,20:08:49 : BEDB attached. Status: ONLINE.
03-20-2016,20:08:49 : A previous BEDB database was found. Detaching current BEDB database now.
03-20-2016,20:08:50 : Database BEDB has been taken offline.
03-20-2016,20:08:50 : The original BEDB database was detached. The new database will now be attached.
03-20-2016,20:08:50 : Attaching BEDB to SQL Server.
03-20-2016,20:08:50 : EXEC sp_attach_db 'BEDB',@filename1 = N'E:\SQLDatabaseUserData\BEDB_Dat.mdf', @filename2 = N'F:\SQLDatabaseUserLog\BEDB_Log.ldf'
03-20-2016,20:08:50 : BEDB has been succesfully attached to SQL Server.
03-20-2016,20:08:50 : Change BEDB owner to SA user.
03-20-2016,20:08:50 : Executing C:\Program Files\Symantec\Backup Exec\dbupgradebuildtobuild.sql.
03-20-2016,20:08:50 : Executing SQL_ProcessScript.
03-20-2016,20:08:50 : SQL_GetServiceName. GetComputerName
03-20-2016,20:08:50 : VSR-SIST
03-20-2016,20:08:50 : DRIVER={SQL Server};SERVER=VSR-SQL;Trusted_Connection=Yes;DATABASE=BEDB
03-20-2016,20:08:50 : Connected to SQL Server VSR-SQL.
+ 03-20-2016,20:08:53 : V-225-205: ERROR -1: There are still remote logins or linked logins for the server 'BESERVER_DB'. ***To search for information about this error, click here
03-20-2016,20:08:53 : Declare @sourcedb nvarchar(128) DECLARE key_cursor CURSOR FOR select datasource from master.dbo.syss
+ 03-20-2016,20:08:53 : ERROR: -1 - Failed to execute dbupgradebuildtobuild.sql.
+ 03-20-2016,20:08:53 : dbupgradebuildtobuild.sql changes did not complete successfully. Database schema may have been modified by this patch.
+ 03-20-2016,20:08:53 : V-225-1000: Patch has failed to fix BEDB data(schema). Rolling back patch process. ***To search for information about this error, click here
 

Then I also looked at the seccond suggestion, but there were no server name changes done at our SQL server. What I find intriguing is that error message refers to BESERVER_DB and our db name is BEDB.

 

Regards.

TomazicM
Level 3

After digging into the process of installing SP I found out where the problem is and also solution to the problem.

I looked into SQL upgrade script C:\Program Files\Symantec\Backup Exec\dbupgradebuildtobuild.sql. It shows that for the sake of SP install linked server BESERVER_DB is created which points to the SQL server with BEDB database. In this case it is the server itself. If linked server BESERVER_DB already exists (from previous installations), it is first deleted and then new one created. Linked server is created with default login (login using current security context). Previous liked server is deleted with command sp_dropserver  'BESERVER_DB'. This command deletes linked server and default login, but not any extra defined logins.

In our case existing linked server  'BESERVER_DB' had additional login tied to specific user. When upgrade procedure deleted linked server, extra login was not deleted and this then caused error. Correct command for linked server delete in the upgrade script would be sp_dropserver  'BESERVER_DB', 'droplogins'.

I simply deleted linked server BESERVER_DB and then SP4 install went OK.