Hi all,

Several months ago we purchased an OEM edition SQL Anywhere 17 Advanced edition for the rollout to client network (they are running our solution SQL Anywhere / Powerbuilder), and I guess it was the first time we've ever purchased OEM edition, as we've just encountered "Authentication violation" when we try to change anything in the DB, via the application or the Sybase Central / Interactive SQL.

So I've been reading up on it a bit. I've found the SAP link where I can submit our company name and application name to receive authentication signature, but I am so new to this that I would warmly appreciate all information:

  1. After I receive the authentication sig, I just need to run the

    SET OPTION PUBLIC.database_authentication='company=company-name; application=application-name; signature=database-signature';

    and restart the database, and after this the database end is authenticated, Sybase Central and Interactive SQL are fully read/writable, they are no longer read-only, correct?

  2. Our application is a Powerbuilder application accessing the database via ODBC data source. How exactly do we authenticate the application via the Powerbuilder source code? What if we have another application (dot Net) accessing the database via the same ODBC profile? Is it possible at all to skip on the application authenticating?

I'm sorry if it's a newbie question, but in almost 20 years working with SQL Anywhere, this is the first time we're using the OEM edition and have to work with anything like database authentication

asked 15 Sep '20, 12:01

PcrMember's gravatar image

PcrMember
193101422
accept rate: 0%

edited 15 Sep '20, 12:03


If you have an existing database, you will not be able to issue DATABASE_AUTHENTICATION while that database is running on an authenticated engine. You will need to set that option on an non-OEM based engine. If you are creating/rebuilding databases on an OEM engine, you can setup an authenticate.sql file (as documented) to create authenticated databases on an OEM engine.

To set the connection_authentication in PowerBuilder, you will use the PowerBuilder EXECUTE IMMEDIATE statement in the example provided in the link.

permanent link

answered 15 Sep '20, 14:03

Chris%20Keating's gravatar image

Chris Keating
7.8k49128
accept rate: 32%

edited 15 Sep '20, 14:05

Hi Chris, thanks very much for that - useful to know. We are indeed rebuilding the DBs in the process of upgrade (from 11 to 17) on our development environment which is non-OEM. So useful to know that we have to authenticate the DB in our own environment and only then transfer it and run it on client's authenticated engine.

Just to understand, once the DB is authenticated and running on authenticated engine, we can use Sybase Central and Interactive SQL with full read/write access as they are self-authenticated, from what I've read elsewhere?

OK, so if we get the authentication credentials from SAP quickly, this doesn't sound too difficult. We just call EXECUTE IMMEDIATE using the syntax in the link you provided with our credentials as soon as we create the DB connection. We just do

SQLCA.of_SetUser(as_userid, as_password)

if SQLCA.of_Connect() <> 0 then ... else end if

So in that ELSE we can just call EXECUTE IMMEDIATE from what I understand?

Thanks very much!

(15 Sep '20, 14:35) PcrMember
1

Correct. As long as the database has a valid DATABASE_AUTHENTICATION value, all of the SQL Anywhere tools (DBISQL,SQL Central, and command line utilities) are self authenticating and will have full read/write access.

Also correct, call the EXECUTE IMMEDIATE in the ELSE based on the code snippet.

(15 Sep '20, 14:58) Chris Keating

Thanks very much Chris, you're a star.

(16 Sep '20, 08:24) PcrMember
2

BTW - what makes life easier is that nothing complains if your application sets the database_authentication option when you connect to a non-OEM server, it's just ignored. So you don't need to do anything different in your dev environment.

(16 Sep '20, 09:40) Justin Willey

Hi Justin,

Thanks - indeed, in dev environment we noticed nothing, so no changes needed :)

Still, it would be nice if there was some get-around way to completely sidestep authentication on the OEM Edition. We are stuck for now, and yesterday I have submitted a request to SAP but nothing yet.

(17 Sep '20, 09:47) PcrMember
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×38
×30
×24

question asked: 15 Sep '20, 12:01

question was seen: 1,483 times

last updated: 17 Sep '20, 09:47