Very easy way to fix ORPHAN users
Run this script against the database restored from other SQL Server database. It will solve the orphan users.
2003-06-12
780 reads
Run this script against the database restored from other SQL Server database. It will solve the orphan users.
2003-06-12
780 reads
This a script which creates stored procedures that can be executed adhoc or set as sql agent jobs to check the recovery status and generate full, differential or transaction log backupf for each database if the database recovery status is set to full. We have terabytes of data and set all production databases […]
2003-06-06
920 reads
This stored Procedure can be used to force restores the database by killing all the process running over this database.
2003-06-05
402 reads
This SP take 0 or 1 parameters. Execute without any parms and you will the sp_attach_db statements for all db's on you server. Execute with a database name and it will generate statements for stated db.
2003-05-06
1,002 reads
This is one example of how you can make backups with a date stamp for the file name. You can then periodically remove the files that are older than a specified date by simply placing a few lines of code in a job step and calling the supplied sp and passing the date from which […]
2003-04-25
764 reads
This script was designed to restore a backup of a production database from disk file, handle multiple DB files, move the files to new location, with new database name that is customized for the date of the backup, create any missing logins, and fix any user accounts that are orphaned by differing SIDs from the […]
2003-04-24
1,057 reads
This vbscript will generate the sql to recreate all the jobs running on a given SQL server. I wrote this because the last time we migrated a SQL server, I ended up re-creating all the jobs, steps and schedules by hand using the Enterprise Manager. It was the slowest, dullest and most error-prone part of […]
2003-04-17
800 reads
Finds the last available backup for a specified database (local or remote server), then restores the backup onto an existing database on the local server.The script will kill all non-system processes in the destination database to allow the script to be scheduled at night regardless is anyone is still connected.The logical and physical names are […]
2003-03-31
761 reads
This script creates a stored proc to verify all backups in a media set and load their history into MSDB. I use this frequently when I get backup files from clients and want to use Enterprise Manager's intelligent restore selection to quickly get the database restored on a test machine.
2003-03-11
299 reads
If, like me, you are constantly restoring/moving several databases between multiple environments (development to staging, production to training, etc.), you know how tedious it can get to use EM, or to manually type out all those RESTORE...WITH MOVE statements in QA.Even having a saved script isn't the ideal thing, as you still need to go […]
2003-02-10
1,768 reads
By Chris Yates
A brief introduction to the tool and its advantages for database migrations DevOps is...
In a previous blog post we went through how to build a Docker container...
Businesses are drowning in data, but starving for insights. That's where SQL experts swoop...
select Custno, Addr1, City, Res_Phone, Bus_Phone, Fax_Phone, Marine_Phone, Pager_Phone, Other_Phone, email1, email2 from customer...
I'm only processing 50,000 records not everything from the Table where there are 250,00...
Comments posted to this topic are about the item The Marked Transaction
I want to mark a transaction in the log as a recovery point. How do I do this in my code if I use the transaction, myTran?
See possible answers