cancel
Showing results for 
Search instead for 
Did you mean: 

Authenticating OEM edition DB / applications

vlad1
Participant
0 Kudos
1,951

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

Accepted Solutions (0)

Answers (1)

Answers (1)

chris_keating
Product and Topic Expert
Product and Topic Expert

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.

vlad1
Participant
0 Kudos

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!

chris_keating
Product and Topic Expert
Product and Topic Expert

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.

vlad1
Participant
0 Kudos

Thanks very much Chris, you're a star.

justin_willey
Participant

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.

vlad1
Participant
0 Kudos

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.