Showing posts with label sysobjects. Show all posts
Showing posts with label sysobjects. Show all posts

Wednesday, March 7, 2012

how to create "sysobjects" table

Hello everyone.

I'm facing to a serious problem.

I wanted to migrate SQL 2000 -> SQL 2005.

First of all, I tried to attach my *.mdf file to SQL 2000. but It was not only failed but also SQL 2005 failed to recover my *mdf file.

Now, I think my *.MDF file has system tables for SQL 2005 because when trying to attach *.mdf to SQL 2000 engine send the following message :

-----------------------
Msg 906, Level 22, State 2, Line 1
Could not locate row in sysobjects for system catalog 'Sysobjects' in database 'rudol.net'. This system catalog should exist in all databases. Run DBCC CHECKTABLE on sysobjects in this database.
-----------------------

Also, I tried again to attach the *.mdf to SQL 2005 but SQL 2005 doesn't really works.

Stupidly, I didn't back up the *.mdf file.

How do I attach it to SQL 2005 or recovery "sysobjects" table for SQL 2000?
Please answer.

P.S.
Forgive my terrible English. English is not my mother tongue.Without a backup or a copy of the files, you are screwed. When you attached the file to 2005, it started making internal changes that cannot be reversed by attempting to reattach it to 2000.

You will have to go to the latest backup that you have, restore it to 2000, and add back any missing transactions from the one that got hosed.

Always, always make a backup before changing stuff in a database!|||Your English isn't bad at all... You don't write things the way that a native speaker would write them, but you certainly do write things so that a native speaker can read them!

The solution to your problem gets complex for a number of reasons.

The MDX file is only part of a SQL Server database, it is the "root store" for all data. There is always an LDF file that stores the log information. There can also be NDF files too, which are additional data storage when you have more than one data file in your database. You need to have ALL of these files in order for a reattach to work in most cases, attaching only one file of a set will usually fail and will always be incomplete.

The cheapest, easiest solution is to restore a current backup. My guess is that you probably don't have a current enough backup to make this practical, but it is by far your best answer.

If you really need to salvage what you can from the MDF file, I see a couple of choices, all of which are bad in some way.

To get the most usable data the fastest, I would suggest that you call Microsoft Premier Support Services. This will cost less than $1000 USD, probably take less than a day, and will recover as much data as you are likely to get from just the MDF file. As a side effect, it will get some routine analysis of your system configuration and a lot of comments that will help you improve that configuration as part of the process of salvaging your data.

If you have more or less unlimited time to spend on the salvage operation, you can try to "do it yourself" with help from the internet. There are a number of folks that have salvaged data in similar situations, and we can probably talk you through a significant recovery somewere between a week and a month.

There are other choices, but these are the only ones that make sense to propose at this point. As the discussion moves on further, we may want to explore some of the other options.

-PatP

Friday, February 24, 2012

How to correct index problems in system tables

