1

I'm having a problem on my customer pc (and not on my own) when I run this embedded sql script in a Powerbuilder application on a ASA8 database. I use embedded scripts to modify database tables and add users:

ALTER TABLE LOADCON ADD LOADSALES_RATE NUMERIC(12,2);

It produces the following error:

SQLDBCODE: -121 - SQLSTATE = 42000
[Sybase][ODBC Driver][Adaptive Server Anywhere]Syntax error or access violation: Permission denied: you do not have permission to...

I have separate embedded code to add users and grand permissions - and these don't produce any errors:

sp_addlogin user_name, password
GRANT CONNECT TO user_name IDENTIFIED BY password
GRANT GROUP to DBA
GRANT MEMBERSHIP in group DBA to user_name

But when I run this:

GRANT SELECT, INSERT, UPDATE, DELETE ON table_name TO user_name

it kicks up a similar error to the above:

SQLDBCODE: -121 - SQLSTATE = 42000
[Sybase][ODBC Driver][Adaptive Server Anywhere]Syntax error or access violation: Permission denied: you do not have permission to grant permissions on 'table_name'

When I execute this embedded script on my machine (windows7) logged on from a PB app to ASA8 using dba/sql it works with no fail errors (except user_names already exists) but running the same on a customer machine (windows8) the above fails with SQLCODE = -1 , SQLCA.SQLERRTEXT messages as shown.

Any advise please.

Thanks Alex

Seki
  • 11,135
  • 7
  • 46
  • 70

1 Answers1

0

Permission differences are all about which account is currently logged on...

Is the Windows 8 machine also logging on as DBA/SQL?

And is this the same physical database, or are these two separate local ASA8 engines running their own .DB file?

NoazDad
  • 608
  • 3
  • 9
  • Hi. - Yes, the Win8 PC also logged on as dba/sql. - The same bd file but copied on 2 different machines... thus yes 2 different files on 2 different machines but one the copy of the other. - the customer emailed me his db file. I installed in on my side, logged in with dba/sql and the sql in question executed with no errors. - Could it be the customers win8 OS security somehow interferring with read/write access to the db file? – Alex Szlanina Jul 17 '15 at 08:58
  • Well, if you didn't have read/write permissions on the .DB file (or the folder it's in), then I doubt the local ASA8 engine would even start. Don't forget, ASA8 is LONG off of active maintenance. I think it's from around 2001, so most definitely not certified or supported on Windows 8... – NoazDad Jul 19 '15 at 02:33