I have a SQL Server and a few databases. Now I want to create a user that can perform backups using SQL Package, so I did the following
USE [master]
GO
CREATE LOGIN [backup_user] WITH PASSWORD = 'password123'
Create a user for the login in the specific database that needs backup permissions:
USE [your_database]
GO
CREATE USER [backup_user] FOR LOGIN [backup_user]
Grant the user backup permission in the database:
USE [your_database]
GO
EXEC sp_addrolemember 'db_backupoperator', 'backup_user'
But I get an error:
The SELECT permission was denied on the object
User ‘backup_user’ does not have permission to run DBCC SHOW_STATISTICS for object
So how can I create such a user?
I can’t use the admin user don’t have access to login details
Or can I get someone to create a second admin user?