Hi friends, I have one corrupted index in sysobjects from
one user database (not master). The SQL Server don't
accept to use DBCC or drop and recreate the index to
system tables. In my backup the index alread is corrupted.
How can I fix this problem? I'm using SQL 2000 with the
last SP.DBCC DBREINDEX would help in rebuilding the corrupted index. I notice you
say the SQL Server doesn't accept DBCC though.
Why is this..? Permissions .. ?
--
HTH
Ryan Waight, MCDBA, MCSE
"Khayman" <himura@.click21.com.br> wrote in message
news:08d101c3b997$f77eabe0$a401280a@.phx.gbl...
> Hi friends, I have one corrupted index in sysobjects from
> one user database (not master). The SQL Server don't
> accept to use DBCC or drop and recreate the index to
> system tables. In my backup the index alread is corrupted.
> How can I fix this problem? I'm using SQL 2000 with the
> last SP.|||Hi ,
Please use the below undocumented system procedure This stored procedure can
be used to fix a corruption in a system table.
sp_fixindex dbname,tabname,indid
Before using this stored procedure the database has to be in single user
mode
See this link for more information: "How can I fix a corruption in a system
table?"
http://www.windows2000faq.com/Articles/Index.cfm?ArticleID=14051
Thanks
Hari
MCDBA
"Khayman" <himura@.click21.com.br> wrote in message
news:08d101c3b997$f77eabe0$a401280a@.phx.gbl...
> Hi friends, I have one corrupted index in sysobjects from
> one user database (not master). The SQL Server don't
> accept to use DBCC or drop and recreate the index to
> system tables. In my backup the index alread is corrupted.
> How can I fix this problem? I'm using SQL 2000 with the
> last SP.|||i have tried this yet.
This only works for nonclustered indexes, but the
corrupted index is clustered.
Khayman.
>--Original Message--
>Hi ,
>Please use the below undocumented system procedure This
stored procedure can
>be used to fix a corruption in a system table.
>sp_fixindex dbname,tabname,indid
>Before using this stored procedure the database has to be
in single user
>mode
>See this link for more information: "How can I fix a
corruption in a system
>table?"
>http://www.windows2000faq.com/Articles/Index.cfm?
ArticleID=14051
>Thanks
>Hari
>MCDBA
>
>"Khayman" <himura@.click21.com.br> wrote in message
>news:08d101c3b997$f77eabe0$a401280a@.phx.gbl...
>> Hi friends, I have one corrupted index in sysobjects
from
>> one user database (not master). The SQL Server don't
>> accept to use DBCC or drop and recreate the index to
>> system tables. In my backup the index alread is
corrupted.
>> How can I fix this problem? I'm using SQL 2000 with the
>> last SP.
>
>.
>|||In Microsoft Documentation says:
"DBCC DBREINDEX is not supported for use on system tables."
I don't know why.
Khayman
>--Original Message--
>DBCC DBREINDEX would help in rebuilding the corrupted
index. I notice you
>say the SQL Server doesn't accept DBCC though.
>Why is this..? Permissions .. ?
>--
>HTH
>Ryan Waight, MCDBA, MCSE
>"Khayman" <himura@.click21.com.br> wrote in message
>news:08d101c3b997$f77eabe0$a401280a@.phx.gbl...
>> Hi friends, I have one corrupted index in sysobjects
from
>> one user database (not master). The SQL Server don't
>> accept to use DBCC or drop and recreate the index to
>> system tables. In my backup the index alread is
corrupted.
>> How can I fix this problem? I'm using SQL 2000 with the
>> last SP.
>
>.
>|||Please contact Product Support who are best placed to help you with this.
--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Khayman" <himura@.click21.com.br> wrote in message
news:000101c3b9b7$53f1dfe0$a301280a@.phx.gbl...
> i have tried this yet.
> This only works for nonclustered indexes, but the
> corrupted index is clustered.
> Khayman.
>
> >--Original Message--
> >Hi ,
> >
> >Please use the below undocumented system procedure This
> stored procedure can
> >be used to fix a corruption in a system table.
> >
> >sp_fixindex dbname,tabname,indid
> >
> >Before using this stored procedure the database has to be
> in single user
> >mode
> >
> >See this link for more information: "How can I fix a
> corruption in a system
> >table?"
> >
> >http://www.windows2000faq.com/Articles/Index.cfm?
> ArticleID=14051
> >
> >Thanks
> >Hari
> >MCDBA
> >
> >
> >"Khayman" <himura@.click21.com.br> wrote in message
> >news:08d101c3b997$f77eabe0$a401280a@.phx.gbl...
> >> Hi friends, I have one corrupted index in sysobjects
> from
> >> one user database (not master). The SQL Server don't
> >> accept to use DBCC or drop and recreate the index to
> >> system tables. In my backup the index alread is
> corrupted.
> >> How can I fix this problem? I'm using SQL 2000 with the
> >> last SP.
> >
> >
> >.
> >|||We have the same issue. Did you resolve your problem? How did it go?