v16.0.0.2419

The use of the InitString connection parameters is one of the recommended methods of implementing OEM authentication, but except in the simplest scenarios there seem to be issues.

Say my OEM connection key is

CONNECTION_AUTHENTICATION='Company=MyCo;Application=MyApp;Signature=000fa55157edbxxxxxxxxxxxxxx'

If I have an InitString like this:

InitString="SET TEMPORARY OPTION CONNECTION_AUTHENTICATION='Company=MyCo;Application=MyApp;Signature=000fa55157edbxxxxxxxxxxxxxx';" 
it works fine and I see the details showing in Sybase Central under Connection | Properties |Extended Information.

InitString seems quite happy to execute multiple commands eg

InitString="CREATE VARIABLE MyTest char(4);set MyTest = 'Blah';"

But if other commands are combined with setting the CONNECTION_AUTHENTICATION, then the CONNECTION_AUTHENTICATION fails. Commands before the SET TEMPORARY OPTION command work, even though the SET doesn't. Any commands after the SET don't get executed ie

InitString="CREATE VARIABLE MyTest char(4);set MyTest = 'Blah'; SET TEMPORARY OPTION CONNECTION_AUTHENTICATION='Company=MyCo;Application=MyApp;Signature=000fa55157edbxxxxxxxxxxxxxx';"
successfully creates and populates the variable but the SET OPTION fails. With:
InitString="SET TEMPORARY OPTION CONNECTION_AUTHENTICATION='Company=MyCo;Application=MyApp;Signature=000fa55157edbxxxxxxxxxxxxxx';CREATE VARIABLE MyTest char(4);set MyTest = 'Blah'; "
the variable isn't created, nor does the SET OPTION work.

asked 11 May, 10:57

Justin%20Willey's gravatar image

Justin Willey
6.7k108138208
accept rate: 20%

1

I haven't found a complete answer but you can do 2 things to help diagnose this:

  1. group you statements inside of '{', '}' braces can be used to signal a SQL batch (though I don't see how much of a difference that makes,

  2. use -zr sql to see what is happening on the database sever side

I see something similar to you and noticing various errors ... maybe your efforts can kick that ball the rest of the way into the net.

(12 May, 10:17) Nick Elson S...
Replies hidden

Thanks Nick - I'll do some more digging based on your suggestions.

(12 May, 10:32) Justin Willey

Justin, could you use a login procedure for the CREATE VARIABLE stuff (making that within the InitString unneccessary)?

(13 May, 04:04) Volker Barth
Be the first one to answer this question!
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:

×198
×34
×1

question asked: 11 May, 10:57

question was seen: 46 times

last updated: 13 May, 04:04