on 2013 Aug 01 4:27 AM
i am using sybase 11 oem edition.when i try to create a table in sybase central it gives the following error.'Could not execute statement.Authentication violation.SQLCODE=-98, ODBC 3 State="08001"'.And when i try to create a table via program it is successfully creating the table without error.could you please help me to understand the behaviour of the oem edition.
Request clarification before answering.
For the OEM Edition you will have to set the database authentication option for each connection which is used by your application, so that SQLA can check if the application is allowed to access that DB server. The Sybase tools which come with the OEM edition will set the connection_authentication usually with a Sybase specific string, so that you are able to use these tools to access and manipulate your databases. So my guess is, that you are currently not using the tools, which come with the OEM edition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Martin,thanks for the information.when i am trying to do any DDL operation in sybase central without setting "SET OPTION PUBLIC.DATABASE_AUTHENTICATION...." i am getting authentication error.But if i do in program using normal jdbc connection it is executing without any problem, it should give me the same error right..I am not sure whether its a correct behavior or not.My requirement is to authenticate via JDBC connection..
I think you are mixing two aspects:
A. The database itself must be authenticated once (and restarted once at least afterwards), i.e. by setting
SET OPTION PUBLIC.database_authentication = 'company = company-name; application = application-name; signature = database-signature';
That's required to do any modification to a database running on the OEM edition - it doesn't matter whether you use Sybase tools or your own program.
B. Your own program (i.e. the database connections) must authenticate itself when accessing an authenticated database. That's done with the connection_authentication option as described by Martin and Reimer.
I suppose your program is initializing the authentication that is required to make changes to the db. I you connect thru Sybase Centra, ISQL or other tools, you'll have to send the authentication string. From the docs:
SET TEMPORARY OPTION connection_authentication = 'company = company-name; application = application-name; signature = application-signature';
See connection_authentication option [database]
This is not the only way to authentice your connection, but the first one that came to my mind.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
AFAIK, that's not true for Sybase Central and the other Sybase tools (and Martin seems to share that experience). From the v12.0.1 docs:
All the database tools included with SQL Anywhere, including Sybase Central, Interactive SQL, and the utilities, such as dbbackup, are self-authenticating. They are unrestricted in their operations against any authenticated database. If the database itself is not authenticated, the tools act in a restricted, read-only fashion.
So theses builtin tools do not need the specific OEM string, however, the particular app will need it.
User | Count |
---|---|
52 | |
10 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.