Showing posts with label restore. Show all posts
Showing posts with label restore. Show all posts

Tuesday, March 20, 2012

[URGENT] Problem to Restore Database from backup


Mrs,

I'm having a serious problem in SQL 2000 SP3 Database which is used Business Applications.
Today, I tryied to take backup in service time by the Enterprize Manager, the following
error occured and could not take backup.
--
Error 926 : Database '[database name]' cannot opened. It has been marked SUSPECT by recovery.
See the SQL Server errorlog for more information.
--
After that, we tried same operation 3 times. But result is same.

After sometime, end-user report us that they can not log-in to database.

So we tried to dettach this database and attached it.
We success to dettach, but we can not attached it.

Also we tried to restore this database from Yesterday's backup file by using Enterprize Manager,
but the following error occured, and could not complete.
This backup file was generated daily backup task in Maintenance Plan in Enterprize Manager.
--
Microsoft SQl-DMO(ODBC SQLState:42000)
The media family on device "E:\ccd\......xxx.bak" is incorrectly formed.
SQL Server cannot process this media family.
RESTORE DATABASE is terminating abnormally.

--

We need to recover the database immediately not to stop the end-user business process.
Please help us.

Yamagury.

refer , http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1977204&SiteID=1 try as suggested and get back.... also you need to apply SP4 or go to sql 2005 as sql 2000 sp3 has ended its life cycle in july 10th 2007 itself....

refer

http://support.microsoft.com/gp/lifesupsps

|||Thank you for your support.

Yes, We already tried to apply SP4.
But this problem was not solved.

Now I'm trying to do as your instruction.|||(you had to back up the transaction log before you perform any restore operations and hadn't detach it before.

You had to verify your backup with RESTORE VERIFYONLY statement .)

use RESTORE HEADERONLY and see if you have multiple backup files in the the same backup file. If yes then
try using FILE= option while restoring.

File is from :

