SQL Profiler: Filter By Database Name

Filter result by database name. Under Trace properties > Events Selection tab > select show all columns. Now under column filters, you should see the database name. Enter the database name for the Like section and you should see traces only for that database. Note: Make sure you show all columns and select database name.... » read more

Enable SSRS Email Subscription

Go to Report Server Configuration Manager and set the E-mail Settings. Restart SSRS services. On SSRS, you will now see an “Email” subscription option when you create new SSRS subscription.

Unable to add secondary server to AlwaysOn

Error: Failed to obtain cluster information. Either the specificed instance of SQL Server is not running on a Windows Server Failover Cluster (WSFC) node, or the user lacks sysadmin permissions on the SQL Server instance to obtain the cluster information. Resolution: Make sure you restart SQL Server services after setting the AlwaysOn setting. Error: SQL... » read more

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.

Server is not configured for remote access

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

SQL Convert vs Cast

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

Sql Server Permission to View / Execute Sql Job

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

CPU Issues with sp_BlitzCache

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