SQL Server Permission to Backup Database
db_backupoperator – This role will allow the user to take backups of the database. Server Level – PUBLIC ROLEDatabase Level – DB_BACKUPOPERATOR This is the least privilege to take backups for a database.
db_backupoperator – This role will allow the user to take backups of the database. Server Level – PUBLIC ROLEDatabase Level – DB_BACKUPOPERATOR This is the least privilege to take backups for a database.
Issue: Log has grown to be very large and unable to trunk log file even after database and transaction log backup. Get the following error message when trying to truncate log. The log was not truncated because records at the beginning of the log are pending replication or Change Data Capture. Ensure the Log Reader... » read more
Linked Server Error: Could not execute procedure on remote server ‘XXXX’ because SQL Server is not configured for remote access. Ask your system administrator to reconfigure SQL Server to allow remote access. Fix: Make sure remote access is enabled on the database server and that the server has been restarted if the configuration changed. Also... » read more
Convert vs Cast CAST and CONVERT are two SQL functions used by programmers to convert one data type to another. The CAST function is ANSI standard and is compatible to use in other databases while the CONVERT function is a specific function of the SQL server. Since the CAST function is compatible with other databases,... » read more
Open up “Login Properties” of the user. Go to “User Mapping” page and select “msdb” database. Add the following membership… SQLAgentUserRole SQLAgentReaderRole SQLAgentOperatorRole SQL Agent User Role: SQLAgentUserRole is the least privileged of the SQL Server Agent fixed database roles. It has permissions on only operators, local jobs, and job schedules. Members of SQLAgentUserRole have... » read more
Linked Server The bottom line is that linked servers are always slow. Try to run queries on the remote server or try to push data from the remote server. Also look for ways to replicate data from the remote server locally. Remote Join When you use the INNER REMOTE JOIN hint you are forcing the tables... » read more
Issues: Long Running Queries https://www.brentozar.com/blitzcache/long-running-queries/ Check for missing index – Check “Execution Plan” for missing index. Expensive Key Lookups https://www.brentozar.com/blitzcache/expensive-key-lookups/ Check “Execution Plan” for Key Lookup. A key lookup occurs when SQL uses a nonclustered index to satisfy all or some of a query’s predicates, but it doesn’t contain all the information needed to cover... » read more
Two things not available in Standard that caught my eye were: Online indexing Online schema change On the Standard version, SQL Server will lock your object (i.e. table) until the create index or alter table is complete. If you have the Enterprise Edition, then you could specify the WITH (ONLINE=ON) option to alter tables or create indexes,... » read more
Brent Ozark Unlimited https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit#how-to-install-the-scripts Focus on the top offenders from EXEC sp_BlitzCache @SortOrder = ‘cpu’ as the starting point. Review Steps Install the first responder toolkit. Use the Install-All-Scripts.sql installation script in master. https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit Exec sp_Blitz Exec sp_BlitzCache During peak hours run Exec sp_BlitzFirst. If the DB is already hitting 100% CPU constantly don’t... » read more
Sources: https://stackoverflow.com/questions/3456629/how-to-check-which-stored-procedure-is-taking-maximum-time-in-sql-server