Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
amy
Starting Member
30 Posts |
Posted - 2002-05-02 : 09:51:34
|
| DBCC SHOWCONTIG (AddressTypes)when I excute above statement, I got the following error:error:Parameter 1 is incorrect for this DBCC statement.What's wrong?Thanks |
|
|
Kevin Snow
Posting Yak Master
149 Posts |
Posted - 2002-05-02 : 13:43:55
|
| I get the same error on SQL 7.0, but the same statement syntax works fine on SQL 2000.In SQL 7.0, you need to look up the table ID. It is expecting an integer parameter rather than a table name.What version of SQL Server are you on? |
 |
|
|
amy
Starting Member
30 Posts |
Posted - 2002-05-02 : 13:49:28
|
2K==============USE DatabaseNameGODECLARE @ID INT,@IndxID int,@IndexName varchar(128)SELECT @IndexName = 'IndexNameset @id = Object_ID('TableName')select @indxID = IndIDfrom sysindexeswhere id = @IDand name = @indexnamedbcc showcontig(@id, @indxid)GO===============It work fine with statment above . Do you know any way to look up all tables at one time?Thanksquote: I get the same error on SQL 7.0, but the same statement syntax works fine on SQL 2000.In SQL 7.0, you need to look up the table ID. It is expecting an integer parameter rather than a table name.What version of SQL Server are you on?
|
 |
|
|
|
|
|