RESTORE DATABASE { database_name | @.database_name_var }
< file_or_filegroup > [ ,...n ]
[ FROM < backup_device > [ ,...n ] ]
[ WITH
[ RESTRICTED_USER ]
[ [ , ] FILE = { file_number | @.file_number } ] .....


see Books Online

(Why do you have not SP4?

Read this.)

|||
Dear Deepak

I tried to create database and swap mdf/ldf file.
and go into single user mode, and then run DBCC CHECKDB with REPAIR_ALLOW_DATA_LOSS,

but, DBCC command return error. Database could not be repaired.

How can I do after this?|||

Ok you can try as follows,

Alter database DBname set emergency

this will bring your db into emergency mode so that you can access your db and then subsequently export the datas alone from this db to another db so that you can minimize the dataloss.....if you have a full backup then drop this suspect database and restore it from full backup but there will be dataloss to minimize it set the db as emergency mode and export the tables,sps etc which you feel is required to another db in UAT server and script those and rerun the script in the restored db

Sunday, March 11, 2012

[SQL 2005] Restore question

I trying to test my restore in SQL 2005. I created a DB called test_restore
and try to restore from backup but getting this error. I have tried using
"overwrite option" but the same. I also tried T-SQL statement with MOVE and
also tried using read-only DB but still the same .
Any idea?
*************************************************
Msg 3154, Level 16, State 4, Line 1
The backup set holds a backup of a database other than the existing
*****************************************************Are you trying to overwite a existing database or a new one?
--
Thanks,
Sree
[Please specify the version of Sql Server as we can save one thread and time
asking back if its 2000 or 2005]
"rupart" wrote:
> I trying to test my restore in SQL 2005. I created a DB called test_restore
> and try to restore from backup but getting this error. I have tried using
> "overwrite option" but the same. I also tried T-SQL statement with MOVE and
> also tried using read-only DB but still the same .
> Any idea?
> *************************************************
> Msg 3154, Level 16, State 4, Line 1
> The backup set holds a backup of a database other than the existing
> *****************************************************|||Hi i didnt read your question correctly...
I got the same error while trying to resotre to a created DB. So i tried
creating on a non existing DB it worked, try that way. Iam still checking on
how to overwrite the existing DB...
--
Thanks,
Sree
[Please specify the version of Sql Server as we can save one thread and time
asking back if its 2000 or 2005]
"rupart" wrote:
> I trying to test my restore in SQL 2005. I created a DB called test_restore
> and try to restore from backup but getting this error. I have tried using
> "overwrite option" but the same. I also tried T-SQL statement with MOVE and
> also tried using read-only DB but still the same .
> Any idea?
> *************************************************
> Msg 3154, Level 16, State 4, Line 1
> The backup set holds a backup of a database other than the existing
> *****************************************************|||Yes, got the answer :)
Try this...
RESTORE DATABASE Test
FROM DISK = 'D:\Adv_Test.Bak'
WITH MOVE 'AdventureWorks_Data' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\DATA\Test.mdf',
MOVE 'AdventureWorks_Log' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\DATA\Test_log.ldf',
STATS = 1, REPLACE
GO
REPLACE is the key word while trying to overwrite existing DB.
--
Thanks,
Sree
[Please specify the version of Sql Server as we can save one thread and time
asking back if its 2000 or 2005]
"rupart" wrote:
> I trying to test my restore in SQL 2005. I created a DB called test_restore
> and try to restore from backup but getting this error. I have tried using
> "overwrite option" but the same. I also tried T-SQL statement with MOVE and
> also tried using read-only DB but still the same .
> Any idea?
> *************************************************
> Msg 3154, Level 16, State 4, Line 1
> The backup set holds a backup of a database other than the existing
> *****************************************************|||hi Sreejit,
Thank you
Yes, i wanted to test the restore into another temporary db to test it.
Are you suggesting not to create the tempdb first and run the command below
straightaway? How does the db got created then?
By the way, i am restoring files and filegroups.Will this method work? Or,
do i need to specify all the filegroups names? There are long list..Any
better way? :-s
"Sreejith G" wrote:
> Yes, got the answer :)
> Try this...
>
> RESTORE DATABASE Test
> FROM DISK = 'D:\Adv_Test.Bak'
> WITH MOVE 'AdventureWorks_Data' TO 'C:\Program Files\Microsoft SQL
> Server\MSSQL.1\MSSQL\DATA\Test.mdf',
> MOVE 'AdventureWorks_Log' TO 'C:\Program Files\Microsoft SQL
> Server\MSSQL.1\MSSQL\DATA\Test_log.ldf',
> STATS = 1, REPLACE
> GO
> REPLACE is the key word while trying to overwrite existing DB.
> --
> Thanks,
> Sree
> [Please specify the version of Sql Server as we can save one thread and time
> asking back if its 2000 or 2005]
>
> "rupart" wrote:
> > I trying to test my restore in SQL 2005. I created a DB called test_restore
> > and try to restore from backup but getting this error. I have tried using
> > "overwrite option" but the same. I also tried T-SQL statement with MOVE and
> > also tried using read-only DB but still the same .
> > Any idea?
> >
> > *************************************************
> > Msg 3154, Level 16, State 4, Line 1
> > The backup set holds a backup of a database other than the existing
> > *****************************************************|||rupart wrote:
> hi Sreejit,
> Thank you
> Yes, i wanted to test the restore into another temporary db to test it.
> Are you suggesting not to create the tempdb first and run the command below
> straightaway? How does the db got created then?
> By the way, i am restoring files and filegroups.Will this method work? Or,
> do i need to specify all the filegroups names? There are long list..Any
> better way? :-s
A RESTORE will create the database if it's not already there, so there
are no need to create it before a restore. The REPLACE option, is to
tell SQL server to overwrite an existing database with the same name as
the one that has been backed up. This is to prevent you from overwriting
a database by accident. You can read up on this in Books On Line.
Regards
Steen|||hi guys,
thx a lot for your replies. I find out a few things:
1) Using GUI, to restore, click on "Database" after Instance Name, right
click, restore database or restore files and filegroup. Then, enter your db
name(or you choose your test db that you have created from drop down).
Choosing the test db directly and attempting to restore will give you error.
2) Using T-SQL.(files and filegrp to test db)
************************************************
USE master
Go
RESTORE DATABASE TestRestore
FROM DISK = 'X:\Test.bak'
WITH RECOVERY,
MOVE 'ABC_PROD' TO 'X:\ABC_PROD.mdf',
MOVE 'ABC_1' TO 'X:\ABC_1.ndf',
MOVE 'ABC_2' TO 'X:\ABC_2.ndf',
MOVE 'ABC_log' TO 'X:\ABC_log.ldf'
GO
************************************************
"rupart" wrote:
> hi Sreejit,
> Thank you
> Yes, i wanted to test the restore into another temporary db to test it.
> Are you suggesting not to create the tempdb first and run the command below
> straightaway? How does the db got created then?
> By the way, i am restoring files and filegroups.Will this method work? Or,
> do i need to specify all the filegroups names? There are long list..Any
> better way? :-s
> "Sreejith G" wrote:
> > Yes, got the answer :)
> >
> > Try this...
> >
> >
> >
> > RESTORE DATABASE Test
> > FROM DISK = 'D:\Adv_Test.Bak'
> > WITH MOVE 'AdventureWorks_Data' TO 'C:\Program Files\Microsoft SQL
> > Server\MSSQL.1\MSSQL\DATA\Test.mdf',
> > MOVE 'AdventureWorks_Log' TO 'C:\Program Files\Microsoft SQL
> > Server\MSSQL.1\MSSQL\DATA\Test_log.ldf',
> > STATS = 1, REPLACE
> > GO
> >
> > REPLACE is the key word while trying to overwrite existing DB.
> >
> > --
> > Thanks,
> > Sree
> > [Please specify the version of Sql Server as we can save one thread and time
> > asking back if its 2000 or 2005]
> >
> >
> >
> > "rupart" wrote:
> >
> > > I trying to test my restore in SQL 2005. I created a DB called test_restore
> > > and try to restore from backup but getting this error. I have tried using
> > > "overwrite option" but the same. I also tried T-SQL statement with MOVE and
> > > also tried using read-only DB but still the same .
> > > Any idea?
> > >
> > > *************************************************
> > > Msg 3154, Level 16, State 4, Line 1
> > > The backup set holds a backup of a database other than the existing
> > > *****************************************************|||rupart wrote:
> hi guys,
> thx a lot for your replies. I find out a few things:
> 1) Using GUI, to restore, click on "Database" after Instance Name, right
> click, restore database or restore files and filegroup. Then, enter your db
> name(or you choose your test db that you have created from drop down).
> Choosing the test db directly and attempting to restore will give you error.
> 2) Using T-SQL.(files and filegrp to test db)
> ************************************************
> USE master
> Go
> RESTORE DATABASE TestRestore
> FROM DISK = 'X:\Test.bak'
> WITH RECOVERY,
> MOVE 'ABC_PROD' TO 'X:\ABC_PROD.mdf',
> MOVE 'ABC_1' TO 'X:\ABC_1.ndf',
> MOVE 'ABC_2' TO 'X:\ABC_2.ndf',
> MOVE 'ABC_log' TO 'X:\ABC_log.ldf'
> GO
> ************************************************
>
Does this means that you've got it working or do you still have
problems? Your T-SQL will fail if the TestRestore database already
exists since you haven't supplied the REPLACE option.
Regards
Steen

