Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Problem attaching database

 
   Database Help (Home) -> Programming RSS
Next:  How do I disable the "shift" key? *1222..  
Author Message
cowznofsky

External


Since: Dec 29, 2007
Posts: 10



(Msg. 1) Posted: Mon Dec 22, 2008 6:27 am
Post subject: Problem attaching database
Archived from groups: microsoft>public>sqlserver>programming (more info?)

The database is from SqlServer Express 2005. I've created an instance
of SQLServer Express 2008 on another machine. I did a shrink on the
db before copying it.

I get a message like
Server: Msg 602, Level 21, State 50, Line 1
Could not find row in sysindexes for database ID 16, object ID 1,
index ID
1. Run DBCC CHECKTABLE on sysindexes.


(This is copied from a earlier post, but it's basically the same
message).

Any ideas?
I suppose I could just run that command on the source db, but it's in
production and working fine.

I then tried to restore a backup but got a message about too many
devices or files used (sorry I don't have the exact message here).

 >> Stay informed about: Problem attaching database 
Back to top
Login to vote
Erland Sommarskog2

External


Since: May 30, 2004
Posts: 2061



(Msg. 2) Posted: Mon Dec 22, 2008 8:19 am
Post subject: Re: Problem attaching database [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

cowznofsky ( ) writes:
> The database is from SqlServer Express 2005. I've created an instance
> of SQLServer Express 2008 on another machine. I did a shrink on the
> db before copying it.
>
> I get a message like
> Server: Msg 602, Level 21, State 50, Line 1
> Could not find row in sysindexes for database ID 16, object ID 1,
> index ID
> 1. Run DBCC CHECKTABLE on sysindexes.
>
>
> (This is copied from a earlier post, but it's basically the same
> message).

Basically the same message? Please post the exact error message. That
certainly could help you to get an accurate answer.

The error message above comes from SQL 2000, so my conclusion is that
you are trying to attach a database from SQL 2005/SQL 2008 on SQL 2000
and that is not going to work out.




--
Erland Sommarskog, SQL Server MVP, esquel.TakeThisOut@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 >> Stay informed about: Problem attaching database 
Back to top
Login to vote
cowznofsky

External


Since: Dec 29, 2007
Posts: 10



(Msg. 3) Posted: Wed Dec 24, 2008 12:39 pm
Post subject: Re: Problem attaching database [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Dec 22, 11:19 am, Erland Sommarskog wrote:
> cowznofsky ( ) writes:
> > The database is from SqlServer Express 2005.  I've created an instance
> > of SQLServer Express 2008 on another machine.  I did a shrink on the
> > db before copying it.
>
> > I get a message like
> > Server: Msg 602, Level 21, State 50, Line 1
> > Could not find row in sysindexes for database ID 16, object ID 1,
> > index ID
> > 1. Run DBCC CHECKTABLE on sysindexes.
>
> > (This is copied from a earlier post, but it's basically the same
> > message).
>
> Basically the same message? Please post the exact error message. That
> certainly could help you to get an accurate answer.
>
> The error message above comes from SQL 2000, so my conclusion is that
> you are trying to attach a database from SQL 2005/SQL 2008 on SQL 2000
> and that is not going to work out.
>
> --
> Erland Sommarskog, SQL Server MVP, esq....DeleteThis@sommarskog.se
>
> Books Online for SQL Server 2005 athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books...
> Books Online for SQL Server 2000 athttp://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

There is nothing here from SqlServer 2000. The database is from a
basic version of SQLServer Express 2005.
I am trying to attach it in SqlServer Express 2008 with Advanced
Services.

The precise error message is: "An exception occurred while executing a
Transact-SQL statement or batch.
Could not find row in sysindexes for database ID 6, object ID 1,
index ID 1
1. Run DBCC CHECKTABLE on sysindexes. "
 >> Stay informed about: Problem attaching database 
Back to top
Login to vote
Erland Sommarskog2

External


Since: May 30, 2004
Posts: 2061



(Msg. 4) Posted: Wed Dec 24, 2008 1:53 pm
Post subject: Re: Problem attaching database [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

cowznofsky ( ) writes:
> There is nothing here from SqlServer 2000. The database is from a
> basic version of SQLServer Express 2005.
> I am trying to attach it in SqlServer Express 2008 with Advanced
> Services.
>
> The precise error message is: "An exception occurred while executing a
> Transact-SQL statement or batch.
> Could not find row in sysindexes for database ID 6, object ID 1,
> index ID 1
> 1. Run DBCC CHECKTABLE on sysindexes. "

My friend, this query when run in SQL 2008:

select * from sys.messages
where text like 'Could not find row in sysindexes%'

returns no rows. Thus, that message does not come from an instance of
SQL 2008. Try running the query yourself.

And, an error message from SQL 2005 or SQL 2008 never tell you run DBCC
CHECKTABLE on sysindexes, because sysindexes is a view in these versions.
This message comes from an instance of SQL 2000.

Run "SELECT @@version" on the server where you try to attach the database
and see what you get.

--
Erland Sommarskog, SQL Server MVP, esquel.DeleteThis@sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
 >> Stay informed about: Problem attaching database 
Back to top
Login to vote
cowznofsky

External


Since: Dec 29, 2007
Posts: 10



(Msg. 5) Posted: Wed Dec 24, 2008 2:47 pm
Post subject: Re: Problem attaching database [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Dec 24, 4:53 pm, Erland Sommarskog wrote:
> cowznofsky ( ) writes:
> > There is nothing here from SqlServer 2000.  The database is from a
> > basic version of SQLServer Express 2005.
> > I am trying to attach it in SqlServer Express 2008 with Advanced
> > Services.
>
> > The precise error message is: "An exception occurred while executing a
> > Transact-SQL statement or batch.
> >  Could not find row in sysindexes for database ID 6, object ID 1,
> >  index ID 1
> >  1. Run DBCC CHECKTABLE on sysindexes. "
>
> My friend, this query when run in SQL 2008:
>
>    select * from sys.messages
>    where text like 'Could not find row in sysindexes%'
>
> returns no rows. Thus, that message does not come from an instance of
> SQL 2008. Try running the query yourself.
>
> And, an error message from SQL 2005 or SQL 2008 never tell you run DBCC
> CHECKTABLE on sysindexes, because sysindexes is a view in these versions.
> This message comes from an instance of SQL 2000.
>
> Run "SELECT @@version" on the server where you try to attach the database
> and see what you get.
>
> --
> Erland Sommarskog, SQL Server MVP, esq... DeleteThis @sommarskog.se
>
> Links for SQL Server Books Online:
> SQL 2008:http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
> SQL 2005:http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
> SQL 2000:http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

I think I see the problem. It says SqlServer 2008 when I go into
Management Studio, but when I connect to what I thought was the db I
just installed, it shows version 8.0.760, which I assume to be an old
(2000?) one. I don't see any other local instance, and I don't see
anything in Services. So I evidently installed just the tools
without the database engine, and am connecting to an old instance.
 >> Stay informed about: Problem attaching database 
Back to top
Login to vote
Erland Sommarskog2

External


Since: May 30, 2004
Posts: 2061



(Msg. 6) Posted: Wed Dec 24, 2008 3:35 pm
Post subject: Re: Problem attaching database [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

cowznofsky ( ) writes:
> I think I see the problem. It says SqlServer 2008 when I go into
> Management Studio, but when I connect to what I thought was the db I
> just installed, it shows version 8.0.760, which I assume to be an old
> (2000?) one.

8.00.760 is indeed SQL 2000, more precisely SP3.

If you plan the instance to upgrade to SQL 2008, I think you will need
to upgrade the instance to SQL 2000 SP4 first, but I am not sure.

If you decide to install a new instance, you can still attach databases
from the SQL 2000 instance to SQL 2008.


--
Erland Sommarskog, SQL Server MVP, esquel.TakeThisOut@sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
 >> Stay informed about: Problem attaching database 
Back to top
Login to vote
vipin92 Gupta

External


Since: Jan 31, 2012
Posts: 1



(Msg. 7) Posted: Tue Jan 31, 2012 4:25 am
Post subject: Re: Problem attaching database [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

The database is from SqlServer Express 2005. I've created an instance
of SQLServer Express 2008 on another machine. I did a shrink on the
db before copying it.

I get a message like
Server: Msg 602, Level 21, State 50, Line 1
Could not find row in sysindexes for database ID 16, object ID 1,
index ID
1. Run DBCC CHECKTABLE on sysindexes.

Hi

> On Monday, December 22, 2008 11:19 AM Erland Sommarskog wrote:

> cowznofsky ( ) writes:
>
> Basically the same message? Please post the exact error message. That
> certainly could help you to get an accurate answer.
>
> The error message above comes from SQL 2000, so my conclusion is that
> you are trying to attach a database from SQL 2005/SQL 2008 on SQL 2000
> and that is not going to work out.
>
>
>
>
> --
> Erland Sommarskog, SQL Server MVP, esquel DeleteThis @sommarskog.se
>
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx


>> On Wednesday, December 24, 2008 4:53 PM Erland Sommarskog wrote:

>> cowznofsky ( ) writes:
>>
>> My friend, this query when run in SQL 2008:
>>
>> select * from sys.messages
>> where text like 'Could not find row in sysindexes%'
>>
>> returns no rows. Thus, that message does not come from an instance of
>> SQL 2008. Try running the query yourself.
>>
>> And, an error message from SQL 2005 or SQL 2008 never tell you run DBCC
>> CHECKTABLE on sysindexes, because sysindexes is a view in these versions.
>> This message comes from an instance of SQL 2000.
>>
>> Run "SELECT @@version" on the server where you try to attach the database
>> and see what you get.
>>
>> --
>> Erland Sommarskog, SQL Server MVP, esquel DeleteThis @sommarskog.se
>>
>> Links for SQL Server Books Online:
>> SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
>> SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
>> SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx


>>> On Wednesday, December 24, 2008 6:35 PM Erland Sommarskog wrote:

>>> cowznofsky ( ) writes:
>>>
>>> 8.00.760 is indeed SQL 2000, more precisely SP3.
>>>
>>> If you plan the instance to upgrade to SQL 2008, I think you will need
>>> to upgrade the instance to SQL 2000 SP4 first, but I am not sure.
>>>
>>> If you decide to install a new instance, you can still attach databases
>>> from the SQL 2000 instance to SQL 2008.
>>>
>>>
>>> --
>>> Erland Sommarskog, SQL Server MVP, esquel DeleteThis @sommarskog.se
>>>
>>> Links for SQL Server Books Online:
>>> SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
>>> SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
>>> SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx


>>>> On Thursday, December 25, 2008 9:09 PM cowznofsky wrote:

>>>> The database is from SqlServer Express 2005. I've created an instance
>>>> of SQLServer Express 2008 on another machine. I did a shrink on the
>>>> db before copying it.
>>>>
>>>> I get a message like
>>>> Server: Msg 602, Level 21, State 50, Line 1
>>>> Could not find row in sysindexes for database ID 16, object ID 1,
>>>> index ID
>>>> 1. Run DBCC CHECKTABLE on sysindexes.
>>>>
>>>>
>>>> (This is copied from a earlier post, but it's basically the same
>>>> message).
>>>>
>>>> Any ideas?
>>>> I suppose I could just run that command on the source db, but it's in
>>>> production and working fine.
>>>>
>>>> I then tried to restore a backup but got a message about too many
>>>> devices or files used (sorry I don't have the exact message here).


>>>>> On Thursday, December 25, 2008 9:10 PM cowznofsky wrote:

>>>>> On Dec 22, 11:19=A0am, Erland Sommarskog wrote:
>>>>> e
>>>>> echnol/sql/2005/downloads/books...
>>>>> previousversions/books.mspx
>>>>>
>>>>> There is nothing here from SqlServer 2000. The database is from a
>>>>> basic version of SQLServer Express 2005.
>>>>> I am trying to attach it in SqlServer Express 2008 with Advanced
>>>>> Services.
>>>>>
>>>>> The precise error message is: "An exception occurred while executing a
>>>>> Transact-SQL statement or batch.
>>>>> Could not find row in sysindexes for database ID 6, object ID 1,
>>>>> index ID 1
>>>>> 1. Run DBCC CHECKTABLE on sysindexes. "


>>>>>> On Thursday, December 25, 2008 9:10 PM cowznofsky wrote:

>>>>>> On Dec 24, 4:53=A0pm, Erland Sommarskog wrote:
>>>>>> x
>>>>>>
>>>>>> I think I see the problem. It says SqlServer 2008 when I go into
>>>>>> Management Studio, but when I connect to what I thought was the db I
>>>>>> just installed, it shows version 8.0.760, which I assume to be an old
>>>>>> (2000?) one. I don't see any other local instance, and I don't see
>>>>>> anything in Services. So I evidently installed just the tools
>>>>>> without the database engine, and am connecting to an old instance.
 >> Stay informed about: Problem attaching database 
Back to top
Login to vote
Erland Sommarskog2

External


Since: May 30, 2004
Posts: 2061



(Msg. 8) Posted: Tue Jan 31, 2012 10:25 am
Post subject: Re: Problem attaching database [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

vipin92 Gupta ( ) writes:
> The database is from SqlServer Express 2005. I've created an instance
> of SQLServer Express 2008 on another machine. I did a shrink on the
> db before copying it.
>
> I get a message like
> Server: Msg 602, Level 21, State 50, Line 1
> Could not find row in sysindexes for database ID 16, object ID 1,
> index ID
> 1. Run DBCC CHECKTABLE on sysindexes.

That message typically occurs when you try to attach a database from
a higher version on SQL 2000.

--
Erland Sommarskog, SQL Server MVP, esquel.TakeThisOut@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
 >> Stay informed about: Problem attaching database 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Problem with attaching a database - Hi, I got a sample database which I want to attach to my local sql server machine. I am issuing the following command: create database Payables on primary (filename = 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\Payables.mdf') log on (filename = ...

Attaching a file from a backup - I have a backup file: tom.bak that is backed up from another Sql Server. I want to add it to my other Sql Server. Do I need to do a restore? Do I need to Create the database first? What about Master - is there something I have to do with that? I am....

XP_SMTP_SendMail and attaching query output - I realize that xp_SMTP_Sendmail doesn't have query support like xp_sendmail. Are there any workarounds to this? I want to query a table and send the results as an attachment. Sample code would be great. Thanks to anyone who could help.

Database Design Problem - Hi, Please suggest me efficient database design for below mentioned business logic . Business Logic:- "ShareBuilder customer login as an "investor". An investor has a username, a password, and a first and last name. An investor can ha...

Profiler problem database name - Hi, I am profiling the Object:Created event, but when I execute the Create Table,View or SP the database name shows a garbage value. I have SQL Server 2000 sp4 installed Any body has any idea how to get the database name. TIA Prasad
   Database Help (Home) -> Programming All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]