Reputation: 1727
I need to copy an entire DB from 1 server to another on a daily/scheduled basis. Can't use replication - can't add GUIDs to the DB (Source DB - is based on a going restore).
How can I write a script to copy the entire DB + logins etc to another server. I can drop the destination DB if needed each time.
Any ideas on a script?
thanks in advance!
Upvotes: 0
Views: 38
Reputation: 1767
Because you need to also copy any logins across as well, I would look at doing this with the dbatools PowerShell module
Check out the Copy-DbaDatabase and Copy-DbaLogin cmdlets
Upvotes: 1