[SQL 2005] Restore question

I trying to test my restore in SQL 2005. I created a DB called test_restore
and try to restore from backup but getting this error. I have tried using
"overwrite option" but the same. I also tried T-SQL statement with MOVE and
also tried using read-only DB but still the same .
Any idea?
****************************************
*********
Msg 3154, Level 16, State 4, Line 1
The backup set holds a backup of a database other than the existing
****************************************
*************Are you trying to overwite a existing database or a new one?
--
Thanks,
Sree
[Please specify the version of Sql Server as we can save one thread and
time
asking back if its 2000 or 2005]
"rupart" wrote:

> I trying to test my restore in SQL 2005. I created a DB called test_restor
e
> and try to restore from backup but getting this error. I have tried using
> "overwrite option" but the same. I also tried T-SQL statement with MOVE an
d
> also tried using read-only DB but still the same .
> Any idea?
> ****************************************
*********
> Msg 3154, Level 16, State 4, Line 1
> The backup set holds a backup of a database other than the existing
> ****************************************
*************|||Hi i didnt read your question correctly...
I got the same error while trying to resotre to a created DB. So i tried
creating on a non existing DB it worked, try that way. Iam still checking on
how to overwrite the existing DB...
Thanks,
Sree
[Please specify the version of Sql Server as we can save one thread and
time
asking back if its 2000 or 2005]
"rupart" wrote:

