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

Monday, March 19, 2012

Help needed with Backup and Restore

If I decide to backup my transaction logs on one server and move them
to another server with the same "everything"

What do I need to do in order to automate this if it is possible

Vincento"Vincento Harris" <wumutek@.yahoo.com> wrote in message
news:2fa13ee7.0410121038.777ed048@.posting.google.c om...
> If I decide to backup my transaction logs on one server and move them
> to another server with the same "everything"
> What do I need to do in order to automate this if it is possible
>
> Vincento

It sounds like you're looking for log shipping - if you have SQL 2000
Enterprise Edition, then check out the information in Books Online. If you
don't, then it's still relatively easy to implement something yourself:

http://www.winnetmag.com/Article/Ar...3231/23231.html
http://sqlguy.home.comcast.net/logship.htm
http://www.sql-server-performance.c...og_shipping.asp

Also search Google for "log shipping" and you should get plenty of hits.

Simon

Monday, March 12, 2012

Help needed to restore SQL Database

Hi Gurus,

Can anyone assist?

How to recover the database if I have only the current transaction log and a older version of .mdf & .ldf files. No backup had being performed via Enterprise Manager.

I have installed MSSQL2000 on Windows 2003 Server. Created a new database 'sample' and inserted some data into the 'sample' db. Afterwhich, I offline the 'sample' db and copied the .mdf & .ldf to another backup directory.

Restart the database by bring it online again and continue to insert more data ... (approx 100,000 rows of data).

Afterwhich, I tried to damage the running database .mdf file and the database went into offline / suspect mode.

How can I recovered to the point in time of failure based on just current transactional log & older version of .mdf & .ldf files?

Can any gurus out there advises?If you have not been making backups, you will not be able to recover to a point in time. Recovering to a point in time requires that the database be in the 'Full' recovery model and that you make periodic full backups combined with transaction log backups. The best that you *might* be able to do in this scenario is to perform a single file attach (see sp_attachdb).

Regards,

hmscott

Monday, February 27, 2012

Help me with SQL Statement

Hello, i want to make SQL statement for Restore databse that selects the
..bak file from the same .sql file path ,something like '..\' in the
javascript, plz help and thank you ..
The restore database requires absolute path. You have to determine the path
and form the restore statement.
-oj
"Samy Hamdy" <samy_hamdy@.hotmail.com> wrote in message
news:OGCsE1KfFHA.3612@.TK2MSFTNGP12.phx.gbl...
> Hello, i want to make SQL statement for Restore databse that selects the
> .bak file from the same .sql file path ,something like '..\' in the
> javascript, plz help and thank you ..
>
|||Thank you very much ..

Help me with SQL Statement

Hello, i want to make SQL statement for Restore databse that selects the
.bak file from the same .sql file path ,something like '..\' in the
javascript, plz help and thank you ..The restore database requires absolute path. You have to determine the path
and form the restore statement.
-oj
"Samy Hamdy" <samy_hamdy@.hotmail.com> wrote in message
news:OGCsE1KfFHA.3612@.TK2MSFTNGP12.phx.gbl...
> Hello, i want to make SQL statement for Restore databse that selects the
> .bak file from the same .sql file path ,something like '..' in the
> javascript, plz help and thank you ..
>|||Thank you very much ..

Help me with SQL Statement

Hello, i want to make SQL statement for Restore databse that selects the
.bak file from the same .sql file path ,something like '..\' in the
javascript, plz help and thank you ..The restore database requires absolute path. You have to determine the path
and form the restore statement.
--
-oj
"Samy Hamdy" <samy_hamdy@.hotmail.com> wrote in message
news:OGCsE1KfFHA.3612@.TK2MSFTNGP12.phx.gbl...
> Hello, i want to make SQL statement for Restore databse that selects the
> .bak file from the same .sql file path ,something like '..\' in the
> javascript, plz help and thank you ..
>|||Thank you very much ..

Friday, February 24, 2012

Help me to restore this database!!!

Hi,
I have a database named 'ePos' and i want to make
a copy from it by backup this database then restore
it as a new one with another name.
I use this commands:

sp_addumpdevice 'disk',
'ePosTest1',
'c:\test1.bak'

BACKUP DATABASE ePos TO ePosTest1 WITH INIT
GO

RESTORE DATABASE ePos_new FROM ePosTest1
GO

I have this error when restoring :
Server: Msg 1834, Level 16, State 1, Line 7
The file 'c:\Program Files\Microsoft SQL Server\MSSQL\Data\ePos2006.mdf' cannot be overwritten. It is being used by database 'ePos2006'.

How can i restore the database with new filesys? how i can fix this problem?

PLZ help.

Regards.

For best results, try posting this in a different forum more related to your issue. At the top of the screen, you will see the forum hierarchy. (MSDN Forums >> SQL Server >> SQL Server Integration Services...) Click on the SQL Server part of that tree to see the full list of forums related to SQL Server.

I'd suggest trying the disaster recovery forums.|||This thread was originally posted in SSIS forum...moved to Disaster Recovery and Availability|||

By default, SQL backups are restored to the same path as the original database.

In your case, you want to have the same content in different files, so you'll need to use the WITH MOVE clause:

RESTORE DATABASE ePosNew FROM ePosTest1

WITH MOVE 'ePos2006' TO 'c:\Program Files\Microsoft SQL Server\MSSQL\Data\ePosNew.mdf' ,

MOVE 'ePos2006_log' TO 'c:\Program Files\Microsoft SQL Server\MSSQL\Data\ePosNew_log.ldf'

go

You'll have to verify the logical names of your data and log files, but this is the technique.