Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Noker Lodia
  Where is Noker Lodia?
 irvine
 California - United States
 Noker Lodia
 To: Leonard Trevor
  Where is Leonard Trevor?
 Edinburgh
 United Kingdom
 Leonard Trevor
 Tags
Subject: RE: Creating a backup copy of a database in SQL Server
Thread ID: 104154 Message ID: 104229 # Views: 2 # Ratings: 0
Version: Visual FoxPro 6 Category: Databases, Tables and SQL Server
Date: Monday, August 14, 2006 12:16:33 AM         
   


> Thank you very much.
>
>
> How do you make a copy of a database say :
>
> nortwind as nortwind1 within the database folder in sql server.
>
>
> > > What is the process required to make a backup copy of a database in sql server into a different directory or a replica on the same computer.?
> > >
> > > How do you copy a datafile from one database in one environment to another database in sql server?
> > >
> > > any help please ?
> > >
> > > Thank you

> >
> > SQLEXEC(gnHndl,[SELECT * FROM MyTable],[TmpCursor])
> > SELECT(TmpCursor]
> > COPY TO [Path2\MyBackupTable]
> >
> > Ken
> > You shall know the truth - and the truth shall set you free. (John 8:33)


Try this:

oMyServer = CreateObject('SQLDMO.SQLServer')
oBackup = CreateObject('SQLDMO.backup)
oBackup = CreateObject('SQLDMO.backup')
oMyServer.LoginSecure = .T.
oMyServer.Connect([SQL Server Name])
oBackup.Database = [Database Name]
oBackup.Files = [Backup File Name]
oBackup.SQLBackup(oMyServer)
RELEASE oBackup
oMyServer.DisConnect
RELEASE oMyServer


Noker Lodia
The interesting thing about life is that we all have our own contradictions.

ENTIRE THREAD

Creating a backup copy of a database in SQL Server Posted by Leonard Trevor @ 8/12/2006 7:34:30 AM
RE: Creating a backup copy of a database in SQL Server Posted by Ken Murphy @ 8/12/2006 2:56:03 PM
RE: Creating a backup copy of a database in SQL Server Posted by Leonard Trevor @ 8/12/2006 4:58:10 PM
RE: Creating a backup copy of a database in SQL Server Posted by Hans de Groot @ 8/13/2006 2:38:21 PM
RE: Creating a backup copy of a database in SQL Server Posted by Noker Lodia @ 8/14/2006 12:16:33 AM
RE: Creating a backup copy of a database in SQL Server Posted by Andy Kramek @ 8/13/2006 3:49:03 PM