> I trying to test my restore in SQL 2005. I created a DB called test_restor
e
> and try to restore from backup but getting this error. I have tried using
> "overwrite option" but the same. I also tried T-SQL statement with MOVE an
d
> also tried using read-only DB but still the same .
> Any idea?
> ****************************************
*********
> Msg 3154, Level 16, State 4, Line 1
> The backup set holds a backup of a database other than the existing
> ****************************************
*************|||Yes, got the answer
Try this...
RESTORE DATABASE Test
FROM DISK = 'D:\Adv_Test.Bak'
WITH MOVE 'AdventureWorks_Data' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\DATA\Test.mdf',
MOVE 'AdventureWorks_Log' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\DATA\Test_log.ldf',
STATS = 1, REPLACE
GO
REPLACE is the key word while trying to overwrite existing DB.
Thanks,
Sree
[Please specify the version of Sql Server as we can save one thread and
time
asking back if its 2000 or 2005]
"rupart" wrote:

> I trying to test my restore in SQL 2005. I created a DB called test_restor
e
> and try to restore from backup but getting this error. I have tried using
> "overwrite option" but the same. I also tried T-SQL statement with MOVE an
d
> also tried using read-only DB but still the same .
> Any idea?
> ****************************************
*********
> Msg 3154, Level 16, State 4, Line 1
> The backup set holds a backup of a database other than the existing
> ****************************************
*************|||hi Sreejit,
Thank you
Yes, i wanted to test the restore into another temporary db to test it.
Are you suggesting not to create the tempdb first and run the command below
straightaway? How does the db got created then?
By the way, i am restoring files and filegroups.Will this method work? Or,
do i need to specify all the filegroups names? There are long list..Any
better way? :-s
"Sreejith G" wrote:
[vbcol=seagreen]
> Yes, got the answer
> Try this...
>
> RESTORE DATABASE Test
> FROM DISK = 'D:\Adv_Test.Bak'
> WITH MOVE 'AdventureWorks_Data' TO 'C:\Program Files\Microsoft SQL
> Server\MSSQL.1\MSSQL\DATA\Test.mdf',
> MOVE 'AdventureWorks_Log' TO 'C:\Program Files\Microsoft SQL
> Server\MSSQL.1\MSSQL\DATA\Test_log.ldf',
> STATS = 1, REPLACE
> GO
> REPLACE is the key word while trying to overwrite existing DB.
> --
> Thanks,
> Sree
> [Please specify the version of Sql Server as we can save one thread an
d time
> asking back if its 2000 or 2005]
>
> "rupart" wrote:
>|||rupart wrote:
> hi Sreejit,
> Thank you
> Yes, i wanted to test the restore into another temporary db to test it.
> Are you suggesting not to create the tempdb first and run the command belo
w
> straightaway? How does the db got created then?
> By the way, i am restoring files and filegroups.Will this method work? Or,
> do i need to specify all the filegroups names? There are long list..Any
> better way? :-s
A RESTORE will create the database if it's not already there, so there
are no need to create it before a restore. The REPLACE option, is to
tell SQL server to overwrite an existing database with the same name as
the one that has been backed up. This is to prevent you from overwriting
a database by accident. You can read up on this in Books On Line.
Regards
Steen|||hi guys,
thx a lot for your replies. I find out a few things:
1) Using GUI, to restore, click on "Database" after Instance Name, right
click, restore database or restore files and filegroup. Then, enter your db
name(or you choose your test db that you have created from drop down).
Choosing the test db directly and attempting to restore will give you error.
2) Using T-SQL.(files and filegrp to test db)
****************************************
********
USE master
Go
RESTORE DATABASE TestRestore
FROM DISK = 'X:\Test.bak'
WITH RECOVERY,
MOVE 'ABC_PROD' TO 'X:\ABC_PROD.mdf',
MOVE 'ABC_1' TO 'X:\ABC_1.ndf',
MOVE 'ABC_2' TO 'X:\ABC_2.ndf',
MOVE 'ABC_log' TO 'X:\ABC_log.ldf'
GO
****************************************
********
"rupart" wrote:
[vbcol=seagreen]
> hi Sreejit,
> Thank you
> Yes, i wanted to test the restore into another temporary db to test it.
> Are you suggesting not to create the tempdb first and run the command belo
w
> straightaway? How does the db got created then?
> By the way, i am restoring files and filegroups.Will this method work? Or,
> do i need to specify all the filegroups names? There are long list..Any
> better way? :-s
> "Sreejith G" wrote:
>|||rupart wrote:
> hi guys,
> thx a lot for your replies. I find out a few things:
> 1) Using GUI, to restore, click on "Database" after Instance Name, right
> click, restore database or restore files and filegroup. Then, enter your d
b
> name(or you choose your test db that you have created from drop down).
> Choosing the test db directly and attempting to restore will give you erro
r.
> 2) Using T-SQL.(files and filegrp to test db)
> ****************************************
********
> USE master
> Go
> RESTORE DATABASE TestRestore
> FROM DISK = 'X:\Test.bak'
> WITH RECOVERY,
> MOVE 'ABC_PROD' TO 'X:\ABC_PROD.mdf',
> MOVE 'ABC_1' TO 'X:\ABC_1.ndf',
> MOVE 'ABC_2' TO 'X:\ABC_2.ndf',
> MOVE 'ABC_log' TO 'X:\ABC_log.ldf'
> GO
> ****************************************
********
>
Does this means that you've got it working or do you still have
problems? Your T-SQL will fail if the TestRestore database already
exists since you haven't supplied the REPLACE option.
Regards
Steen

