+ Post New Thread
Results 1 to 7 of 7
MIS Systems Thread, Dbattach auto fill fields in Technical; Hi guy's Is there any way where you can auto fill the SQL server instance details and SA password? I ...
  1. #1

    Join Date
    Oct 2009
    Posts
    8
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Dbattach auto fill fields

    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

  2. #2
    superfletch's Avatar
    Join Date
    Nov 2007
    Location
    South
    Posts
    437
    Thank Post
    153
    Thanked 77 Times in 61 Posts
    Rep Power
    31
    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.

  3. #3

    matt40k's Avatar
    Join Date
    Jun 2008
    Location
    Ipswich
    Posts
    4,433
    Thank Post
    368
    Thanked 646 Times in 528 Posts
    Rep Power
    159
    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...)

  4. #4
    superfletch's Avatar
    Join Date
    Nov 2007
    Location
    South
    Posts
    437
    Thank Post
    153
    Thanked 77 Times in 61 Posts
    Rep Power
    31
    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.
    Last edited by superfletch; 12th October 2009 at 10:58 PM.

  5. #5

    Join Date
    Oct 2009
    Posts
    8
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Thumbs up

    Thank you for your prompt reply , I had no idea that Dbattach could do all these things.

  6. #6

    Join Date
    Oct 2009
    Posts
    8
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Question

    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.

  7. #7
    Mcshammer_dj's Avatar
    Join Date
    Feb 2007
    Location
    Portsmouth
    Posts
    944
    Thank Post
    35
    Thanked 165 Times in 133 Posts
    Rep Power
    94
    you need to add a database name to the script, you have only highlighted the server name

SHARE:
+ Post New Thread

Similar Threads

  1. DBAttach
    By TechMonkey in forum MIS Systems
    Replies: 2
    Last Post: 21st September 2009, 02:23 PM
  2. Please find 5 mins to fill this in
    By Dos_Box in forum Site Polls
    Replies: 22
    Last Post: 19th September 2009, 02:56 PM
  3. SIMS: dropping logins when using dbAttach
    By Oops_my_bad in forum MIS Systems
    Replies: 4
    Last Post: 6th February 2009, 06:15 PM
  4. Pull LDAP details to auto fill in the registation page - Moodle
    By FN-GM in forum Virtual Learning Platforms
    Replies: 1
    Last Post: 23rd May 2008, 03:13 PM
  5. DBATTACH exit code
    By ajbritton in forum MIS Systems
    Replies: 0
    Last Post: 24th November 2006, 11:31 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •