Friday, January 29, 2021

Change Always on Availability group ownership

 USE [master]


GO


ALTER AUTHORIZATION ON AVAILABILITY GROUP::[AGLG-DB3] TO [ECP\etrace-lg-svc];

ALTER AUTHORIZATION ON AVAILABILITY GROUP::[AGLG-DB4] TO [ECP\etrace-lg-svc];

ALTER AUTHORIZATION ON AVAILABILITY GROUP::[AGLG-DB5] TO [ECP\etrace-lg-svc];

ALTER AUTHORIZATION ON AVAILABILITY GROUP::[AGLG-DB6] TO [ECP\etrace-lg-svc];

ALTER AUTHORIZATION ON AVAILABILITY GROUP::[AGLG-DB7] TO [ECP\etrace-lg-svc];



GO

RESTORE FILELISTONLY FROM DISK = ‘E:\Backup\PeterDatabase.bak’

RESTORE DATABASE ITAMS2 FROM DISK ='G:\SQL_BKP\WINDRUNNER_ITAMS_FULL_20201109_200001.bak'

WITH MOVE 'ITAMS_new.mdf' TO 'H:\SQL_DB\ITAMS_new2.mdf',

MOVE 'ITAMS_new_log.ldf' TO 'E:\SQL_LOG\ITAMS_new_log2.ldf’


No comments:

Post a Comment