Error 195

Severity

15

Message text

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

Explanation

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:

State

Meaning

1

Invalid create procedure option.

2

Invalid timestamp keyword on writetext.

3

Invalid log keyword on writetext.

4

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

5

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

6

Invalid option on set offset.

7

All other invalid set options

8

Invalid option on set statistic.

15

Invalid quiesce database begin option

16

Invalid quiesce database end option

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

Action

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