Showing posts with label computer. Show all posts
Showing posts with label computer. Show all posts

Friday, March 30, 2012

restore db with script?

Hi all.
I have a sql server backup file for SQL Server 2000.
Is there a way to bring this file to another computer with SQL and run a
script that tells the server to restore the backup file automatically
without using the GUI?
Thanks in advance.Yes, on the target machine, schedule a T-sql job to run a restore command,
see restore syntax in BOL.
Ray Higdon MCSE, MCDBA, CCNA
--
"Daniel" <dhw377@.nothing.no.spam.com> wrote in message
news:pHYMb.1223$ZJ1.790@.lakeread01...
quote:

> Hi all.
> I have a sql server backup file for SQL Server 2000.
> Is there a way to bring this file to another computer with SQL and run a
> script that tells the server to restore the backup file automatically
> without using the GUI?
>
> Thanks in advance.
>

restore db with script?

Hi all.
I have a sql server backup file for SQL Server 2000.
Is there a way to bring this file to another computer with SQL and run a
script that tells the server to restore the backup file automatically
without using the GUI?
Thanks in advance.Yes, on the target machine, schedule a T-sql job to run a restore command,
see restore syntax in BOL.
--
Ray Higdon MCSE, MCDBA, CCNA
--
"Daniel" <dhw377@.nothing.no.spam.com> wrote in message
news:pHYMb.1223$ZJ1.790@.lakeread01...
> Hi all.
> I have a sql server backup file for SQL Server 2000.
> Is there a way to bring this file to another computer with SQL and run a
> script that tells the server to restore the backup file automatically
> without using the GUI?
>
> Thanks in advance.
>

Friday, March 23, 2012

Restore Database from file

Hello, I had backed up a database from SQL 2000, just before I format my computer. Now I have installed SQL 2005 and trying to restore that database to it, it doesn't work and I get the following error when doing that

===================================

Restore failed for Server 'localhost\SQLEXPRESS'. (Microsoft.SqlServer.Express.Smo)


For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476


Program Location:

at Microsoft.SqlServer.Management.Smo.Restore.SqlRestore(Server srv)
at Microsoft.SqlServer.Management.SqlManagerUI.SqlRestoreDatabaseOptions.RunRestore()

===================================

System.Data.SqlClient.SqlError: The backup set holds a backup of a database other than the existing '2for1' database. (Microsoft.SqlServer.Express.Smo)


For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&LinkId=20476


Program Location:

at Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteNonQueryWithMessage(StringCollection queries, ServerMessageEventHandler dbccMessageHandler, Boolean errorsAsMessages)
at Microsoft.SqlServer.Management.Smo.BackupRestoreBase.ExecuteSql(Server server, StringCollection queries)
at Microsoft.SqlServer.Management.Smo.Restore.SqlRestore(Server srv)

========================================================

any help is appreciated

Thanks,

COuld you please post the command you were issueing in your program ?

-Jens Suessmeyer.|||

Thank you for your kind reply.

I didn't use command to restore the database from file but I did it through SQL Server Management Studio Express CTP

|||

I've also tried the following command to restore from file

RESTORE DATABASE [2for1] FROM DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\db' WITH FILE = 1, NOUNLOAD, STATS = 10

GO

|||

Hi,

I guess your are not the same as from the server your backup was originally taken from, right ? Then you have to use the WITH MOVE option. (From BOL)

[ [ , ] MOVE 'logical_file_name' TO 'operating_system_file_name' ]

This will help you to place them on a destination that exists on your system.

HTH, jens Suessmeyer.

Wednesday, March 21, 2012

Restore Database Fails

I'm trying to use ADO to restore a SQL 7 database using a backup file. The
database already exists on the target computer, and is named the same as on
the source computer, and the MDF and LDF files are named the same as well.

I am running the below in a stored procedure:

RESTORE DATABASE DB1
FROM DISK = 'c:\mssql7\backup\DB1.bak'
WITH MOVE 'DB1' TO 'c:\mssql7\data\DB1.mdf',
MOVE 'DB1_log' TO 'c:\mssql7\data\DB1_log.ldf'

And I get an error message "File 'DB1' is not a database file for database
'DB1' ".

