Showing posts with label accidently. Show all posts
Showing posts with label accidently. Show all posts

Friday, March 23, 2012

Restore Database in Standby without a Transaction undo file

Is there a way to restore a database that is in stand-by mode, if the TUF
file has become corrupted or accidently deleted.
If you do a resotre database with recovery you will get an error saying the
file is not accessiable. Is there a way to force the restore.
You can stop SQL, copy the files and re-attach I think.
It would also be nice if SQL could backup database that are in standby. This
way you can do quick offsite backups.
Hi,
AFAIK, IF the TUF file (undo file) is corrupted or lost you can not restore
the subsequent transaction logs in to your database which is in
stand by mode.
Thanks
Hari
SQL Server MVP
"et" <et@.discussions.microsoft.com> wrote in message
news:A59EF3D5-08C9-4A69-A97F-10EEBAB112B2@.microsoft.com...
> Is there a way to restore a database that is in stand-by mode, if the TUF
> file has become corrupted or accidently deleted.
> If you do a resotre database with recovery you will get an error saying
> the
> file is not accessiable. Is there a way to force the restore.
> You can stop SQL, copy the files and re-attach I think.
> It would also be nice if SQL could backup database that are in standby.
> This
> way you can do quick offsite backups.
|||If the standby file is hosed, so are you. I submitted a SQLWISH a while ago
for SQL Server to lock the standby file just as it does any SQL database
file. I don't know the status of that request.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"et" <et@.discussions.microsoft.com> wrote in message
news:A59EF3D5-08C9-4A69-A97F-10EEBAB112B2@.microsoft.com...
> Is there a way to restore a database that is in stand-by mode, if the TUF
> file has become corrupted or accidently deleted.
> If you do a resotre database with recovery you will get an error saying
> the
> file is not accessiable. Is there a way to force the restore.
> You can stop SQL, copy the files and re-attach I think.
> It would also be nice if SQL could backup database that are in standby.
> This
> way you can do quick offsite backups.

Restore Database in Standby without a Transaction undo file

Is there a way to restore a database that is in stand-by mode, if the TUF
file has become corrupted or accidently deleted.
If you do a resotre database with recovery you will get an error saying the
file is not accessiable. Is there a way to force the restore.
You can stop SQL, copy the files and re-attach I think.
It would also be nice if SQL could backup database that are in standby. This
way you can do quick offsite backups.Hi,
AFAIK, IF the TUF file (undo file) is corrupted or lost you can not restore
the subsequent transaction logs in to your database which is in
stand by mode.
Thanks
Hari
SQL Server MVP
"et" <et@.discussions.microsoft.com> wrote in message
news:A59EF3D5-08C9-4A69-A97F-10EEBAB112B2@.microsoft.com...
> Is there a way to restore a database that is in stand-by mode, if the TUF
> file has become corrupted or accidently deleted.
> If you do a resotre database with recovery you will get an error saying
> the
> file is not accessiable. Is there a way to force the restore.
> You can stop SQL, copy the files and re-attach I think.
> It would also be nice if SQL could backup database that are in standby.
> This
> way you can do quick offsite backups.|||If the standby file is hosed, so are you. I submitted a SQLWISH a while ago
for SQL Server to lock the standby file just as it does any SQL database
file. I don't know the status of that request.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"et" <et@.discussions.microsoft.com> wrote in message
news:A59EF3D5-08C9-4A69-A97F-10EEBAB112B2@.microsoft.com...
> Is there a way to restore a database that is in stand-by mode, if the TUF
> file has become corrupted or accidently deleted.
> If you do a resotre database with recovery you will get an error saying
> the
> file is not accessiable. Is there a way to force the restore.
> You can stop SQL, copy the files and re-attach I think.
> It would also be nice if SQL could backup database that are in standby.
> This
> way you can do quick offsite backups.

Restore Database in Standby without a Transaction undo file

