Jump to content

Recommended Posts

Posted

Hi guy's

 

Is there any way where you can auto fill the SQL server instance details and SA password?

 

 

I know I am a bit lazzy:)

 

 

 

 

regards

 

 

 

Infoseeker

Posted

Batch file using the correct switches.

 

dbAttach: Database Attachment, Restore & Backup Management Utility

Parameters:

 

 

/SERVER="ABCD" - ABCD is the name of the SQL Server to upgrade

 

/DATABASE="ABCD" - ABCD is the name of the SIMS database on the server to upgrade.

(Note that if not supplied the settings from the Connect.INI in the

current directory will be used.)

 

/USER="ABCD" - ABCD is the user name: SQL User for installations, Attach, Detach and Restore

SIMS User name when used to backup with /BACKUP

 

/PASSWORD="ABCD" - ABCD is the password for the user given

 

/AUTO - If supplied, will attempt to perform specified operations automatically.

If automation fails, the UI will be displayed.

 

/NOBACKUP - If supplied no backup will be taken of the database, and if a problem occurs,

no restore will be performed

 

/BACKUP - Create a SIMS backup - also requires /USER, /PASSWORD, /DATABASE, /SERVER

and /AUTO to be specified

 

/AUTOATTACHMODE - Automatically Attach specified database - requires /USER, /PASSWORD,

/DATABASE, /SERVER, /AUTO and /SOURCEDB

 

/AUTODETACHMODE - Automatically Detach specified database - requires /USER, /PASSWORD,

/DATABASE, /SERVER and /AUTO

 

/PATH - Specifies a path for Basic Backup & Basic Restore. (Initiates Basic Backup Mode)

 

/SOURCEDB - Specifies a path for use with /AUTOATTACH

 

/RESTORE - Specifies Basic Restore Mode - Requires /PATH, /USER, /PASSWORD, /DATABASE,

/SERVER and /AUTO. /OVERWRITE is required if the database exists.

 

/OVERWRITE - Specifies that if a database exists when attempting to Restore, then attempt to

overwrite the database.

Posted

Remember if you use FMS, you must use the FMS dbattach not the SIMS one or you'll make Capita cry. (FMS dbattach shouldn't have DMS support)

 

@superfletch

Did you copy that from dbattach /?, just your missing a few bits (/TRUSTED, /DMS...)

Posted (edited)

Had it sitting handy in a notepad file - must be from an older version of DBAttach I guess. Sadly I didn't have DBAttach to hand to interrogate the latest version.

 

Good knowledge matt40k, Trusted being an SQL trusted Active Directory login of course and DMS to backup the document server.

Edited by superfletch
Posted

hi guys again it works a treat but the only thing is i can't get it to connect automatically

 

here is my code

 

cd..

cd..

 

cd C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\

dbattach.exe /AUTO /SERVER="EIMS108152\SIMS2005" /USER="sa" /PASSWORD="Access21" /NOBACKUP

 

the above is only for training data so all is okay with password.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...