I also tried it without the LDF file in the expression. Same results.

Thanks.Neil (nospam@.nospam.net) writes:

Quote:

Originally Posted by

I'm trying to use ADO to restore a SQL 7 database using a backup file.
The database already exists on the target computer, and is named the
same as on the source computer, and the MDF and LDF files are named the
same as well.
>
I am running the below in a stored procedure:
>
RESTORE DATABASE DB1
FROM DISK = 'c:\mssql7\backup\DB1.bak'
WITH MOVE 'DB1' TO 'c:\mssql7\data\DB1.mdf',
MOVE 'DB1_log' TO 'c:\mssql7\data\DB1_log.ldf'
>
And I get an error message "File 'DB1' is not a database file for database
'DB1' ".


Add ", REPLACE" to your command.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||OK, replaced the original command with:

RESTORE DATABASE DB1
FROM DISK = 'c:\mssql7\backup\DB1.bak'
WITH MOVE DB1 TO 'c:\mssql7\data\DB1.mdf',
MOVE DB1_log' TO 'c:\mssql7\data\DB1_log.ldf',
REPLACE

Got the same error message.

"Erland Sommarskog" <esquel@.sommarskog.sewrote in message
news:Xns9945EC53F9A4BYazorman@.127.0.0.1...

Quote:

Originally Posted by

Neil (nospam@.nospam.net) writes:

Quote:

Originally Posted by

>I'm trying to use ADO to restore a SQL 7 database using a backup file.
>The database already exists on the target computer, and is named the
>same as on the source computer, and the MDF and LDF files are named the
>same as well.
>>
>I am running the below in a stored procedure:
>>
>RESTORE DATABASE DB1
>FROM DISK = 'c:\mssql7\backup\DB1.bak'
>WITH MOVE 'DB1' TO 'c:\mssql7\data\DB1.mdf',
>MOVE 'DB1_log' TO 'c:\mssql7\data\DB1_log.ldf'
>>
>And I get an error message "File 'DB1' is not a database file for
>database
>'DB1' ".


>
Add ", REPLACE" to your command.
>
>
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

|||As a followup to my previous message, I also tried the modified command
directly from Query Analyzer, and got the same message. I then tried to
restore the backup file from Enterprise Manager, and it worked fine. But
couldn't get the SQL to work.

However, I still need to get it to work, as I have an associate who needs to
restore the same backup set, but he doesn't have QA or EM. He's running the
SQL in a stored procedure using ADO.

Thanks,

Neil

"Erland Sommarskog" <esquel@.sommarskog.sewrote in message
news:Xns9945EC53F9A4BYazorman@.127.0.0.1...

Quote:

Originally Posted by

Neil (nospam@.nospam.net) writes:

Quote:

Originally Posted by

>I'm trying to use ADO to restore a SQL 7 database using a backup file.
>The database already exists on the target computer, and is named the
>same as on the source computer, and the MDF and LDF files are named the
>same as well.
>>
>I am running the below in a stored procedure:
>>
>RESTORE DATABASE DB1
>FROM DISK = 'c:\mssql7\backup\DB1.bak'
>WITH MOVE 'DB1' TO 'c:\mssql7\data\DB1.mdf',
>MOVE 'DB1_log' TO 'c:\mssql7\data\DB1_log.ldf'
>>
>And I get an error message "File 'DB1' is not a database file for
>database
>'DB1' ".


>
Add ", REPLACE" to your command.
>
>
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

|||OK, I got it to work. Seems I was using MOVE to move the MDF and LDF to
those locations; but the MDF and LDF for the database that was being
overwritten were already at those locations. So I removed the MOVE commands,
and it worked fine. The final version was:

RESTORE DATABASE DB1
FROM DISK = 'c:\mssql7\backup\DB1.bak'
WITH RESTORE

Thanks!

Neil

"Erland Sommarskog" <esquel@.sommarskog.sewrote in message
news:Xns9945EC53F9A4BYazorman@.127.0.0.1...

Quote:

Originally Posted by

Neil (nospam@.nospam.net) writes:

Quote:

Originally Posted by

