[dba-SQLServer]Restore from Command Line?

Francisco H Tapia my.lists at verizon.net
Fri Feb 28 15:05:44 CST 2003


Then I would run a command from your Access ADP that connects to the MSDE
and does nothing else but that...

With CMD
    .Commandtext = "sp_attach ....
    'more code
End with

-Francisco
http://rcm.netfirms.com
----- Original Message -----
From: "Arthur Fuller" <artful at rogers.com>
To: <dba-sqlserver at databaseadvisors.com>
Sent: Friday, February 28, 2003 12:23 PM
Subject: RE: [dba-SQLServer]Restore from Command Line?


: I have assured that I can assume that MSDE is both installed and running.
: The real issue is how to restore the database without user intervention. I
: have been assured that on all target boxes the data directory and the MSDE
: installation will be identical (the defaults on drive c:). So I'm thinking
: that the tiny-Access-app with a call to sp_attach_db_single is the way to
: go....
:
: -----Original Message-----
: From: dba-sqlserver-admin at databaseadvisors.com
: [mailto:dba-sqlserver-admin at databaseadvisors.com] On Behalf Of Francisco H
: Tapia
: Sent: February 28, 2003 10:47 AM
: To: dba-sqlserver at databaseadvisors.com
: Subject: Re: [dba-SQLServer]Restore from Command Line?
:
: I have some SQL-DMO code lying around here that checks for a running
: instance of SQL (msde) and if the local box does not have it running it
: starts the service... I'll fish around for it today and forward it when I
: find it... in any case it "should" help you...as for a command line
: restore... I have not tried this but just a wag... using a batch file to
log
: into osql might be help out in this situation but of course this assumes
: that SQL (msde) is running already...
:
: -Francisco
: http://rcm.netfirms.com
: ----- Original Message -----
: From: "Arthur Fuller" <artful at rogers.com>
: To: <dba-sqlserver at databaseadvisors.com>
: Cc: "Djabarov, Robert" <Robert.Djabarov at usaa.com>
: Sent: Friday, February 28, 2003 6:51 AM
: Subject: RE: [dba-SQLServer]Restore from Command Line?
:
:
: : I have searched BOL looking for this, so far without success. As I
: consider
: : the problem, however, a simple command-line restore may not solve it.
The
: : target machine is assumed to have a running instance of MSDE on it, but
: not
: : EM. I noticed that you cannot use the Access ADP backup and restore menu
: : options on this box. I may have to go the sp_attach_db route. I suppose
I
: : can whip up a very simple Access app that does nothing but exec
: sp_attach_db
: : and the filename.
: : Meanwhile, if you can give me a more accurate pointer to the BOL piece
you
: : meant, I'd appreciate it.
: :
: : -----Original Message-----
: : From: dba-sqlserver-admin at databaseadvisors.com
: : [mailto:dba-sqlserver-admin at databaseadvisors.com] On Behalf Of Djabarov,
: : Robert
: : Sent: February 26, 2003 12:22 PM
: : To: dba-sqlserver at databaseadvisors.com
: : Subject: RE: [dba-SQLServer]Restore from Command Line?
: :
: : bol
: :
: : ______________________________________________________
: : Robert Djabarov <http://web.usaa.com/profiles/profile.asp?EmplNum=52541>
: : Certified MS SQL Server DBA
: : Certified MS SQL Server Programmer
: : Certified MS VB Programmer
: : * (210) 913-3148 - phone
: : * (210) 753-3148 - pager
: :
:
<***************************************************************************
: : **********************>
: :
: :  -----Original Message-----
: : From: dba-sqlserver-admin at databaseadvisors.com
: : [mailto:dba-sqlserver-admin at databaseadvisors.com]  On Behalf Of Arthur
: : Fuller
: : Sent: Wednesday, February 26, 2003 10:37 AM
: : To: dba-sqlserver at databaseadvisors.com
: : Subject: [dba-SQLServer]Restore from Command Line?
: :
: : Can I restore a database from the command line (i.e. without any user
: : intervention)? The P&D wizard offers the option to execute any command
: once
: : installation is finished. The CD will contain a zip of a database
backup,
: : and I want to restore it to a known name without any user intervention.
: : TIA,
: : Arthur
: :
: :
: : _______________________________________________
: : dba-SQLServer mailing list
: : dba-SQLServer at databaseadvisors.com
: : http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
: : http://www.databaseadvisors.com
: :
:
:
: _______________________________________________
: dba-SQLServer mailing list
: dba-SQLServer at databaseadvisors.com
: http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
: http://www.databaseadvisors.com
:
: _______________________________________________
: dba-SQLServer mailing list
: dba-SQLServer at databaseadvisors.com
: http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
: http://www.databaseadvisors.com
:





More information about the dba-SQLServer mailing list