[SQL 2005] Restore question

I trying to test my restore in SQL 2005. I created a DB called test_restore
and try to restore from backup but getting this error. I have tried using
"overwrite option" but the same. I also tried T-SQL statement with MOVE and
also tried using read-only DB but still the same .
Any idea?
*************************************************
Msg 3154, Level 16, State 4, Line 1
The backup set holds a backup of a database other than the existing
************************************************** ***
Are you trying to overwite a existing database or a new one?
Thanks,
Sree
[Please specify the version of Sql Server as we can save one thread and time
asking back if its 2000 or 2005]
"rupart" wrote:

> I trying to test my restore in SQL 2005. I created a DB called test_restore
> and try to restore from backup but getting this error. I have tried using
> "overwrite option" but the same. I also tried T-SQL statement with MOVE and
> also tried using read-only DB but still the same .
> Any idea?
> *************************************************
> Msg 3154, Level 16, State 4, Line 1
> The backup set holds a backup of a database other than the existing
> ************************************************** ***
|||Hi i didnt read your question correctly...
I got the same error while trying to resotre to a created DB. So i tried
creating on a non existing DB it worked, try that way. Iam still checking on
how to overwrite the existing DB...
Thanks,
Sree
[Please specify the version of Sql Server as we can save one thread and time
asking back if its 2000 or 2005]
"rupart" wrote:

> I trying to test my restore in SQL 2005. I created a DB called test_restore
> and try to restore from backup but getting this error. I have tried using
> "overwrite option" but the same. I also tried T-SQL statement with MOVE and
> also tried using read-only DB but still the same .
> Any idea?
> *************************************************
> Msg 3154, Level 16, State 4, Line 1
> The backup set holds a backup of a database other than the existing
> ************************************************** ***
|||Yes, got the answer
Try this...
RESTORE DATABASE Test
FROM DISK = 'D:\Adv_Test.Bak'
WITH MOVE 'AdventureWorks_Data' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\DATA\Test.mdf',
MOVE 'AdventureWorks_Log' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\DATA\Test_log.ldf',
STATS = 1, REPLACE
GO
REPLACE is the key word while trying to overwrite existing DB.
Thanks,
Sree
[Please specify the version of Sql Server as we can save one thread and time
asking back if its 2000 or 2005]
"rupart" wrote:

> I trying to test my restore in SQL 2005. I created a DB called test_restore
> and try to restore from backup but getting this error. I have tried using
> "overwrite option" but the same. I also tried T-SQL statement with MOVE and
> also tried using read-only DB but still the same .
> Any idea?
> *************************************************
> Msg 3154, Level 16, State 4, Line 1
> The backup set holds a backup of a database other than the existing
> ************************************************** ***
|||hi Sreejit,
Thank you
Yes, i wanted to test the restore into another temporary db to test it.
Are you suggesting not to create the tempdb first and run the command below
straightaway? How does the db got created then?
By the way, i am restoring files and filegroups.Will this method work? Or,
do i need to specify all the filegroups names? There are long list..Any
better way? :-s
"Sreejith G" wrote:
[vbcol=seagreen]
> Yes, got the answer
> Try this...
>
> RESTORE DATABASE Test
> FROM DISK = 'D:\Adv_Test.Bak'
> WITH MOVE 'AdventureWorks_Data' TO 'C:\Program Files\Microsoft SQL
> Server\MSSQL.1\MSSQL\DATA\Test.mdf',
> MOVE 'AdventureWorks_Log' TO 'C:\Program Files\Microsoft SQL
> Server\MSSQL.1\MSSQL\DATA\Test_log.ldf',
> STATS = 1, REPLACE
> GO
> REPLACE is the key word while trying to overwrite existing DB.
> --
> Thanks,
> Sree
> [Please specify the version of Sql Server as we can save one thread and time
> asking back if its 2000 or 2005]
>
> "rupart" wrote:
|||rupart wrote:
> hi Sreejit,
> Thank you
> Yes, i wanted to test the restore into another temporary db to test it.
> Are you suggesting not to create the tempdb first and run the command below
> straightaway? How does the db got created then?
> By the way, i am restoring files and filegroups.Will this method work? Or,
> do i need to specify all the filegroups names? There are long list..Any
> better way? :-s
A RESTORE will create the database if it's not already there, so there
are no need to create it before a restore. The REPLACE option, is to
tell SQL server to overwrite an existing database with the same name as
the one that has been backed up. This is to prevent you from overwriting
a database by accident. You can read up on this in Books On Line.
Regards
Steen
|||hi guys,
thx a lot for your replies. I find out a few things:
1) Using GUI, to restore, click on "Database" after Instance Name, right
click, restore database or restore files and filegroup. Then, enter your db
name(or you choose your test db that you have created from drop down).
Choosing the test db directly and attempting to restore will give you error.
2) Using T-SQL.(files and filegrp to test db)
************************************************
USE master
Go
RESTORE DATABASE TestRestore
FROM DISK = 'X:\Test.bak'
WITH RECOVERY,
MOVE 'ABC_PROD' TO 'X:\ABC_PROD.mdf',
MOVE 'ABC_1' TO 'X:\ABC_1.ndf',
MOVE 'ABC_2' TO 'X:\ABC_2.ndf',
MOVE 'ABC_log' TO 'X:\ABC_log.ldf'
GO
************************************************
"rupart" wrote:
[vbcol=seagreen]
> hi Sreejit,
> Thank you
> Yes, i wanted to test the restore into another temporary db to test it.
> Are you suggesting not to create the tempdb first and run the command below
> straightaway? How does the db got created then?
> By the way, i am restoring files and filegroups.Will this method work? Or,
> do i need to specify all the filegroups names? There are long list..Any
> better way? :-s
> "Sreejith G" wrote:
|||rupart wrote:
> hi guys,
> thx a lot for your replies. I find out a few things:
> 1) Using GUI, to restore, click on "Database" after Instance Name, right
> click, restore database or restore files and filegroup. Then, enter your db
> name(or you choose your test db that you have created from drop down).
> Choosing the test db directly and attempting to restore will give you error.
> 2) Using T-SQL.(files and filegrp to test db)
> ************************************************
> USE master
> Go
> RESTORE DATABASE TestRestore
> FROM DISK = 'X:\Test.bak'
> WITH RECOVERY,
> MOVE 'ABC_PROD' TO 'X:\ABC_PROD.mdf',
> MOVE 'ABC_1' TO 'X:\ABC_1.ndf',
> MOVE 'ABC_2' TO 'X:\ABC_2.ndf',
> MOVE 'ABC_log' TO 'X:\ABC_log.ldf'
> GO
> ************************************************
>
Does this means that you've got it working or do you still have
problems? Your T-SQL will fail if the TestRestore database already
exists since you haven't supplied the REPLACE option.
Regards
Steen

Thursday, March 8, 2012

[Newbie] Restoring.............