>I'm trying to use ADO to restore a SQL 7 database using a backup file.
>The database already exists on the target computer, and is named the
>same as on the source computer, and the MDF and LDF files are named the
>same as well.
>>
>I am running the below in a stored procedure:
>>
>RESTORE DATABASE DB1
>FROM DISK = 'c:\mssql7\backup\DB1.bak'
>WITH MOVE 'DB1' TO 'c:\mssql7\data\DB1.mdf',
>MOVE 'DB1_log' TO 'c:\mssql7\data\DB1_log.ldf'
>>
>And I get an error message "File 'DB1' is not a database file for
>database
>'DB1' ".


>
Add ", REPLACE" to your command.
>
>
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

|||Neil (nospam@.nospam.net) writes:

Quote:

Originally Posted by

OK, replaced the original command with:
>
RESTORE DATABASE DB1
FROM DISK = 'c:\mssql7\backup\DB1.bak'
WITH MOVE DB1 TO 'c:\mssql7\data\DB1.mdf',
MOVE DB1_log' TO 'c:\mssql7\data\DB1_log.ldf',
REPLACE
>
Got the same error message.


The the problem is that the logical names of the files are not DB1 and
DB1_log. You can retrieve these names with RESTORE FILELISTONLY.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Monday, March 12, 2012

Restore Data