Is there a way to restore a database that is in stand-by mode, if the TUF
file has become corrupted or accidently deleted.
If you do a resotre database with recovery you will get an error saying the
file is not accessiable. Is there a way to force the restore.
You can stop SQL, copy the files and re-attach I think.
It would also be nice if SQL could backup database that are in standby. This
way you can do quick offsite backups.Hi,
AFAIK, IF the TUF file (undo file) is corrupted or lost you can not restore
the subsequent transaction logs in to your database which is in
stand by mode.
Thanks
Hari
SQL Server MVP
"et" <et@.discussions.microsoft.com> wrote in message
news:A59EF3D5-08C9-4A69-A97F-10EEBAB112B2@.microsoft.com...
> Is there a way to restore a database that is in stand-by mode, if the TUF
> file has become corrupted or accidently deleted.
> If you do a resotre database with recovery you will get an error saying
> the
> file is not accessiable. Is there a way to force the restore.
> You can stop SQL, copy the files and re-attach I think.
> It would also be nice if SQL could backup database that are in standby.
> This
> way you can do quick offsite backups.|||If the standby file is hosed, so are you. I submitted a SQLWISH a while ago
for SQL Server to lock the standby file just as it does any SQL database
file. I don't know the status of that request.
--
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"et" <et@.discussions.microsoft.com> wrote in message
news:A59EF3D5-08C9-4A69-A97F-10EEBAB112B2@.microsoft.com...
> Is there a way to restore a database that is in stand-by mode, if the TUF
> file has become corrupted or accidently deleted.
> If you do a resotre database with recovery you will get an error saying
> the
> file is not accessiable. Is there a way to force the restore.
> You can stop SQL, copy the files and re-attach I think.
> It would also be nice if SQL could backup database that are in standby.
> This
> way you can do quick offsite backups.

Tuesday, February 21, 2012

Restore / Backup - NEED HELP ASAP