Hi,
I am very new to Microsoft Technologies, infact new to database world
I have a SQL-Server 7.0 back. How can i restore it? Moreover , can i
restore this backup by using SQL-Server 2000Enterprise edition, how
should i go about it?
Any help or comments will be highly appreciated.
-Erland
Easiest in the login run is to read about the RESTORE command in Books Online. After you understand
how that RESTORE command work, you will find it natural how to work the GUI dialog in Enterprise
Manager (if you chose to use it instead of executing the RESTORE command in Query Analyzer).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Erland" <Erland.Erikson@.gmail.com> wrote in message
news:1132234090.437642.38470@.f14g2000cwb.googlegro ups.com...
> Hi,
> I am very new to Microsoft Technologies, infact new to database world
> I have a SQL-Server 7.0 back. How can i restore it? Moreover , can i
> restore this backup by using SQL-Server 2000Enterprise edition, how
> should i go about it?
> Any help or comments will be highly appreciated.
> -Erland
>
|||Tibor Karaszi wrote:
> Easiest in the login run is to read about the RESTORE command in Books Online. After you understand
> how that RESTORE command work, you will find it natural how to work the GUI dialog in Enterprise
> Manager (if you chose to use it instead of executing the RESTORE command in Query Analyzer).
>
osql
restore database blah from disk = 'c:\blah.dat'
something like that

[Newbie] Restoring.............

Hi,
I am very new to Microsoft Technologies, infact new to database world
:)I have a SQL-Server 7.0 back. How can i restore it? Moreover , can i
restore this backup by using SQL-Server 2000Enterprise edition, how
should i go about it?
Any help or comments will be highly appreciated.
-ErlandEasiest in the login run is to read about the RESTORE command in Books Online. After you understand
how that RESTORE command work, you will find it natural how to work the GUI dialog in Enterprise
Manager (if you chose to use it instead of executing the RESTORE command in Query Analyzer).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Erland" <Erland.Erikson@.gmail.com> wrote in message
news:1132234090.437642.38470@.f14g2000cwb.googlegroups.com...
> Hi,
> I am very new to Microsoft Technologies, infact new to database world
> :)I have a SQL-Server 7.0 back. How can i restore it? Moreover , can i
> restore this backup by using SQL-Server 2000Enterprise edition, how
> should i go about it?
> Any help or comments will be highly appreciated.
> -Erland
>|||Tibor Karaszi wrote:
> Easiest in the login run is to read about the RESTORE command in Books Online. After you understand
> how that RESTORE command work, you will find it natural how to work the GUI dialog in Enterprise
> Manager (if you chose to use it instead of executing the RESTORE command in Query Analyzer).
>
osql
restore database blah from disk = 'c:\blah.dat'
something like that

[Newbie] Restoring.............

Hi,
I am very new to Microsoft Technologies, infact new to database world
I have a SQL-Server 7.0 back. How can i restore it? Moreover , can i
restore this backup by using SQL-Server 2000Enterprise edition, how
should i go about it?
Any help or comments will be highly appreciated.
-ErlandEasiest in the login run is to read about the RESTORE command in Books Onlin
e. After you understand
how that RESTORE command work, you will find it natural how to work the GUI
dialog in Enterprise
Manager (if you chose to use it instead of executing the RESTORE command in
Query Analyzer).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Erland" <Erland.Erikson@.gmail.com> wrote in message
news:1132234090.437642.38470@.f14g2000cwb.googlegroups.com...
> Hi,
> I am very new to Microsoft Technologies, infact new to database world
> I have a SQL-Server 7.0 back. How can i restore it? Moreover , can i
> restore this backup by using SQL-Server 2000Enterprise edition, how
> should i go about it?
> Any help or comments will be highly appreciated.
> -Erland
>|||Tibor Karaszi wrote:
> Easiest in the login run is to read about the RESTORE command in Books Onl
ine. After you understand
> how that RESTORE command work, you will find it natural how to work the GU
I dialog in Enterprise
> Manager (if you chose to use it instead of executing the RESTORE command i
n Query Analyzer).
>
osql
restore database blah from disk = 'c:\blah.dat'
something like that

Monday, February 13, 2012

[?]Restore and Backup problem

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 helpPerhaps 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" <spiegator@.tiscali.it> wrote in message
news:WgQUc.120173$OR2.6141961@.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|||Right, the WITH INIT Worked, damn I read it, but ...
Thanks

"Dan Guzman" <danguzman@.nospam-earthlink.net> ha scritto nel messaggio
news:c3UUc.6485$3O3.6087@.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