Click here to Skip to main content
15,894,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
SELECT CASE SERVERPROPERTY('IsIntegratedSecurityOnly')   
WHEN 1 THEN 'Windows Authentication'   
WHEN 0 THEN 'Windows and SQL Server Authentication'   
END as [Authentication Mode] 

Msg 102, Level 15, State 1, Line 3
Incorrect syntax near ' '. 


What I have tried:

Facing issue in only SQL Server 2008 R2
Posted
Updated 10-Mar-17 21:35pm

1 solution

Hmmm.
I just tried it on SQL 2012 and your query copy'n'pasted ran fine: "Windows and SQL Server Authentication" was returned.
And the documentation SERVERPROPERTY (Transact-SQL)[^] says it appies to SQL 2008, so it should work for you.

Check your query - make sure that it isn't some other part of a bigger query that is throwing the error and making you think it's the SERVERPROPERTY call that causes the problem.
Failing that, how exactly are you executing the query?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900