Hi there,
I have a big favour to ask you.
I accidently delete one of my table in database. However, luckly I
have a bak file.
But, I can't restore whole database with bak file because since I
deleted table, there are new data in that table and other table as
well.
Is there any way I can only restore/update my database with bak file?
I know that there is no way to restore only one table. So, I am
looking for anther way to restore database.
Need your help as soon as possible.
ThanksYou can restore the backup to a different database name and different file
names and then recover the missing data. For example:
RESTORE DATABASE MyDatabase_Temp
FROM DISK='C:\Backups\MyDatabase.bak'
WITH
MOVE 'MyDatabase' TO 'D:\DataFiles\MyDatabase_Temp.mdf',
MOVE 'MyDatabase_Log' TO 'E:\LogFiles\MyDatabase_Temp_Log.ldf',
STATS=5
Also, you can list the logical file names needed for the MOVE option with
RESTORE FILELISTONLY:
RESTORE FILELISTONLY
FROM DISK='C:\Backups\MyDatabase.bak'
Hope this helps.
Dan Guzman
SQL Server MVP
"portCo" <woosubc@.gmail.com> wrote in message
news:1174448208.379362.17330@.l77g2000hsb.googlegroups.com...
> Hi there,
> I have a big favour to ask you.
> I accidently delete one of my table in database. However, luckly I
> have a bak file.
> But, I can't restore whole database with bak file because since I
> deleted table, there are new data in that table and other table as
> well.
> Is there any way I can only restore/update my database with bak file?
> I know that there is no way to restore only one table. So, I am
> looking for anther way to restore database.
>
> Need your help as soon as possible.
>
> Thanks
>|||Thanks for your help. It really helped.
I actually restore to different name. However, I am having problem
with recovering missing data.
For example,
Schema is like (userID, userName, Phone)
table1 (1, A, 1111111111)
(2, B, 2222222222)
total: 2 rows.
table2 (2, B, 4444444444)
(3, C, 3333333333)
total: 2 rows.
So, here is a situation. I want to use table2 to update (if userID
exists) and insert (if userID not exists) of table 1.
I am trying to figure it out what I have to do for hours. But no luck
so far,
If anyone can help me out this, I will appreciated it.
Thanks alot,
On Mar 20, 8:52 pm, "Dan Guzman" <guzma...@.nospam-
online.sbcglobal.net> wrote:
> You can restore the backup to a different database name and different file
> names and then recover the missing data. For example:
> RESTORE DATABASE MyDatabase_Temp
> FROM DISK='C:\Backups\MyDatabase.bak'
> WITH
> MOVE 'MyDatabase' TO 'D:\DataFiles\MyDatabase_Temp.mdf',
> MOVE 'MyDatabase_Log' TO 'E:\LogFiles\MyDatabase_Temp_Log.ldf',
> STATS=5
> Also, you can list the logical file names needed for the MOVE option with
> RESTORE FILELISTONLY:
> RESTORE FILELISTONLY
> FROM DISK='C:\Backups\MyDatabase.bak'
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "portCo" <woos...@.gmail.com> wrote in message
> news:1174448208.379362.17330@.l77g2000hsb.googlegroups.com...
>
>
>
>
>
>
>
> - Show quoted text -|||Oops, I got it to work.
Thanks
On Mar 20, 10:38 pm, "portCo" <woos...@.gmail.com> wrote:
> Thanks for your help. It really helped.
> I actually restore to different name. However, I am having problem
> with recovering missing data.
> For example,
> Schema is like (userID, userName, Phone)
> table1 (1, A, 1111111111)
> (2, B, 2222222222)
> total: 2 rows.
> table2 (2, B, 4444444444)
> (3, C, 3333333333)
> total: 2 rows.
> So, here is a situation. I want to use table2 to update (if userID
> exists) and insert (if userID not exists) of table 1.
> I am trying to figure it out what I have to do for hours. But no luck
> so far,
> If anyone can help me out this, I will appreciated it.
> Thanks alot,
> On Mar 20, 8:52 pm, "Dan Guzman" <guzma...@.nospam-
>
> online.sbcglobal.net> wrote:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> - Show quoted text -|||I'm glad you were able to sort things out.
Hope this helps.
Dan Guzman
SQL Server MVP
"portCo" <woosubc@.gmail.com> wrote in message
news:1174458361.130223.256700@.e65g2000hsc.googlegroups.com...
> Oops, I got it to work.
> Thanks
>
> On Mar 20, 10:38 pm, "portCo" <woos...@.gmail.com> wrote:
>

Restore / Backup - NEED HELP ASAP

