Create a QA/Dev version of SLOX

I made this bat file to quickly refresh our QA with live data:

DEL \\LIVE_SERVER\d$\temp\PROD.bak

SQLCMD -SLIVE_SERVER -Q”BACKUP DATABASE [SLOX_PAC_PROD] TO  DISK = N’D:\Temp\PROD.bak’ WITH NOFORMAT, INIT,  NAME = N’SLOX_PAC_PROD-Full Database Backup’, SKIP, NOREWIND, NOUNLOAD,  STATS = 10″

COPY /Y \\LIVE_SERVER\d$\temp\PROD.bak D:\temp\PROD.bak

SQLCMD -Q”RESTORE DATABASE [SLOX_PAC_QA] FROM  DISK = N’D:\Temp\PROD.bak’ WITH  FILE = 1,  NOUNLOAD,  REPLACE,  STATS = 10″

SQLCMD -Q”UPDATE SLOX_PAC_QA.sysdba.SystemInfo SET PingServer=’SLOXIRV1Beta'”
Pause

A note about the last command (updating PingServer). This is necessary if same client need to access 2 connections in different servers. Thanks Ryan for his post.

Advertisements
This entry was posted in SalesLogix. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s