Dear all,
I would like to know how can I restore the MSSQL database? I copied the
abc.mdf and abc.ldf files from another computer. I want to know how can I
restore the data in my computer just using these 2 files. Thank you for all
of your help.
Alex
hi Alex,
"alex" <a@.a.com> ha scritto nel messaggio
news:OMP5qnQWEHA.1488@.TK2MSFTNGP09.phx.gbl...
> Dear all,
> I would like to know how can I restore the MSSQL database? I copied
the
> abc.mdf and abc.ldf files from another computer. I want to know how can I
> restore the data in my computer just using these 2 files. Thank you for
all
> of your help.
if you already have the data .Mdf file and log .Ldf file building the
database, you don't have to restore it but just attach it to your MSDE
instance... a database restore can only be performed using a database
backup, which is not a physical copy of the physical files... further info
at
http://msdn.microsoft.com/library/de...ackpc_7cft.asp
in order to perform this task, you have to use the system stored procedure
sp_attach_db, similar to
EXEC sp_attach_db @.dbname = 'your_dbname'
, @.filename1 = '..\full data path of\abc.mdf'
, @.filename2 = '..\full data path of\abc.ldf'
with the query tool interface of your choice... please have a look at
http://msdn.microsoft.com/library/de...ae-az_52oy.asp
for sp_attach_db synopsis and further info about it...
for your convenience, you can have a look at a free prj of mine, available
at the link following my sign., which provide a user interface similar to
Enterprise Manager, that includes this feature too...
hth
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||Thx Andrea. I have tried the store procedure sp_attach_db; however, when I
executed the procedure, it showed me the following error messages:
Could not attach the database because the character Set, Sort Order, or
Unicode Collation for the database differs from this server.
warning: sort order 52 in database differs from server sort order of
197
warning: Unicode Language locale 1033 in database differs from Server
Unicode language locale of 1028
I would like to ask how can i solve this problem. Thank you for all of your
help.
Alex
"Andrea Montanari" <andrea.sqlDMO@.virgilio.it> gl
news:2jt4t4F14gi9gU1@.uni-berlin.de...[vbcol=seagreen]
> hi Alex,
> "alex" <a@.a.com> ha scritto nel messaggio
> news:OMP5qnQWEHA.1488@.TK2MSFTNGP09.phx.gbl...
> the
I
> all
> if you already have the data .Mdf file and log .Ldf file building the
> database, you don't have to restore it but just attach it to your MSDE
> instance... a database restore can only be performed using a database
> backup, which is not a physical copy of the physical files... further info
> at
>
http://msdn.microsoft.com/library/de...us/howtosql/ht
_7_backpc_7cft.asp
> in order to perform this task, you have to use the system stored procedure
> sp_attach_db, similar to
> EXEC sp_attach_db @.dbname = 'your_dbname'
> , @.filename1 = '..\full data path of\abc.mdf'
> , @.filename2 = '..\full data path of\abc.ldf'
> with the query tool interface of your choice... please have a look at
>
http://msdn.microsoft.com/library/de...us/tsqlref/ts_
sp_ae-az_52oy.asp
> for sp_attach_db synopsis and further info about it...
> for your convenience, you can have a look at a free prj of mine, available
> at the link following my sign., which provide a user interface similar to
> Enterprise Manager, that includes this feature too...
> hth
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
> DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
> -- remove DMO to reply
>
|||hi Alex,
"alex" <a@.a.com> ha scritto nel messaggio
news:OAmiowYWEHA.3420@.TK2MSFTNGP12.phx.gbl...
> Thx Andrea. I have tried the store procedure sp_attach_db; however, when
I
> executed the procedure, it showed me the following error messages:
> Could not attach the database because the character Set, Sort Order,
or
> Unicode Collation for the database differs from this server.
> warning: sort order 52 in database differs from server sort order of
> 197
> warning: Unicode Language locale 1033 in database differs from Server
> Unicode language locale of 1028
> I would like to ask how can i solve this problem. Thank you for all of
your
> help.
are you perhaps running a SQL Server 7.0 instance?
on tha version, the Character Set and Sort Order rules must be the same on
both servers in order to "migrate" a database via attach/restore method..
if this is the case, you shoul'd perform the migration via DTS, if the 2
servers are bound in a lan, or script the database out, both database schema
and data...
database schema can be scripted out via Enterprise Manager, while data can
be pushed to file (and later loaded to SQL Server database) with BCP (Bulk
Copy Program),
http://msdn.microsoft.com/library/de...p_bcp_61et.asp ,
SQL Server MVP Narayana Vyas Kondreddi world famous INSERT INTO stored
procedure ( http://vyaskn.tripod.com/code.htm#inserts ) or have a look at a
free prj of mine at the link following my sign., which provide a user
interface similar to Enterprise Manager that includes this feature too...
DDL schema generation sql scripts and INSERT INTO scripts can be later run
via oSql.exe and/or Query Analyzer..
the other way, is to rebuild your destination SQL Server instance with the
same Character Set and Sort Order rules as the originating server...
SQL Server 2000 and MSDE 2000 allow collations bot at database level and
column level...
http://msdn.microsoft.com/library/de...ation_72pg.asp
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply

Friday, March 9, 2012

restore backup (.bak) on another computer

We are running SQL Server 2000 on a single computer. We currently backup
once a week into .bak files which we keep on file. However, if this compute
r
were to fail we would have to reinstall software on a new machine. How can
we restore the old database files from the backups? I have installed SQL
Server on a test machine and found that you can't just restore. The new SQL
Server doesn't immediately recognize the backups from another computer.
Does anyone know how to do this?How do you try to do the restore and what is it that doesn't work?
Have you tried looking up the RESTORE command in BOL? In QA you can run :
RESTORE DATABASE YourDataBase FROM DISK =
'\\YourBackupLocation\YourBackupFile.BAK' WITH
RECOVERY, MOVE 'LogicalDataFileName' TO 'YourDatabasePath',
MOVE 'LogicalLogFileName' TO 'YourLogFilePath'
You can also do it from EM - right click on Databases ->All Task-> Restore
Database.
Regards
Steen
gl330k wrote:
> We are running SQL Server 2000 on a single computer. We currently
> backup once a week into .bak files which we keep on file. However,
> if this computer were to fail we would have to reinstall software on
> a new machine. How can we restore the old database files from the
> backups? I have installed SQL Server on a test machine and found
> that you can't just restore. The new SQL Server doesn't immediately
> recognize the backups from another computer.
> Does anyone know how to do this?|||Have a look at HOW TO: Move Databases Between Computers That Are Running SQL
Server
http://support.microsoft.com/defaul...kb;en-us;314546
"gl330k" wrote:

> We are running SQL Server 2000 on a single computer. We currently backup
> once a week into .bak files which we keep on file. However, if this compu
ter
> were to fail we would have to reinstall software on a new machine. How ca
n
> we restore the old database files from the backups? I have installed SQL
> Server on a test machine and found that you can't just restore. The new S
QL
> Server doesn't immediately recognize the backups from another computer.
> Does anyone know how to do this?|||I don't know much about SQL Server seeing as we only have one machine runnin
g
it and it is the foundation for a Solomon accounting program. I tried the
article you mentioned but it really didn't help me. The problem is that I
don't know where/what the "with restore" options are.
Here's what I just tried:
I have a database backup called woh.bak. I created a woh database in new
SQL Server 2000 (on the new machine). Then I backed it up as the name above
.
I copied the original backup over the new woh.bak and restored it from
there. Apparently there is data but I don't know how to verify yet if the
data is all accurate. (IOW - i still need to install Solomon.)
Does this sound like a recipe for disaster to anyone?
"Ana Mihalj" wrote:
[vbcol=seagreen]
> Have a look at HOW TO: Move Databases Between Computers That Are Running S
QL
> Server
> http://support.microsoft.com/defaul...kb;en-us;314546
> "gl330k" wrote:
>|||I'd assume that if you have some data in the database after the restore,
you'll have it all. A restore will either fail or succeed - it won't just
restore a part of the data. If you're not sure about it, I think the only
thing you can do is to look at the data from the accounting program and then
verify that it looks ok - I doubt that any of us can help you with
that...:-).
A good tip might be to read about BACKUP and RESTORE in Books On Line or the
links below. That might help you in the future.
BACKUP : http://msdn.microsoft.com/library/e..._ba-bz_35ww.asp
RESTORE: http://msdn.microsoft.com/library/e..._ra-rz_25rm.asp
Regards
Steen
gl330k wrote:[vbcol=seagreen]
> I don't know much about SQL Server seeing as we only have one machine
> running it and it is the foundation for a Solomon accounting program.
> I tried the article you mentioned but it really didn't help me. The
> problem is that I don't know where/what the "with restore" options
> are.
> Here's what I just tried:
> I have a database backup called woh.bak. I created a woh database in
> new SQL Server 2000 (on the new machine). Then I backed it up as the
> name above. I copied the original backup over the new woh.bak and
> restored it from there. Apparently there is data but I don't know
> how to verify yet if the data is all accurate. (IOW - i still need
> to install Solomon.)
> Does this sound like a recipe for disaster to anyone?
>
>
> "Ana Mihalj" wrote:
>

