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 />

❑ IsCloseCursorsOnCommitEnabled — Any cursors that are open when a transaction is<br />

committed will be closed.<br />

❑ IsDboOnly — The database is only accessible to the dbo.<br />

❑ IsDetached — The database was detached by a detach operation.<br />

❑ IsEmergencyMode — The database is in emergency mode.<br />

❑ IsFulltextEnabled — The database has been full-text enabled.<br />

❑ IsInLoad — The database is loading.<br />

❑ IsInRecovery — The database is recovering.<br />

❑ IsInStandby — The database is read-only and restore log is allowed.<br />

❑ IsLocalCursorsDefault — Cursor declarations default to LOCAL.<br />

❑ IsNotRecovered — The database failed to recover.<br />

❑ IsNullConcat — Concatenating to a NULL results in a NULL.<br />

❑ IsOffline — The database is offline.<br />

❑ IsQuotedIdentifiersEnabled — Identifiers can be delimited by double quotation marks.<br />

❑ IsReadOnly — The database is in a read-only mode.<br />

❑ IsRecursiveTriggersEnabled — The recursive firing of triggers is enabled.<br />

❑ IsShutDown — The database encountered a problem during startup.<br />

❑ IsSingleUser — The database is in single-user mode.<br />

❑ IsSuspect — The database is suspect.<br />

❑ IsTruncLog — The database truncates its logon checkpoints.<br />

❑ Version — The internal version number of the <strong>SQL</strong> <strong>Server</strong> code with which the database was<br />

created.<br />

The return value from this function will be 1 for true, 0 for false, and NULL if the input was not valid —<br />

except for Version (where the function will return the version number if the database is open and NULL<br />

if the database is closed).<br />

DATABASEPROPERTYEX<br />

618<br />

The DATABASEPROPERTYEX function is basically a superset of DATABASEPROPERTY, and also returns<br />

the setting for the specified database and property name. The syntax is pretty much just the same as<br />

DATABASEPROPERTY and is as follows:<br />

DATABASEPROPERTYEX(‘’, ‘’)<br />

DATABASEPROPERTYEX just has a few more properties available, including:<br />

❑ Collation — Returns the default collation for the database (remember, collations can also be<br />

overridden at the column level).

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

Saved successfully!

Ooh no, something went wrong!