How to find the invalid and corrupted objects in
sql server 2000?
I tried sysindexes and sysobjects tables. Checked the
STATUS column, but didn't understand the values assigned
by Microsoft. Which number means IVALID or Corruption?> How to find the invalid and corrupted objects in
> sql server 2000?
See DBCC CHECKDB and DBCC CHECKTABLE in BOL for starters
sincerely,
--
Sebastian K. Zaklada
Skilled Software
http://www.skilledsoftware.com
This posting is provided "AS IS" with no warranties, and confers no rights.
Showing posts with label sysobjects. Show all posts
Showing posts with label sysobjects. Show all posts
Monday, February 20, 2012
objects
How to find the invalid and corrupted objects in
sql server 2000?
I tried sysindexes and sysobjects tables. Checked the
STATUS column, but didn't understand the values assigned
by Microsoft. Which number means IVALID or Corruption?> How to find the invalid and corrupted objects in
> sql server 2000?
See DBCC CHECKDB and DBCC CHECKTABLE in BOL for starters
sincerely,
--
Sebastian K. Zaklada
Skilled Software
http://www.skilledsoftware.com
This posting is provided "AS IS" with no warranties, and confers no rights.
sql server 2000?
I tried sysindexes and sysobjects tables. Checked the
STATUS column, but didn't understand the values assigned
by Microsoft. Which number means IVALID or Corruption?> How to find the invalid and corrupted objects in
> sql server 2000?
See DBCC CHECKDB and DBCC CHECKTABLE in BOL for starters
sincerely,
--
Sebastian K. Zaklada
Skilled Software
http://www.skilledsoftware.com
This posting is provided "AS IS" with no warranties, and confers no rights.
OBJECTPROPERTY question
Please look at following code:
use mybase
select name,OBJECTPROPERTY(id, N'IsExtendedProc') op from
master.dbo.sysobjects where name=N'xp_myxp'
use master
select name,OBJECTPROPERTY(id, N'IsExtendedProc') op from
master.dbo.sysobjects where name=N'xp_myxp'
When OBJECTPROPERTY is called from mybase it returns NULL. When it is
called from master it returns 1. Why?Hello, Igor
According to the Books Online, OBJECTPROPERTY expects an ID of an
"object in the current database".
Razvan|||Object id values are not unique within a server. So, when you are in the
context of mybase, the value passed to objectproperty is from that database.
So if you had an object with the same ID as xp_myxp you would have gotten a
result, though not the one you would have liked.
You might be able to get away with using the xtype column from sysobjects to
answer your queries question, since extended procs are of type X.
----
Louis Davidson - http://spaces.msn.com/members/drsql/
SQL Server MVP
"Arguments are to be avoided: they are always vulgar and often convincing."
(Oscar Wilde)
"Igor Solodovnikov" <IgorSolodovnikov@.discussions.microsoft.com> wrote in
message news:op.s3uc9fcvn8ihmu@.iw2k.helpmicro.local...
> Please look at following code:
> use mybase
> select name,OBJECTPROPERTY(id, N'IsExtendedProc') op from
> master.dbo.sysobjects where name=N'xp_myxp'
> use master
> select name,OBJECTPROPERTY(id, N'IsExtendedProc') op from
> master.dbo.sysobjects where name=N'xp_myxp'
> When OBJECTPROPERTY is called from mybase it returns NULL. When it is
> called from master it returns 1. Why?
use mybase
select name,OBJECTPROPERTY(id, N'IsExtendedProc') op from
master.dbo.sysobjects where name=N'xp_myxp'
use master
select name,OBJECTPROPERTY(id, N'IsExtendedProc') op from
master.dbo.sysobjects where name=N'xp_myxp'
When OBJECTPROPERTY is called from mybase it returns NULL. When it is
called from master it returns 1. Why?Hello, Igor
According to the Books Online, OBJECTPROPERTY expects an ID of an
"object in the current database".
Razvan|||Object id values are not unique within a server. So, when you are in the
context of mybase, the value passed to objectproperty is from that database.
So if you had an object with the same ID as xp_myxp you would have gotten a
result, though not the one you would have liked.
You might be able to get away with using the xtype column from sysobjects to
answer your queries question, since extended procs are of type X.
----
Louis Davidson - http://spaces.msn.com/members/drsql/
SQL Server MVP
"Arguments are to be avoided: they are always vulgar and often convincing."
(Oscar Wilde)
"Igor Solodovnikov" <IgorSolodovnikov@.discussions.microsoft.com> wrote in
message news:op.s3uc9fcvn8ihmu@.iw2k.helpmicro.local...
> Please look at following code:
> use mybase
> select name,OBJECTPROPERTY(id, N'IsExtendedProc') op from
> master.dbo.sysobjects where name=N'xp_myxp'
> use master
> select name,OBJECTPROPERTY(id, N'IsExtendedProc') op from
> master.dbo.sysobjects where name=N'xp_myxp'
> When OBJECTPROPERTY is called from mybase it returns NULL. When it is
> called from master it returns 1. Why?
Labels:
codeuse,
database,
dbo,
following,
frommaster,
isextendedproc,
microsoft,
mybaseselect,
mysql,
objectproperty,
oracle,
server,
sql,
sysobjects
Subscribe to:
Posts (Atom)