 |
|
 |
|
Next: OLE Objects
|
| Author |
Message |
External

Since: Nov 07, 2008 Posts: 4
|
(Msg. 1) Posted: Fri Nov 07, 2008 9:43 am
Post subject: Schedule to backup MSDE 2000 to overwrite the previous file Archived from groups: microsoft>public>sqlserver>msde (more info?)
|
|
|
|
|
| Back to top |
|
 |  |
External

Since: Oct 16, 2008 Posts: 16
|
(Msg. 2) Posted: Fri Nov 07, 2008 11:57 am
Post subject: Re: Schedule to backup MSDE 2000 to overwrite the previous file [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"EX Admin" wrote in message
> Hello,
>
> I am try to backup MSDE database with the following command:
>
> OSQL -E -Q "BACKUP DATABASE MYDB TO DISK = 'C:\MYDB.bak'"
>
> It works, however, once I use windows scheduler to schedule to run the
> script daily,
>
> it appends to the file instead to overwrite it. Is there any way to
> overwrite the existing file automatically?
You need to add the WITH INIT clause to the command to force it to
"initialize" the backup file (i.e. not append).
osql -E -Q "BACKUP DATABASE MYDB TO DISK = 'C:\MYDB.bak' WITH INIT
--
Lawrence Garvin, M.S., MCITP(x2), MCTS(x5), MCP(x7), MCBMSP
Principal/CTO, Onsite Technology Solutions, Houston, Texas >> Stay informed about: Schedule to backup MSDE 2000 to overwrite the previous file |
|
| Back to top |
|
 |  |
External

Since: Nov 07, 2008 Posts: 4
|
(Msg. 3) Posted: Fri Nov 07, 2008 11:57 am
Post subject: Re: Schedule to backup MSDE 2000 to overwrite the previous file [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Thank you very much! it works. However, can I create a backup file on remote
share with the following command:
osql -E -Q "BACKUP DATABASE MYDB TO DISK = '\\myserver\sqlbak\MYDB.bak' WITH
INIT"
I got access denied to backup device '\\myserver\sqlbak\MYDB.bak'
Thanks again,
"Lawrence Garvin" wrote:
> "EX Admin" wrote in message
>
> > Hello,
> >
> > I am try to backup MSDE database with the following command:
> >
> > OSQL -E -Q "BACKUP DATABASE MYDB TO DISK = 'C:\MYDB.bak'"
> >
> > It works, however, once I use windows scheduler to schedule to run the
> > script daily,
> >
> > it appends to the file instead to overwrite it. Is there any way to
> > overwrite the existing file automatically?
>
> You need to add the WITH INIT clause to the command to force it to
> "initialize" the backup file (i.e. not append).
>
> osql -E -Q "BACKUP DATABASE MYDB TO DISK = 'C:\MYDB.bak' WITH INIT
>
>
>
> --
> Lawrence Garvin, M.S., MCITP(x2), MCTS(x5), MCP(x7), MCBMSP
> Principal/CTO, Onsite Technology Solutions, Houston, Texas
>
> >> Stay informed about: Schedule to backup MSDE 2000 to overwrite the previous file |
|
| Back to top |
|
 |  |
External

Since: Jan 10, 2008 Posts: 608
|
(Msg. 4) Posted: Fri Nov 07, 2008 3:17 pm
Post subject: Re: Schedule to backup MSDE 2000 to overwrite the previous file [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
The account that your SQL Server is running under must have rights to the
path. If you are running as Local System then you will not have those
rights.
Run the SQL Server using a domain account with appropriate rights to the
path. Then the backup will be able to reach outside the server.
RLF
"EX Admin" wrote in message
> Thank you very much! it works. However, can I create a backup file on
> remote
> share with the following command:
>
> osql -E -Q "BACKUP DATABASE MYDB TO DISK = '\\myserver\sqlbak\MYDB.bak'
> WITH
> INIT"
>
> I got access denied to backup device '\\myserver\sqlbak\MYDB.bak'
>
> Thanks again,
>
>
> "Lawrence Garvin" wrote:
>
>> "EX Admin" wrote in message
>>
>> > Hello,
>> >
>> > I am try to backup MSDE database with the following command:
>> >
>> > OSQL -E -Q "BACKUP DATABASE MYDB TO DISK = 'C:\MYDB.bak'"
>> >
>> > It works, however, once I use windows scheduler to schedule to run the
>> > script daily,
>> >
>> > it appends to the file instead to overwrite it. Is there any way to
>> > overwrite the existing file automatically?
>>
>> You need to add the WITH INIT clause to the command to force it to
>> "initialize" the backup file (i.e. not append).
>>
>> osql -E -Q "BACKUP DATABASE MYDB TO DISK = 'C:\MYDB.bak' WITH INIT
>>
>>
>>
>> --
>> Lawrence Garvin, M.S., MCITP(x2), MCTS(x5), MCP(x7), MCBMSP
>> Principal/CTO, Onsite Technology Solutions, Houston, Texas
>>
>> >> Stay informed about: Schedule to backup MSDE 2000 to overwrite the previous file |
|
| Back to top |
|
 |  |
External

Since: Nov 07, 2008 Posts: 4
|
(Msg. 5) Posted: Fri Nov 07, 2008 3:17 pm
Post subject: Re: Schedule to backup MSDE 2000 to overwrite the previous file [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
thanks for your both reponses.
"Russell Fields" wrote:
> The account that your SQL Server is running under must have rights to the
> path. If you are running as Local System then you will not have those
> rights.
>
> Run the SQL Server using a domain account with appropriate rights to the
> path. Then the backup will be able to reach outside the server.
>
> RLF
>
>
> "EX Admin" wrote in message
>
> > Thank you very much! it works. However, can I create a backup file on
> > remote
> > share with the following command:
> >
> > osql -E -Q "BACKUP DATABASE MYDB TO DISK = '\\myserver\sqlbak\MYDB.bak'
> > WITH
> > INIT"
> >
> > I got access denied to backup device '\\myserver\sqlbak\MYDB.bak'
> >
> > Thanks again,
> >
> >
> > "Lawrence Garvin" wrote:
> >
> >> "EX Admin" wrote in message
> >>
> >> > Hello,
> >> >
> >> > I am try to backup MSDE database with the following command:
> >> >
> >> > OSQL -E -Q "BACKUP DATABASE MYDB TO DISK = 'C:\MYDB.bak'"
> >> >
> >> > It works, however, once I use windows scheduler to schedule to run the
> >> > script daily,
> >> >
> >> > it appends to the file instead to overwrite it. Is there any way to
> >> > overwrite the existing file automatically?
> >>
> >> You need to add the WITH INIT clause to the command to force it to
> >> "initialize" the backup file (i.e. not append).
> >>
> >> osql -E -Q "BACKUP DATABASE MYDB TO DISK = 'C:\MYDB.bak' WITH INIT
> >>
> >>
> >>
> >> --
> >> Lawrence Garvin, M.S., MCITP(x2), MCTS(x5), MCP(x7), MCBMSP
> >> Principal/CTO, Onsite Technology Solutions, Houston, Texas
> >>
> >>
>
> >> Stay informed about: Schedule to backup MSDE 2000 to overwrite the previous file |
|
| Back to top |
|
 |  |
| Related Topics: | MSDE 1 Upgrade to MSDE 2000 SP3A - I am trying to upgrade a number of remote sites from MSDE 1 to MSDE 2000 ready. Some sites are XP/SP1 and some are XP/SP2. As yet I have had no problems with XP/SP1 sites but on some of the XP/SP2 sites I get the following error message:- Starting..
XP_CMDSHELL executes successfully on SQL 2000 but fails on.. - We have two instances of MS-SQL Server 2000 on the same Win2003 server. Both instances use a Startup Service Account (domain\sql) instead of LocalSystem. In both instances we need to use XP_CmdShell to map to a share on a NAS for backup purposes. The....
problem with installing MSDE 2000 - I have tried to install MSDE2000 on Win XP SP2 and installation failed with the error message logged in cfgsrv.out file: [Microsoft][ODBC Driver Manager] Data Source name not found and no default driver specified. I have tried to create DSN using..
Relocate MSDE 2000 database? - I'm not sure I'm posting to the right group... I hope you can help or point me to another place to look. I have a purchased application that installed and uses an MSDE 2000 database, no install choices were presented, it silently installed the ..
MSDE 2000 SP3A upgrade - I have upgraded a MSDE 1 database to MSDE SP3A. The system in question currently connects remotely to a SQL Server 7 server (this is being upgraded to SQL Server 2005 in the near future) The upgrade appears to work but once the application starts we.. |
|
You can post new topics in this forum You can reply to topics in this forum You can edit your posts in this forum You can delete your posts in this forum You can vote in polls in this forum
|
|
|
|
 |
|
|