How can we help you today? How can we help you today?
Stephen Lyall

Activity overview

Latest activity by Stephen Lyall

SQB service is no longer running
I recieve the following error when attempting a restore using the GUI: KBPDSQLODS01: Restore - Failed ============================== Restoring full backup - Failed This operation failed with error...
1 follower 1 comment 0 votes
Error uprading from SQL Backup v5.1.0.0.2781 to v5.3.0.178
During the server component install this message appears. 'Server Component Installallation - Failed' 'The SQL Backup extended stored procedure DLL version is 5.1.0.2781, and 5.3.0.178 was expected...
1 follower 1 comment 0 votes
I ran profiler during to see what its doing. It executes this piece of code: "-- Testing for BACKUP rights. -- Work from server role to database role, to BACKUP DATABASE execution and restriction rights. -- # Aliases are not supported. DECLARE @hasrights integer SELECT @hasrights = IS_SRVROLEMEMBER('sysadmin', 'CORP\sqlsrv') IF (@hasrights = 0) OR (@hasrights IS NULL) BEGIN SETUSER 'CORP\sqlsrv' -- As long as the user has sysadmin server role, he can backup the database. SELECT @hasrights = IS_SRVROLEMEMBER('sysadmin') IF (@hasrights = 0) OR (@hasrights IS NULL) BEGIN -- This has to be done because IS_SRVROLEMEMBER does not check recursively if a login name is provided. USE [STB] DECLARE @login_type integer DECLARE @login_name sysname -- No sysadmin rights. Check for database db_owner role. SELECT @hasrights = IS_MEMBER('db_owner') -- Check for database db_backupoperator role. IF (@hasrights <> 1) BEGIN SELECT @hasrights = IS_MEMBER('db_backupoperator') END -- No db_backupoperator role. Check BACKUP DATABASE execute rights. -- Quick check for explicit rights. IF (@hasrights = 0) OR (@hasrights IS NULL) BEGIN SELECT @hasrights = 1 WHERE EXISTS ( SELECT 1 FROM sysprotects a INNER JOIN sysusers b ON a.uid = b.uid AND b.name = 'CORP\sqlsrv' WHERE a.action = 228 AND a.protecttype IN (204, 205) ) IF (@hasrights = 0) OR (@hasrights IS NULL) BEGIN -- No direct rights. Now need to iterate and check all Windows groups and SQL Server roles. DECLARE cur_rights CURSOR FOR SELECT (CASE WHEN b.isntgroup = 1 THEN 1 ELSE CASE WHEN b.issqlrole = 1 THEN 2 ELSE 0 END END) type, b.name FROM sysprotects a INNER JOIN sysusers b ON a.uid = b.uid WHERE a.action = 228 AND a.protecttype IN (204, 205) AND (b.isntgroup = 1 OR b.issqlrole = 1) OPEN cur_rights FETCH NEXT FROM cur_rights INTO @login_type, @login_name @FETCH_STATUS = 0 BEGIN SELECT @hasrights = IS_MEMBER(@login_name) IF @hasrights = 1 BEGIN BREAK END FETCH NEXT FROM cur_rights INTO @login_type, @login_name END CLOSE cur_rights DEALLOCATE cur_rights END END -- for database level rights, need to check if DENY restriction exists IF @hasrights = 1 BEGIN SELECT @hasrights = 0 WHERE EXISTS ( SELECT 1 FROM sysprotects a INNER JOIN sysusers b ON a.uid = b.uid AND b.name = 'CORP\sqlsrv' WHERE a.action = 228 AND a.protecttype IN (206) ) IF @hasrights = 1 BEGIN -- No explicit DENY restrictions. Check via group / role membership. DECLARE cur_rights CURSOR FOR SELECT (CASE WHEN b.isntgroup = 1 THEN 1 ELSE CASE WHEN b.issqlrole = 1 THEN 2 ELSE 0 END END) type, b.name FROM sysprotects a INNER JOIN sysusers b ON a.uid = b.uid WHERE a.action = 228 AND a.protecttype = 206 AND (b.isntgroup = 1 OR b.issqlrole = 1) OPEN cur_rights FETCH NEXT FROM cur_rights INTO @login_type, @login_name @FETCH_STATUS = 0 BEGIN SELECT @hasrights = IS_MEMBER(@login_name) IF @hasrights = 1 BEGIN SET @hasrights = 0 BREAK END FETCH NEXT FROM cur_rights INTO @login_type, @login_name END CLOSE cur_rights DEALLOCATE cur_rights END END END SETUSER END DECLARE @dbname sysname SELECT @dbname = name FROM master..sysdatabases WHERE name = N'STB' IF @hasrights = 1 SELECT CAST(1 AS int) AS hasrights, @dbname AS name ELSE SELECT CAST(0 AS int) AS hasrights, @dbname AS name" I cut and pasted it into Query Analyzer. If you are in the database (in the example above its STB) itself it runs ok. If you are anywhere else it eventually times out. / comments
I ran profiler during to see what its doing. It executes this piece of code: "-- Testing for BACKUP rights. -- Work from server role to database role, to BACKUP DATABASE execution and restriction...
0 votes