Changing from SQL Server Management Studio 2008 to 2012 has resulted in my cmd code not working :
bcp "SELECT [id],[AlmLog_TimeStamp],[AlmLog_ID],[AlmLog_State]
FROM DB02REA05461.[dbo].[AlarmLog]
ORDER BY [id]"
queryout wtg02.txt -c -S10.51.23.51\NAID -Ucus -PsFO
It gives me the following error:
SQLState = 08001, NativeError = 22 Error = [Microsoft][SQL Server Native Client 11.0]SQL Server Native Client 11.0 does not support connections to SQL Server 2000 or earlier versions. SQLState = 08001, NativeError = 22 Error = [Microsoft][SQL Server Native Client 11.0]Client unable to establish connection
Any help on altering the code from cmd would be appreciated.
SELECT @@VERSION) Which compatibility level does your database have? (SELECT name, compatibility_level FROM sys.databases WHERE name = 'YourDatabaseNameHere'). SQL Server 2012 (and its Management Studio) do no longer support SQL Server 2000 (as an engine version) or a compatibility level of80(which corresponds to SQL Server 2000) - time to upgrade! - marc_s