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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

IS_MEMBER<br />

The IS_MEMBER function returns whether the current user is a member of the specified Windows NT<br />

group/<strong>SQL</strong> <strong>Server</strong> role. The syntax is as follows:<br />

IS_MEMBER ({‘’ | ‘’})<br />

The group parameter specifies the name of the NT group and must be in the form domain\group. The<br />

role parameter specifies the name of the <strong>SQL</strong> <strong>Server</strong> role. The role can be a database fixed role or a userdefined<br />

role but cannot be a server role.<br />

This function will return a 1 if the current user is a member of the specified group or role, a 0 if the<br />

current user is not a member of the specified group or role, and NULL if the specified group or role is<br />

invalid.<br />

IS_SRVROLEMEMBER<br />

The IS_SRVROLEMEMBER function returns whether a user is a member of the specified server role. The<br />

syntax is as follows:<br />

IS_SRVROLEMEMBER (‘’ [,’’])<br />

The optional login parameter is the name of the login account to check — the default is the current<br />

user. The role parameter specifies the server role and must be one of the following possible values:<br />

❑ sysadmin<br />

❑ dbcreator<br />

❑ diskadmin<br />

❑ processadmin<br />

❑ serveradmin<br />

❑ setupadmin<br />

❑ securityadmin<br />

This function returns a 1 if the specified login account is a member of the specified role, a 0 if the login is<br />

not a member of the role, and a NULL if the role or login is invalid.<br />

SUSER_ID<br />

The SUSER_ID function returns the specified user’s login ID number. The syntax is as follows:<br />

SUSER_ID([‘’])<br />

Apendix A: System Functions<br />

The login parameter is the specified user’s login ID name. If no value for login is provided, the default<br />

of the current user will be used instead.<br />

631

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

Saved successfully!

Ooh no, something went wrong!