August 29, 2006 at 12:43 am
How to Get the SQL Affinity Mask setting value in Sql 2005?
I need this value in our c++ application.
Can any body tell me the query for this.
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 it is returning ZERO(0)ROWS SELECTED.
August 29, 2006 at 3:09 am
You should be able to use sp_configure:
sp_configure 'affinity mask'
I think you will need to insert the result set into a temporary table or table variable and select from that.
John
August 29, 2006 at 3:22 am
Thanks for reply
But How to get the default value
August 29, 2006 at 6:05 am
You will find the default value in the documentation. If it's the same as for SQL Server 2000, it's 0.
John
August 29, 2006 at 7:41 am
can you tell me the table name where these configuration value(affinity mask value) are stored . In Sql 2000 it was in spt_values, but in sql 2005 i didn't find any entry for affinity mask
August 29, 2006 at 8:32 am
Ravi
I don't know, but you may find the answer if you examine the code of the stored procedure sp_configure.
John
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply