Wednesday, March 28, 2012

How to Get the SQL Affinity Mask value in Sql 2005, and table that store this info

Hi All

Can u pls tell me How to Get the SQL Affinity Mask value in Sql 2005.

and what is the table/views name that store this info.

for SQL 2000 , we were using following query:

SQLStatement.printf("select c.value from master..sysconfigures c, master..spt_values v,"
"master..syscurconfigs r where v.type = 'C' and v.number = c.config and v.number >= 0 "
"and v.number = r.config and v.name ='affinity mask'");

lErrCode=SQLExecDirect(hStmt,(SQLCHAR*)pszSQLStatement,strlen(pszSQLStatement));

lSQLBindCol(nAffMask);

But With SQL 2005 , we are getting ZERO(0) ROWS SELECTED.

Is there any reason why you can't just exec sp_configure and look at the value for 'affinity mask'?
(you need 'show advanced options' to be turned on for it to show, though)

/Kenneth

No comments:

Post a Comment