By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,028 Members | 1,092 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,028 IT Pros & Developers. It's quick & easy.

[?]Restore and Backup problem

P: n/a
I've a program with VB6 working with SQLServer 2000.
I have a Central Station with the program runnin with full prvileges and
that can perform all the actions on the DB.
There are also some clients that cannot be connected via LAN or internet
that need to use the same DB.
The way I solved this with Aces was to copy the Access file from the Central
Station ot the disconnected clients.
Then to update the central Staton I used to save the recordset of new data
entered from there onto files and then copy them into the Central Station.
Now I'm upgrading the program to run with SQLServer.
I can do everything but the Backup and restore of the DB.
Actually I perform the DB Backup to file with the command line

BACKUP DATABASE myDB TO DISK = 'TempFileName.bak'

This way I can save the file on a USB key or send it via email

Then I restore it on the disconnected clients using the command line

RESTORE DATABASE myDB FROM DISK ='TempFileName.bak' WITH REPLACE

Everything looks fine and seems to work, but on my testing machine I'm
having this strange behavior:

I create new datas into the DataBase, then I execute the backup and quit the
application.
I open EM and delete the just entered datas
I open the application simulating the disconnected clinet (just a string
option, the program is the same)
I execute the RESTORE
I expect hte cancelled datas to be back online, but....... the cancelled
datas is not restored.
I then open EM and execute a backup from the file I created with Backup and
...... the data goes in.
Why?
Is the problem raised only becouse the SQLServer is the same in both cases?

What I need is just to copy one DB and inserting it into a different Server.
Any idea why this is appening?
Any idea on how to do this operation?

I tryed already the RECOVERY, NORECOVERY and quite everything, but .......

Thanks in advance for your help
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Perhaps you are inadvertently appending to the backup file instead of
overwriting. Try

BACKUP DATABASE myDB TO DISK = 'TempFileName.bak' WITH INIT

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Spieg" <sp*******@tiscali.it> wrote in message
news:Wg**********************@news3.tin.it...
I've a program with VB6 working with SQLServer 2000.
I have a Central Station with the program runnin with full prvileges and
that can perform all the actions on the DB.
There are also some clients that cannot be connected via LAN or internet
that need to use the same DB.
The way I solved this with Aces was to copy the Access file from the Central Station ot the disconnected clients.
Then to update the central Staton I used to save the recordset of new data
entered from there onto files and then copy them into the Central Station.
Now I'm upgrading the program to run with SQLServer.
I can do everything but the Backup and restore of the DB.
Actually I perform the DB Backup to file with the command line

BACKUP DATABASE myDB TO DISK = 'TempFileName.bak'

This way I can save the file on a USB key or send it via email

Then I restore it on the disconnected clients using the command line

RESTORE DATABASE myDB FROM DISK ='TempFileName.bak' WITH REPLACE

Everything looks fine and seems to work, but on my testing machine I'm
having this strange behavior:

I create new datas into the DataBase, then I execute the backup and quit the application.
I open EM and delete the just entered datas
I open the application simulating the disconnected clinet (just a string
option, the program is the same)
I execute the RESTORE
I expect hte cancelled datas to be back online, but....... the cancelled
datas is not restored.
I then open EM and execute a backup from the file I created with Backup and ..... the data goes in.
Why?
Is the problem raised only becouse the SQLServer is the same in both cases?
What I need is just to copy one DB and inserting it into a different Server. Any idea why this is appening?
Any idea on how to do this operation?

I tryed already the RECOVERY, NORECOVERY and quite everything, but .......

Thanks in advance for your help

Jul 20 '05 #2

P: n/a
Right, the WITH INIT Worked, damn I read it, but ....
Thanks

"Dan Guzman" <da*******@nospam-earthlink.net> ha scritto nel messaggio
news:c3*****************@newsread2.news.pas.earthl ink.net...
Perhaps you are inadvertently appending to the backup file instead of
overwriting. Try

BACKUP DATABASE myDB TO DISK = 'TempFileName.bak' WITH INIT

--
Hope this helps.

Dan Guzman
SQL Server MVP

Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.