Showing posts with label failed. Show all posts
Showing posts with label failed. Show all posts

Thursday, March 8, 2012

Database Restore failed, now inaccessible and can not restore.

I have seen this before. A 2000 restore fails, leaving the database thinking it is being restored but the restore job failed and errors when it is restarted. EM is clueless. I believe there is a proc to reset some flag. Can you share it with me?

Thanks!

sp_resetstatus|||I don't know if being marked "suspect" is the same as being marked as being restored. Is it?|||

if you have backup files, then try to restore it from QA. the problem may be when you restore the data file and log file ; the datafile step may be success and the log file may not. untill unless it find WITH RECOVERy option the database status will be "restoring" . So what you do is , take the backup set and restore it with someother name using WITH Move option

Madhu

|||no. 'suspect' is not the same as 'restoring'. sp_resetstatus only handles 'suspect' status.

To get out of restoring, you will need to recover the database. Try:

restore database <db> with recovery

Database restore failed w/ConnectionRead (WrapperRead()) error

User attempts to restore database and receives the following error:
Title Bar:
Microsoft SQL-DMO (ODBC SQLState: 01000)
Error:
ConnectionRead (WrapperRead())
General network error. Check your network documentation.
Processed 1 pages for database 'xxxx', file 'xxxx' on file 1.
Once the user clicks past the errors and refreshes their databases,
the database does show up in the list and it was successfully
restored.Hello
Could you please send the SQL errorlog from the time that this failure
occured.
Thank you for using Microsoft newsgroups.
Sincerely
Pankaj Agarwal
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

Saturday, February 25, 2012

database repair without data loss?

Scenario: Database maintenance plan failed in "check data and index linkage" activity. Ran DBCC CHECKDB WITH PHYSICAL_ONLY option which revealed a few "page id" problems. It appears all errors on related to one table. The CHECKDB stated specifically: "repair_allow_data_loss is the minimum repair level for the errors found"
My question is: Is there any way to repair database/table without data loss?Yes, restore from your last backup and apply all the log backups since the
backup was taken (stopping at the point the corruption appears if necessary)
It is not *guaranteed* that repair will have to delete data to repair the
database but it is highly likely (if REPAIR_ALLOW_DATA_LOSS is needed).
Repair should always be your last resort. You should also determine the root
cause of the corruption (i.e. examine NT event logs, SQL Server error log,
run hardware diagnostics etc) as a hardware fault will most likely cause the
same or similar corruption in future if not corrected.
Regards.
--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Alan T" <infopro@.3wlogic.net> wrote in message
news:FD16E2B3-DEF4-486C-8A80-DFABB549720B@.microsoft.com...
> Scenario: Database maintenance plan failed in "check data and index
linkage" activity. Ran DBCC CHECKDB WITH PHYSICAL_ONLY option which
revealed a few "page id" problems. It appears all errors on related to one
table. The CHECKDB stated specifically: "repair_allow_data_loss is the
minimum repair level for the errors found".
> My question is: Is there any way to repair database/table without data
loss?|||Thanks, Paul. With the help of someone with a great deal more experience I was able to recover virtually all data.
The corruption was limited to one table, so after some minor unsuccessful attempts at repair we ran DBCC CHECKTABLE WITH REPAIR_ALLOW_DATA_LOSS. We then restored a "good" backup into a temporary database and from that database pulled records from the problem table that were missing in the production table after the REPAIR_ALLOW_DATA_LOSS. It appears we were able to recover all but about 11 records. It's wasn't a "perfect" recovery but I'm happy and grateful for the help.
Best wishes.

Friday, February 24, 2012

Database question...

I have a database that was on a SQL Server that failed. The data file is
intact
but I need to bring it up. What steps do I need to do in order to attach
this to
another SQL Server with the plan of maving it back to the original server
once we
get the server rebuilt.
Any help would be greatly appreciated.You might be able to use sp_attach_db of you have all the files that constitutes the database. A
database backup file is better (RESTORE DATABASE). You also need to make sure that login exists at
the new server (and other stuff needed in the system databases) and then handle login to use mapping
(sp_change_users_login).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Joe" <Joe@.discussions.microsoft.com> wrote in message
news:EA95EEE6-1FD6-41E8-A65E-7F8A647A7D55@.microsoft.com...
>I have a database that was on a SQL Server that failed. The data file is
> intact
> but I need to bring it up. What steps do I need to do in order to attach
> this to
> another SQL Server with the plan of maving it back to the original server
> once we
> get the server rebuilt.
> Any help would be greatly appreciated.|||If your data file is intact, you can try sp_attach_single_file_db too...
"Joe" wrote:
> I have a database that was on a SQL Server that failed. The data file is
> intact
> but I need to bring it up. What steps do I need to do in order to attach
> this to
> another SQL Server with the plan of maving it back to the original server
> once we
> get the server rebuilt.
> Any help would be greatly appreciated.

Database question...

I have a database that was on a SQL Server that failed. The data file is
intact
but I need to bring it up. What steps do I need to do in order to attach
this to
another SQL Server with the plan of maving it back to the original server
once we
get the server rebuilt.
Any help would be greatly appreciated.
If your data file is intact, you can try sp_attach_single_file_db too...
"Joe" wrote:

> I have a database that was on a SQL Server that failed. The data file is
> intact
> but I need to bring it up. What steps do I need to do in order to attach
> this to
> another SQL Server with the plan of maving it back to the original server
> once we
> get the server rebuilt.
> Any help would be greatly appreciated.

Database question...

I have a database that was on a SQL Server that failed. The data file is
intact
but I need to bring it up. What steps do I need to do in order to attach
this to
another SQL Server with the plan of maving it back to the original server
once we
get the server rebuilt.
Any help would be greatly appreciated.You might be able to use sp_attach_db of you have all the files that constit
utes the database. A
database backup file is better (RESTORE DATABASE). You also need to make sur
e that login exists at
the new server (and other stuff needed in the system databases) and then han
dle login to use mapping
(sp_change_users_login).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Joe" <Joe@.discussions.microsoft.com> wrote in message
news:EA95EEE6-1FD6-41E8-A65E-7F8A647A7D55@.microsoft.com...
>I have a database that was on a SQL Server that failed. The data file is
> intact
> but I need to bring it up. What steps do I need to do in order to attach
> this to
> another SQL Server with the plan of maving it back to the original server
> once we
> get the server rebuilt.
> Any help would be greatly appreciated.|||If your data file is intact, you can try sp_attach_single_file_db too...
"Joe" wrote:

> I have a database that was on a SQL Server that failed. The data file is
> intact
> but I need to bring it up. What steps do I need to do in order to attach
> this to
> another SQL Server with the plan of maving it back to the original server
> once we
> get the server rebuilt.
> Any help would be greatly appreciated.