SSRS Permissions

Error: The permissions granted to user ‘DOMAIN\user01’ are insufficient for performing this operation. (rsAccessDenied) User permissions need to be setup both at the SQL Server and SSRS. Account can be both SQL Server account or NT account. SQL Server Account has access to database. (Database -> Security) SSRS Reports pointing to correct Data Sources file.... » read more

Sql Not Exist

The following SQL Server Not Exists query will find the Employees whose Occupation is neither Skilled Manual nor Clerical. Note: Using NOT EXISTS may have a performance hit. Try to use LEFT JOIN and WHERE column is NULL to test if there is a performance improvement. Sometimes, NOT EXISTS may be faster, and sometimes it... » read more

Generating Data From Script

SSMS -> Database Name -> Task -> Generate Script Select object -> Next Click on “Advanced” in the “Types of Data to Script” select “Data only” Generated Script

Alter Table with Large Amount of Data Takes a Long Time

The schema change it taking so long because you are assigning a default value to the column during the change and enforcing that with a non-nullable column, and it has to populate the column for millions of rows, which is an incredibly expensive operation. Alternative to making it faster would be to add it in... » read more

Database Size

Fix: Shrink database file to recover unused space. Add more disk space. Purge data from database. Move data to another database or data warehouse. Sources:

Database AlwaysOn Checklist For Automatic Failover

Failover can be done manually or automatically. For automatic failover, make sure the following has been set for a successful automatic failover. SQL Server Database AlwaysOn Checklist for Automatic Failover Availability Group Listeners are setup and all processes point to the listeners. Failover jobs have been setup. All jobs in the Always On category. XXXXX_AvailabilityGroup... » read more

Drop Index

Drop Index Re-create Index Dropping index is fast. Recreating index will take a longer time.