#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2008
    Posts
    78
    Rep Power
    7

    New to MSSQL backup/import


    Hi,
    I have a client who runs sql express 2005. His db guy wrote this line and uses it for task scheduler.
    Code:
    sqlcmd -S sequel-sbs\sqlexpress -i E:\Data\roster\database\Scripts\BackupCarer.sql -o E:\Data\roster\database\Scripts\BackupCarerLog.txt
    I guess its a backup script.
    In BackupCarer.sql is
    Code:
    BACKUP DATABASE [CarerData] TO  DISK = N'E:\Data\roster\Database\Backup\CarerData' WITH NOFORMAT, NOINIT,  NAME = N'CarerData-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10
    GO
    Looks like it backingup to CarerData.

    My question is, how do I import/attach that backup to sql on anotehr computer that has never had that db on it.

    Cheers.
  2. #2
  3. aCc-csU™
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    Pavia, Philippines
    Posts
    259
    Rep Power
    54
    Hi SpoojGun,

    Please see this link on MSDN on how to restore your database to another computer.

    Note that this example is for MS SQL Server 2005. If the computer you're restoring the database to has a newer version of MS SQL Server running, see the dropdown menu for those versions.

    Happy restoring!
    Software Development,
    IsleNet Consultants

    www.wyldkard.net
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2008
    Posts
    78
    Rep Power
    7
    Thanks wyldekard, but I did say in the title I am new to this. I need more step by step instructions as the page you listed doesn't help a noob much.
  6. #4
  7. aCc-csU™
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    Pavia, Philippines
    Posts
    259
    Rep Power
    54
    See this link for step by step instructions to restoring your database backup via ms sql server management studio.
    that's if you have it installed. If not you can download an express version of it here .

    for restoring your database via T-SQL, you can read this article.

    So you have two choices here, I hope the links help!
    Last edited by wyldKard; September 25th, 2011 at 09:32 PM.
    Software Development,
    IsleNet Consultants

    www.wyldkard.net
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2008
    Posts
    78
    Rep Power
    7
    Will try and let you know. Thank you.

IMN logo majestic logo threadwatch logo seochat tools logo