Tag: Migration

  • DBA Scripts: Get Database Inventory

    ,

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Server & Configuration › Server Inventory One Query, Every Database’s Migration Readiness Before you migrate, upgrade, or consolidate anything, you need one honest answer per database: is it actually online, what recovery model is it running, and is its compatibility level going to…

  • DBA Scripts: Get Linked Servers

    ,

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Server & Configuration › Server Inventory Choose the linked-server check you need Start with Get-LinkedServerConnectivity to check whether a linked server is reachable and see the returned error detail. For a migration pre-check, run Get-LinkedServerAndJobInventory for logins, linked servers, and SQL Agent jobs.…

  • DBA Scripts: Fix Orphaned Users

    ,

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Migration & Deployment From Finding Orphaned Users to Actually Fixing Them Restored a database onto another server and the application now gets Cannot open database “…” requested by the login. The login failed., even though its user is still in the database? The…

  • DBA Scripts: Get Edition Feature Usage

    ,

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Server & Configuration › Server Inventory What Actually Breaks If You Downgrade This Instance Edition downgrades, Enterprise to Standard, Standard to Web, look simple until you discover a feature that only Enterprise supports has quietly been in use the whole time. TDE-encrypted databases…

  • DBA Scripts: SQL Server Migration Script Generators

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Migration & Deployment Moving a SQL Server workload to a new instance means recreating five things by hand, unless you script them: logins (with the same SIDs, or every restored database ends up with orphaned users), SQL Agent jobs, database user and role…

  • DBA Scripts: Generate Restore With Move Script

    ,

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Migration & Deployment › Migration Script Generators Generating RESTORE … WITH MOVE for a Different Drive Layout Restoring onto a server whose drives do not match the source means naming a WITH MOVE clause for every database file. This script writes them for…

  • DBA Scripts: Generate Linked Server Script

    ,

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Migration & Deployment › Migration Script Generators Recreating Linked Servers and Login Mappings for a Migration If linked server queries fail on the new server after a migration, with Msg 7416 Access to the remote server is denied because no login-mapping exists or…

  • DBA Scripts: Generate User Mapping Script

    ,

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Migration & Deployment › Migration Script Generators Recreating Database Users, Roles, and Role Memberships for a Migration The databases are moving to a new server and the users, custom roles, role memberships and database owner have to match the source, including after a…

  • DBA Scripts: Generate Agent Job Script

    ,

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Migration & Deployment › Migration Script Generators Recreating Every SQL Agent Job for a Migration, in the Right Order The new server is up and its SQL Agent jobs are not, or a DR target needs the same jobs as production before cutover.…

  • DBA Scripts: Generate Login Script

    ,

    🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Migration & Deployment › Migration Script Generators SID-Preserving Login Recreation for a Migration The databases are restored on the new server and every database user comes back orphaned, or the application’s login is refused. Both trace back to logins recreated by hand with…