November 21, 2011 at 3:31 am
Hi,
On every Wednesday I have to perform one database refresh activity for this I have to copy the Wednesday Full backup file from one server to another. Then restoring this full backup file on different server and fixing up orphan users. I am doing these all manually. Is there any powershell script available that can be used in this activity ?
Thanks in advance.
November 22, 2011 at 8:10 am
What version of SQL server are you using for both servers? It may be that you have no need to use powershell for this. Would anything listed here work for you? http://msdn.microsoft.com/en-us/library/ms190202%28v=SQL.90%29.aspx
I'd pay attention to the log-shipping and database mirroring options.
Also, what do you mean by fixing up orphan users?
November 23, 2011 at 4:12 am
Hi,
The version is SQL Server 2005. And I am not allowed to use any high availability solutions. Fixing up orphan users becuase I am restoring backup from one server to another and if execute sp_change_users_login @action=report it gives number of orphan users. And always I have to fix them.
Thanks in advance.
November 23, 2011 at 7:20 am
Well, I haven't worked much with Powershell, but if your backups are stored someplace that the other SQL box has access to, you should be able to create a SQL agent job to restore it.
Also, is there a reason you cannot backup the master database and restore it on the other server?
November 24, 2011 at 12:11 am
because my production and developer environment are different..so cannot restore master db.
Any another way out to fixing the orphan.
Thanks in advance.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply