Jump to content

Jack_Rowland

Members
  • Posts

    2
  • Joined

  • Last visited

Reputation

0 Neutral

1 Follower

About Jack_Rowland

Personal Information

  • Occupation
    Keystone MIS SIMS Support
  • Location
    Hull
  1. thank you very much for your comments, i now have it restoring instead of attaching the MDF and LDF and it is working perfect. thank you!!! you have saved me a lot of time!
  2. Hi, I have been trying to figure out how to create a Batch file to automatically detach, delete and reattach a fresh sql2012 database. We use the databases for training and after each use we re-attach the fresh database. it is a tedious process as this needs to be done almost every day. I decided to try and automate this process, so far i have been able to detach, delete and attach a new database successfully but it drops the usernames and passwords and i do not understand why. "C:\Program Files\Microsoft SQL Server\MSSQL11.SIMS2012\MSSQL\Binn\Dbattach.exe" /SERVER=".\sims2012" /DATABASE="Engwe0" /USER="SA" /PASSWORD="Password1" /AUTODETACHMODE /AUTO pause call "C:\Program Files\Microsoft SQL Server\MSSQL11.SIMS2012\MSSQL\DATA\delete.bat" pause "C:\Program Files\Microsoft SQL Server\MSSQL11.SIMS2012\MSSQL\Binn\Dbattach.exe" /SERVER=".\sims2012" /USER="SA" /Password="Password1" /DATABASE="ENGwe0" /SOURCEDB="D:\Keystone\november15traindata_sims7.166_engwe_sql/ENGwe0.mdf" /AUTOATTACHMODE /AUTO pause this is the first time i have attempted a script and also the first time I've posted here, i would greatly appreciate any thoughts you may have Thanks In Advance!
×
×
  • Create New...