I am using sqla 11.0.01.2584 and it is oem database. The database has the authentication option set and only our main app can make changes to it. I have the authentication key and I am adding another app that will connect to this database, but the problem is that app is making connection from sql server via linked server and I am not sure how I can set this option from sql server stored procedure using linked server to sqla database. Another option we r looking at is dropping the authentication without rebuilding the database, is this posisble? any help would be much appreciated.

asked 20 Apr '12, 09:00

javedrehman's gravatar image

javedrehman
256141421
accept rate: 0%

edited 20 Apr '12, 09:40

Volker%20Barth's gravatar image

Volker Barth
29.6k294444650


If you are running OEM software, you must authenticate both the connection and the database. If the database is not authenticated and it is running on a OEM engine, there is no grace period - any write operation against the database will result in an -98 Authentication Violation error. If you leave database_authentication set, you are at least getting read-only access to the database,

To address this issue, you can use the InitString connection parameter. See Executing the authentication statement for a discussion in the context of authenticated applications.

permanent link

answered 20 Apr '12, 09:37

Chris%20Keating's gravatar image

Chris Keating
2.6k1647
accept rate: 27%

edited 20 Apr '12, 09:57

Just to add to Chris's answer: In order to work with a MS Linked Server, I guess you will have to

  • add the InitSting to the "Provider String" for the SQL Anywhere OLEDB provider you are using, or
  • possibly by adding an OPENQUERY call the following with your according OEM string before you query the SQL Anywhere database (I'm not sure whether this does work as it would require that the Linked Server access does use the same database connection for both calls):

    SELECT * FROM OPENQUERY(<YourSAProvider>,
    'SET TEMPORARY OPTION connection_authentication=''company = ...'';')

permanent link

answered 20 Apr '12, 10:14

Volker%20Barth's gravatar image

Volker Barth
29.6k294444650
accept rate: 32%

edited 20 Apr '12, 10:17

Can I add the intistring to 'add addtitional connection' parameter space under Advance tab on the odbc configuration window. I just wanted to add initstring here and leave all the other params as it is, will that work?

(23 Apr '12, 09:00) javedrehman

Yes that will work. It does expose the connection_authentication value but authentication is not intended as a security mechanism.

(23 Apr '12, 10:01) Chris Keating
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:

×22
×20

question asked: 20 Apr '12, 09:00

question was seen: 1,336 times

last updated: 23 Apr '12, 10:01