Hi there,
I have a big favour to ask you.
I accidently delete one of my table in database. However, luckly I
have a bak file.
But, I can't restore whole database with bak file because since I
deleted table, there are new data in that table and other table as
well.
Is there any way I can only restore/update my database with bak file?
I know that there is no way to restore only one table. So, I am
looking for anther way to restore database.
Need your help as soon as possible.
Thanks
You can restore the backup to a different database name and different file
names and then recover the missing data. For example:
RESTORE DATABASE MyDatabase_Temp
FROM DISK='C:\Backups\MyDatabase.bak'
WITH
MOVE 'MyDatabase' TO 'D:\DataFiles\MyDatabase_Temp.mdf',
MOVE 'MyDatabase_Log' TO 'E:\LogFiles\MyDatabase_Temp_Log.ldf',
STATS=5
Also, you can list the logical file names needed for the MOVE option with
RESTORE FILELISTONLY:
RESTORE FILELISTONLY
FROM DISK='C:\Backups\MyDatabase.bak'
Hope this helps.
Dan Guzman
SQL Server MVP
"portCo" <woosubc@.gmail.com> wrote in message
news:1174448208.379362.17330@.l77g2000hsb.googlegro ups.com...
> Hi there,
> I have a big favour to ask you.
> I accidently delete one of my table in database. However, luckly I
> have a bak file.
> But, I can't restore whole database with bak file because since I
> deleted table, there are new data in that table and other table as
> well.
> Is there any way I can only restore/update my database with bak file?
> I know that there is no way to restore only one table. So, I am
> looking for anther way to restore database.
>
> Need your help as soon as possible.
>
> Thanks
>
|||Thanks for your help. It really helped.
I actually restore to different name. However, I am having problem
with recovering missing data.
For example,
Schema is like (userID, userName, Phone)
table1 (1, A, 1111111111)
(2, B, 2222222222)
total: 2 rows.
table2 (2, B, 4444444444)
(3, C, 3333333333)
total: 2 rows.
So, here is a situation. I want to use table2 to update (if userID
exists) and insert (if userID not exists) of table 1.
I am trying to figure it out what I have to do for hours. But no luck
so far,
If anyone can help me out this, I will appreciated it.
Thanks alot,
On Mar 20, 8:52 pm, "Dan Guzman" <guzma...@.nospam-
online.sbcglobal.net> wrote:
> You can restore the backup to a different database name and different file
> names and then recover the missing data. For example:
> RESTORE DATABASE MyDatabase_Temp
> FROM DISK='C:\Backups\MyDatabase.bak'
> WITH
> MOVE 'MyDatabase' TO 'D:\DataFiles\MyDatabase_Temp.mdf',
> MOVE 'MyDatabase_Log' TO 'E:\LogFiles\MyDatabase_Temp_Log.ldf',
> STATS=5
> Also, you can list the logical file names needed for the MOVE option with
> RESTORE FILELISTONLY:
> RESTORE FILELISTONLY
> FROM DISK='C:\Backups\MyDatabase.bak'
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "portCo" <woos...@.gmail.com> wrote in message
> news:1174448208.379362.17330@.l77g2000hsb.googlegro ups.com...
>
>
>
>
> - Show quoted text -
|||Oops, I got it to work.
Thanks
On Mar 20, 10:38 pm, "portCo" <woos...@.gmail.com> wrote:
> Thanks for your help. It really helped.
> I actually restore to different name. However, I am having problem
> with recovering missing data.
> For example,
> Schema is like (userID, userName, Phone)
> table1 (1, A, 1111111111)
> (2, B, 2222222222)
> total: 2 rows.
> table2 (2, B, 4444444444)
> (3, C, 3333333333)
> total: 2 rows.
> So, here is a situation. I want to use table2 to update (if userID
> exists) and insert (if userID not exists) of table 1.
> I am trying to figure it out what I have to do for hours. But no luck
> so far,
> If anyone can help me out this, I will appreciated it.
> Thanks alot,
> On Mar 20, 8:52 pm, "Dan Guzman" <guzma...@.nospam-
>
> online.sbcglobal.net> wrote:
>
>
>
>
>
>
>
> - Show quoted text -
|||I'm glad you were able to sort things out.
Hope this helps.
Dan Guzman
SQL Server MVP
"portCo" <woosubc@.gmail.com> wrote in message
news:1174458361.130223.256700@.e65g2000hsc.googlegr oups.com...
> Oops, I got it to work.
> Thanks
>
> On Mar 20, 10:38 pm, "portCo" <woos...@.gmail.com> wrote:
>

Restore / Backup - NEED HELP ASAP