restore backup (.bak) on another computer

We are running SQL Server 2000 on a single computer. We currently backup
once a week into .bak files which we keep on file. However, if this computer
were to fail we would have to reinstall software on a new machine. How can
we restore the old database files from the backups? I have installed SQL
Server on a test machine and found that you can't just restore. The new SQL
Server doesn't immediately recognize the backups from another computer.
Does anyone know how to do this?
How do you try to do the restore and what is it that doesn't work?
Have you tried looking up the RESTORE command in BOL? In QA you can run :
RESTORE DATABASE YourDataBase FROM DISK =
'\\YourBackupLocation\YourBackupFile.BAK' WITH
RECOVERY, MOVE 'LogicalDataFileName' TO 'YourDatabasePath',
MOVE 'LogicalLogFileName' TO 'YourLogFilePath'
You can also do it from EM - right click on Databases ->All Task-> Restore
Database.
Regards
Steen
gl330k wrote:
> We are running SQL Server 2000 on a single computer. We currently
> backup once a week into .bak files which we keep on file. However,
> if this computer were to fail we would have to reinstall software on
> a new machine. How can we restore the old database files from the
> backups? I have installed SQL Server on a test machine and found
> that you can't just restore. The new SQL Server doesn't immediately
> recognize the backups from another computer.
> Does anyone know how to do this?
|||Have a look at HOW TO: Move Databases Between Computers That Are Running SQL
Server
http://support.microsoft.com/default...b;en-us;314546
"gl330k" wrote:

> We are running SQL Server 2000 on a single computer. We currently backup
> once a week into .bak files which we keep on file. However, if this computer
> were to fail we would have to reinstall software on a new machine. How can
> we restore the old database files from the backups? I have installed SQL
> Server on a test machine and found that you can't just restore. The new SQL
> Server doesn't immediately recognize the backups from another computer.
> Does anyone know how to do this?
|||I don't know much about SQL Server seeing as we only have one machine running
it and it is the foundation for a Solomon accounting program. I tried the
article you mentioned but it really didn't help me. The problem is that I
don't know where/what the "with restore" options are.
Here's what I just tried:
I have a database backup called woh.bak. I created a woh database in new
SQL Server 2000 (on the new machine). Then I backed it up as the name above.
I copied the original backup over the new woh.bak and restored it from
there. Apparently there is data but I don't know how to verify yet if the
data is all accurate. (IOW - i still need to install Solomon.)
Does this sound like a recipe for disaster to anyone?
"Ana Mihalj" wrote:
[vbcol=seagreen]
> Have a look at HOW TO: Move Databases Between Computers That Are Running SQL
> Server
> http://support.microsoft.com/default...b;en-us;314546
> "gl330k" wrote:
|||I'd assume that if you have some data in the database after the restore,
you'll have it all. A restore will either fail or succeed - it won't just
restore a part of the data. If you're not sure about it, I think the only
thing you can do is to look at the data from the accounting program and then
verify that it looks ok - I doubt that any of us can help you with
that...:-).
A good tip might be to read about BACKUP and RESTORE in Books On Line or the
links below. That might help you in the future.
BACKUP : http://msdn.microsoft.com/library/en...ba-bz_35ww.asp
RESTORE: http://msdn.microsoft.com/library/en...ra-rz_25rm.asp
Regards
Steen
gl330k wrote:[vbcol=seagreen]
> I don't know much about SQL Server seeing as we only have one machine
> running it and it is the foundation for a Solomon accounting program.
> I tried the article you mentioned but it really didn't help me. The
> problem is that I don't know where/what the "with restore" options
> are.
> Here's what I just tried:
> I have a database backup called woh.bak. I created a woh database in
> new SQL Server 2000 (on the new machine). Then I backed it up as the
> name above. I copied the original backup over the new woh.bak and
> restored it from there. Apparently there is data but I don't know
> how to verify yet if the data is all accurate. (IOW - i still need
> to install Solomon.)
> Does this sound like a recipe for disaster to anyone?
>
>
> "Ana Mihalj" wrote:

restore backup (.bak) on another computer

