17.06.2013 Views

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Appendix A: System Functions<br />

OBJECTPROPERTYEX<br />

OBJECTPROPERTYEX is an extended version of the OBJECTPROPERTY function.<br />

OBJECTPROPERTYEX(, )<br />

Like OBJECTPROPERTY, the id parameter specifies the ID of the object required. The property parameter<br />

specifies the information required on the object. OBJECTPROPERTYEX supports all the same property values<br />

as OBJECTPROPERTY but adds the following property values as additional options:<br />

❑ BaseType — Returns the base data type of an object.<br />

❑ IsPrecise — Indicates that your object does not contain any imprecise computations. For example,<br />

an int or decimal is precise, but a float is not — computations that utilize imprecise data types<br />

must be assumed to return imprecise results. Note that you can specifically mark any .NET<br />

assemblies you produce as being precise or not.<br />

❑ IsSystemVerified — Indicates whether the IsPrecise and IsDeterministic properties<br />

can be verified by <strong>SQL</strong> <strong>Server</strong> itself (as opposed to just having been set by the user).<br />

❑ SchemaId — Just what it sounds like — returns the internal system ID for a given object. You<br />

can then use SCHEMA_NAME to put a more user-friendly name on the schema ID.<br />

❑ SystemDataAccess — Indicates whether the object in question relies on any system table data.<br />

❑ UserDataAccess — Indicates whether the object in question utilizes any of the user tables or<br />

system user data.<br />

@@PROCID<br />

Returns the stored procedure ID of the currently running procedure.<br />

Primarily a troubleshooting tool when a process is running and using up a large amount of resources. Is<br />

used mainly as a DBA function.<br />

SCHEMA_ID<br />

Given a schema name, returns the internal system ID for that schema. Utilizes the syntax:<br />

SCHEMA_ID( )<br />

SCHEMA_NAME<br />

626<br />

Given an internal schema system ID, returns the user-friendly name for that schema. The syntax is:<br />

SCHEMA_NAME( )

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!