Hi there,
I have a big favour to ask you.
I accidently delete one of my table in database. However, luckly I
have a bak file.
But, I can't restore whole database with bak file because since I
deleted table, there are new data in that table and other table as
well.
Is there any way I can only restore/update my database with bak file?
I know that there is no way to restore only one table. So, I am
looking for anther way to restore database.
Need your help as soon as possible.
ThanksYou can restore the backup to a different database name and different file
names and then recover the missing data. For example:
RESTORE DATABASE MyDatabase_Temp
FROM DISK='C:\Backups\MyDatabase.bak'
WITH
MOVE 'MyDatabase' TO 'D:\DataFiles\MyDatabase_Temp.mdf',
MOVE 'MyDatabase_Log' TO 'E:\LogFiles\MyDatabase_Temp_Log.ldf',
STATS=5
Also, you can list the logical file names needed for the MOVE option with
RESTORE FILELISTONLY:
RESTORE FILELISTONLY
FROM DISK='C:\Backups\MyDatabase.bak'
--
Hope this helps.
Dan Guzman
SQL Server MVP
"portCo" <woosubc@.gmail.com> wrote in message
news:1174448208.379362.17330@.l77g2000hsb.googlegroups.com...
> Hi there,
> I have a big favour to ask you.
> I accidently delete one of my table in database. However, luckly I
> have a bak file.
> But, I can't restore whole database with bak file because since I
> deleted table, there are new data in that table and other table as
> well.
> Is there any way I can only restore/update my database with bak file?
> I know that there is no way to restore only one table. So, I am
> looking for anther way to restore database.
>
> Need your help as soon as possible.
>
> Thanks
>|||Thanks for your help. It really helped.
I actually restore to different name. However, I am having problem
with recovering missing data.
For example,
Schema is like (userID, userName, Phone)
table1 (1, A, 1111111111)
(2, B, 2222222222)
total: 2 rows.
table2 (2, B, 4444444444)
(3, C, 3333333333)
total: 2 rows.
So, here is a situation. I want to use table2 to update (if userID
exists) and insert (if userID not exists) of table 1.
I am trying to figure it out what I have to do for hours. But no luck
so far,
If anyone can help me out this, I will appreciated it.
Thanks alot,
On Mar 20, 8:52 pm, "Dan Guzman" <guzma...@.nospam-
online.sbcglobal.net> wrote:
> You can restore the backup to a different database name and different file
> names and then recover the missing data. For example:
> RESTORE DATABASE MyDatabase_Temp
> FROM DISK='C:\Backups\MyDatabase.bak'
> WITH
> MOVE 'MyDatabase' TO 'D:\DataFiles\MyDatabase_Temp.mdf',
> MOVE 'MyDatabase_Log' TO 'E:\LogFiles\MyDatabase_Temp_Log.ldf',
> STATS=5
> Also, you can list the logical file names needed for the MOVE option with
> RESTORE FILELISTONLY:
> RESTORE FILELISTONLY
> FROM DISK='C:\Backups\MyDatabase.bak'
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "portCo" <woos...@.gmail.com> wrote in message
> news:1174448208.379362.17330@.l77g2000hsb.googlegroups.com...
>
> > Hi there,
> > I have a big favour to ask you.
> > I accidently delete one of my table in database. However, luckly I
> > have a bak file.
> > But, I can't restore whole database with bak file because since I
> > deleted table, there are new data in that table and other table as
> > well.
> > Is there any way I can only restore/update my database with bak file?
> > I know that there is no way to restore only one table. So, I am
> > looking for anther way to restore database.
> > Need your help as soon as possible.
> > Thanks- Hide quoted text -
> - Show quoted text -|||Oops, I got it to work.
Thanks
On Mar 20, 10:38 pm, "portCo" <woos...@.gmail.com> wrote:
> Thanks for your help. It really helped.
> I actually restore to different name. However, I am having problem
> with recovering missing data.
> For example,
> Schema is like (userID, userName, Phone)
> table1 (1, A, 1111111111)
> (2, B, 2222222222)
> total: 2 rows.
> table2 (2, B, 4444444444)
> (3, C, 3333333333)
> total: 2 rows.
> So, here is a situation. I want to use table2 to update (if userID
> exists) and insert (if userID not exists) of table 1.
> I am trying to figure it out what I have to do for hours. But no luck
> so far,
> If anyone can help me out this, I will appreciated it.
> Thanks alot,
> On Mar 20, 8:52 pm, "Dan Guzman" <guzma...@.nospam-
>
> online.sbcglobal.net> wrote:
> > You can restore the backup to a different database name and different file
> > names and then recover the missing data. For example:
> > RESTORE DATABASE MyDatabase_Temp
> > FROM DISK='C:\Backups\MyDatabase.bak'
> > WITH
> > MOVE 'MyDatabase' TO 'D:\DataFiles\MyDatabase_Temp.mdf',
> > MOVE 'MyDatabase_Log' TO 'E:\LogFiles\MyDatabase_Temp_Log.ldf',
> > STATS=5
> > Also, you can list the logical file names needed for the MOVE option with
> > RESTORE FILELISTONLY:
> > RESTORE FILELISTONLY
> > FROM DISK='C:\Backups\MyDatabase.bak'
> > --
> > Hope this helps.
> > Dan Guzman
> > SQL Server MVP
> > "portCo" <woos...@.gmail.com> wrote in message
> >news:1174448208.379362.17330@.l77g2000hsb.googlegroups.com...
> > > Hi there,
> > > I have a big favour to ask you.
> > > I accidently delete one of my table in database. However, luckly I
> > > have a bak file.
> > > But, I can't restore whole database with bak file because since I
> > > deleted table, there are new data in that table and other table as
> > > well.
> > > Is there any way I can only restore/update my database with bak file?
> > > I know that there is no way to restore only one table. So, I am
> > > looking for anther way to restore database.
> > > Need your help as soon as possible.
> > > Thanks- Hide quoted text -
> > - Show quoted text -- Hide quoted text -
> - Show quoted text -|||I'm glad you were able to sort things out.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"portCo" <woosubc@.gmail.com> wrote in message
news:1174458361.130223.256700@.e65g2000hsc.googlegroups.com...
> Oops, I got it to work.
> Thanks
>
> On Mar 20, 10:38 pm, "portCo" <woos...@.gmail.com> wrote:
>> Thanks for your help. It really helped.
>> I actually restore to different name. However, I am having problem
>> with recovering missing data.
>> For example,
>> Schema is like (userID, userName, Phone)
>> table1 (1, A, 1111111111)
>> (2, B, 2222222222)
>> total: 2 rows.
>> table2 (2, B, 4444444444)
>> (3, C, 3333333333)
>> total: 2 rows.
>> So, here is a situation. I want to use table2 to update (if userID
>> exists) and insert (if userID not exists) of table 1.
>> I am trying to figure it out what I have to do for hours. But no luck
>> so far,
>> If anyone can help me out this, I will appreciated it.
>> Thanks alot,
>> On Mar 20, 8:52 pm, "Dan Guzman" <guzma...@.nospam-
>>
>> online.sbcglobal.net> wrote:
>> > You can restore the backup to a different database name and different
>> > file
>> > names and then recover the missing data. For example:
>> > RESTORE DATABASE MyDatabase_Temp
>> > FROM DISK='C:\Backups\MyDatabase.bak'
>> > WITH
>> > MOVE 'MyDatabase' TO 'D:\DataFiles\MyDatabase_Temp.mdf',
>> > MOVE 'MyDatabase_Log' TO 'E:\LogFiles\MyDatabase_Temp_Log.ldf',
>> > STATS=5
>> > Also, you can list the logical file names needed for the MOVE option
>> > with
>> > RESTORE FILELISTONLY:
>> > RESTORE FILELISTONLY
>> > FROM DISK='C:\Backups\MyDatabase.bak'
>> > --
>> > Hope this helps.
>> > Dan Guzman
>> > SQL Server MVP
>> > "portCo" <woos...@.gmail.com> wrote in message
>> >news:1174448208.379362.17330@.l77g2000hsb.googlegroups.com...
>> > > Hi there,
>> > > I have a big favour to ask you.
>> > > I accidently delete one of my table in database. However, luckly I
>> > > have a bak file.
>> > > But, I can't restore whole database with bak file because since I
>> > > deleted table, there are new data in that table and other table as
>> > > well.
>> > > Is there any way I can only restore/update my database with bak file?
>> > > I know that there is no way to restore only one table. So, I am
>> > > looking for anther way to restore database.
>> > > Need your help as soon as possible.
>> > > Thanks- Hide quoted text -
>> > - Show quoted text -- Hide quoted text -
>> - Show quoted text -
>