We are running SQL Server 2000 on a single computer. We currently backup
once a week into .bak files which we keep on file. However, if this computer
were to fail we would have to reinstall software on a new machine. How can
we restore the old database files from the backups? I have installed SQL
Server on a test machine and found that you can't just restore. The new SQL
Server doesn't immediately recognize the backups from another computer.
Does anyone know how to do this?How do you try to do the restore and what is it that doesn't work?
Have you tried looking up the RESTORE command in BOL? In QA you can run :
RESTORE DATABASE YourDataBase FROM DISK ='\\YourBackupLocation\YourBackupFile.BAK' WITH
RECOVERY, MOVE 'LogicalDataFileName' TO 'YourDatabasePath',
MOVE 'LogicalLogFileName' TO 'YourLogFilePath'
You can also do it from EM - right click on Databases ->All Task-> Restore
Database.
Regards
Steen
gl330k wrote:
> We are running SQL Server 2000 on a single computer. We currently
> backup once a week into .bak files which we keep on file. However,
> if this computer were to fail we would have to reinstall software on
> a new machine. How can we restore the old database files from the
> backups? I have installed SQL Server on a test machine and found
> that you can't just restore. The new SQL Server doesn't immediately
> recognize the backups from another computer.
> Does anyone know how to do this?|||Have a look at HOW TO: Move Databases Between Computers That Are Running SQL
Server
http://support.microsoft.com/default.aspx?scid=kb;en-us;314546
"gl330k" wrote:
> We are running SQL Server 2000 on a single computer. We currently backup
> once a week into .bak files which we keep on file. However, if this computer
> were to fail we would have to reinstall software on a new machine. How can
> we restore the old database files from the backups? I have installed SQL
> Server on a test machine and found that you can't just restore. The new SQL
> Server doesn't immediately recognize the backups from another computer.
> Does anyone know how to do this?|||I don't know much about SQL Server seeing as we only have one machine running
it and it is the foundation for a Solomon accounting program. I tried the
article you mentioned but it really didn't help me. The problem is that I
don't know where/what the "with restore" options are.
Here's what I just tried:
I have a database backup called woh.bak. I created a woh database in new
SQL Server 2000 (on the new machine). Then I backed it up as the name above.
I copied the original backup over the new woh.bak and restored it from
there. Apparently there is data but I don't know how to verify yet if the
data is all accurate. (IOW - i still need to install Solomon.)
Does this sound like a recipe for disaster to anyone?
"Ana Mihalj" wrote:
> Have a look at HOW TO: Move Databases Between Computers That Are Running SQL
> Server
> http://support.microsoft.com/default.aspx?scid=kb;en-us;314546
> "gl330k" wrote:
> > We are running SQL Server 2000 on a single computer. We currently backup
> > once a week into .bak files which we keep on file. However, if this computer
> > were to fail we would have to reinstall software on a new machine. How can
> > we restore the old database files from the backups? I have installed SQL
> > Server on a test machine and found that you can't just restore. The new SQL
> > Server doesn't immediately recognize the backups from another computer.
> >
> > Does anyone know how to do this?|||I'd assume that if you have some data in the database after the restore,
you'll have it all. A restore will either fail or succeed - it won't just
restore a part of the data. If you're not sure about it, I think the only
thing you can do is to look at the data from the accounting program and then
verify that it looks ok - I doubt that any of us can help you with
that...:-).
A good tip might be to read about BACKUP and RESTORE in Books On Line or the
links below. That might help you in the future.
BACKUP : http://msdn.microsoft.com/library/en-us/tsqlref/ts_ba-bz_35ww.asp
RESTORE: http://msdn.microsoft.com/library/en-us/tsqlref/ts_ra-rz_25rm.asp
Regards
Steen
gl330k wrote:
> I don't know much about SQL Server seeing as we only have one machine
> running it and it is the foundation for a Solomon accounting program.
> I tried the article you mentioned but it really didn't help me. The
> problem is that I don't know where/what the "with restore" options
> are.
> Here's what I just tried:
> I have a database backup called woh.bak. I created a woh database in
> new SQL Server 2000 (on the new machine). Then I backed it up as the
> name above. I copied the original backup over the new woh.bak and
> restored it from there. Apparently there is data but I don't know
> how to verify yet if the data is all accurate. (IOW - i still need
> to install Solomon.)
> Does this sound like a recipe for disaster to anyone?
>
>
> "Ana Mihalj" wrote:
>> Have a look at HOW TO: Move Databases Between Computers That Are
>> Running SQL Server
>> http://support.microsoft.com/default.aspx?scid=kb;en-us;314546
>> "gl330k" wrote:
>> We are running SQL Server 2000 on a single computer. We currently
>> backup once a week into .bak files which we keep on file. However,
>> if this computer were to fail we would have to reinstall software
>> on a new machine. How can we restore the old database files from
>> the backups? I have installed SQL Server on a test machine and
>> found that you can't just restore. The new SQL Server doesn't
>> immediately recognize the backups from another computer.
>> Does anyone know how to do this?

Tuesday, February 21, 2012

Restore ...

1. I backedup databases from mssql7 default pathname with default pathname o
nto
tape.
2. I installed sql 2000 server onto another computer.
3. I restored data into the default directory that was created with MSSQL7
c:\...\MSSQL7\... from tape created in step 1.
4. In Enterprise Manager for sql 2000, I do see default databases. But I
don't see the ones I restored.
5. How can I view the databases I backed up in step 1? I have over 50
databases.
Thank you for your help!
-Me"Me" <Me@.discussions.microsoft.com> wrote in message
news:5AAF668E-EACB-422E-8F64-5B4AB1DE0EB5@.microsoft.com...
> 1. I backedup databases from mssql7 default pathname with default pathname
> onto
> tape.
> 2. I installed sql 2000 server onto another computer.
> 3. I restored data into the default directory that was created with MSSQL7
> c:\...\MSSQL7\... from tape created in step 1.
> 4. In Enterprise Manager for sql 2000, I do see default databases. But I
> don't see the ones I restored.
> 5. How can I view the databases I backed up in step 1? I have over 50
> databases.
sp_attach_db

