Reapply User Login After Database Restore
Run the following on the source server and run the output on the destination server. Note: Run after database has been restored.
Run the following on the source server and run the output on the destination server. Note: Run after database has been restored.
Error: Possible Fixes: In the Security section of the linked server, switch to “Be made using this security context” and provide a login SQL account.
What Version and Edition to install? Developer, Standard, or Enterprise Edition If not Developer, need license key Account to use for install? Local Account or Network Account Collation, default set to “SQL_Latin1_General_CP1_CI_AS” Drives? Data, Log, Index, Backup Space Requirements Features to install? Analysis Services, Machine Learning Services, PolyBase Query Service, Integration Service, Reporting Service Example... » read more
Create a new Trace In the “Events Selection” tab, click on “Show all events” and select these… Stored Procedures -> RPC:Starting Stored Procedures -> RPC:Completed TSQL -> SQL:BatchStarting TSQL -> SQL:BatchCompleted In the “Events Selection” tab, make sure the “TextData” is selected and click on “Column Filters” In the TextData column add a filter: Like %uspMySP01%... » read more
Note: Bring database OFFLINE / ONLINE should be a fast process, even for a large database. Users must be disconnected from database before setting the database to offline. Else, use ROLLBACK IMMEDIATE clause. If you run into problem with bring the database back ONLINE, try restarting SQL Server service. If part of Availability Group, need... » read more
Problem: Solution: When you have tried everything to drop the database but nothing works. Stop the SQL Server service. Manually remove the data files from drive. Restart the SQL Server service. Delete database.
https://ola.hallengren.com
Source: https://ola.hallengren.com User Database IndexOptimize Script