Error 195



Message text

’%.*s’ is not a recognized %S_MSG.


Error 195 is raised when a query contains illegal syntax. Specifically, it is raised when the Adaptive Server parser expects a specific syntax (such as a particular command, keyword, or punctuation mark), but instead encounters different syntax or missing text.

Error 195 is raised with these states:




Invalid create procedure option.


Invalid timestamp keyword on writetext.


Invalid log keyword on writetext.


Invalid shutdown option, invalid trace keyword on kill, or invalid option on set lock.


Invalid set option; covers miscellaneous options that are set to on or off.


Invalid option on set offset.


All other invalid set options


Invalid option on set statistic.


Invalid quiesce database begin option


Invalid quiesce database end option

The following common query errors may raise a 195 error message:


Check the query syntax; the state of the error can be helpful in locating the source of the problem in a complex query.

Check the semantics to make sure that the keywords or options used in the query are valid where they are used in the query.

If you are running xp_cmdshell:

If the 195 error was raised when you attempted to run xp_cmdshell, check for invalid syntax and check the parameters supplied to the procedure. Combinations of single and double quotes can make it impossible for a command to be parsed; replace each double quote (") with two single quotes (') and retry.

If you are using Component Integration Services:

If the 195 error was raised when you queried an object in a remote server using Component Integration Services (CIS): your query may be using Transact-SQL syntax which is not understood by the (non-Sybase) remote server. To correct this, use the sp_passthru stored procedure, which allows you to pass a SQL statement using syntax native to the remote server. For example:

sp_passthru ORACLE, "select date from shiptable",
@errcode output, @errmsg output, @rowcount output,
@shipdate output

Additional information

See the Reference Manual: Procedures for more information about using sp_passthru.

Versions in which this error is raised

All versions