> Thank you for your help!
> -Me
>
>
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html|||In article <OcYIPMnjHHA.3472@.TK2MSFTNGP04.phx.gbl>,
mooregr_deleteth1s@.greenms.com says...
> "Me" <Me@.discussions.microsoft.com> wrote in message
> news:5AAF668E-EACB-422E-8F64-5B4AB1DE0EB5@.microsoft.com...
> sp_attach_db
>
>
>
actually several of them -- max of 16 per execution IIRC. Check out BOL
for more info
--
Graham (Pete) Berry
PeteBerry@.CalTech.edu

Restore ...

1. I backedup databases from mssql7 default pathname with default pathname onto
tape.
2. I installed sql 2000 server onto another computer.
3. I restored data into the default directory that was created with MSSQL7
c:\...\MSSQL7\... from tape created in step 1.
4. In Enterprise Manager for sql 2000, I do see default databases. But I
don't see the ones I restored.
5. How can I view the databases I backed up in step 1? I have over 50
databases.
Thank you for your help!
-Me
"Me" <Me@.discussions.microsoft.com> wrote in message
news:5AAF668E-EACB-422E-8F64-5B4AB1DE0EB5@.microsoft.com...
> 1. I backedup databases from mssql7 default pathname with default pathname
> onto
> tape.
> 2. I installed sql 2000 server onto another computer.
> 3. I restored data into the default directory that was created with MSSQL7
> c:\...\MSSQL7\... from tape created in step 1.
> 4. In Enterprise Manager for sql 2000, I do see default databases. But I
> don't see the ones I restored.
> 5. How can I view the databases I backed up in step 1? I have over 50
> databases.
sp_attach_db

> Thank you for your help!
> -Me
>
>
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html
|||In article <OcYIPMnjHHA.3472@.TK2MSFTNGP04.phx.gbl>,
mooregr_deleteth1s@.greenms.com says...
> "Me" <Me@.discussions.microsoft.com> wrote in message
> news:5AAF668E-EACB-422E-8F64-5B4AB1DE0EB5@.microsoft.com...
> sp_attach_db
>
>
>
actually several of them -- max of 16 per execution IIRC. Check out BOL
for more info
Graham (Pete) Berry
PeteBerry@.CalTech.edu

Restore ...

1. I backedup databases from mssql7 default pathname with default pathname onto
tape.
2. I installed sql 2000 server onto another computer.
3. I restored data into the default directory that was created with MSSQL7
c:\...\MSSQL7\... from tape created in step 1.
4. In Enterprise Manager for sql 2000, I do see default databases. But I
don't see the ones I restored.
5. How can I view the databases I backed up in step 1? I have over 50
databases.
Thank you for your help!
-Me"Me" <Me@.discussions.microsoft.com> wrote in message
news:5AAF668E-EACB-422E-8F64-5B4AB1DE0EB5@.microsoft.com...
> 1. I backedup databases from mssql7 default pathname with default pathname
> onto
> tape.
> 2. I installed sql 2000 server onto another computer.
> 3. I restored data into the default directory that was created with MSSQL7
> c:\...\MSSQL7\... from tape created in step 1.
> 4. In Enterprise Manager for sql 2000, I do see default databases. But I
> don't see the ones I restored.
> 5. How can I view the databases I backed up in step 1? I have over 50
> databases.
sp_attach_db
> Thank you for your help!
> -Me
>
>
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html|||In article <OcYIPMnjHHA.3472@.TK2MSFTNGP04.phx.gbl>,
mooregr_deleteth1s@.greenms.com says...
> "Me" <Me@.discussions.microsoft.com> wrote in message
> news:5AAF668E-EACB-422E-8F64-5B4AB1DE0EB5@.microsoft.com...
> > 1. I backedup databases from mssql7 default pathname with default pathname
> > onto
> > tape.
> > 2. I installed sql 2000 server onto another computer.
> > 3. I restored data into the default directory that was created with MSSQL7
> > c:\...\MSSQL7\... from tape created in step 1.
> > 4. In Enterprise Manager for sql 2000, I do see default databases. But I
> > don't see the ones I restored.
> > 5. How can I view the databases I backed up in step 1? I have over 50
> > databases.
> sp_attach_db
>
> >
> > Thank you for your help!
> > -Me
> >
> >
> >
>
>
actually several of them -- max of 16 per execution IIRC. Check out BOL
for more info
--
Graham (Pete) Berry
PeteBerry@.CalTech.edu