ISQL vs DBaccess
Posted in 2017
User reported ISQL not displaying table privileges while DBAccess did show them. Expert explained ISQL code dates back to v7.xx catalog and likely has a query broken by systabauth schema changes. Thread then shifted to unrelated error -404 (cursor/statement unavailable) in 4GL application when upgraded from v7.50 to v7.51_fc2. No resolution recorded.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Installation, Setup & Upgrades, Connectivity: ESQL/C, 4GL & Embedded SQL, Server Administration
Hi, Our server environment on hpux install with ids 11.50 fc8 with r4gl & isql 7.51_fc2. Using ID informix a.dbaccess gisdb > table > info > company > privilles. output as below: ----------------------- gisdb@bgisrv1 -------- Press CTRL-W for Help -------- User Select Update Insert Delete Index Alter public All All Yes Yes Yes No B.isql gisdb > table > info > company > privilles. output as below: ----------------------- gisdb ----- -------- Press CTRL-W for Help -------- User Select Update Insert Delete Index Alter --Cannot appear status for user,select,updated,insert,delete,index & alter. This because i need to configure something on isql or it like bug? Please advice. notes: cannot upload screen capture here since no attachment file allow. Thank You
It's probably because the ISQL code dates back to the v7.xx catalog. There was probably a change in the schema of the systabauth table that is breaking the query that isql uses to fetch the privileges. Art Art S. Kagel, President and Principal Consultant ASK Database Management www.askdbmgt.com Blog: http://informix-myview.blogspot.com/ Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Fri, Apr 7, 2017 at 4:09 AM, MOHD FADZIL JUSOH <fadzil@isianpadu.com> wrote: > Hi, > > Our server environment on hpux install with ids 11.50 fc8 with r4gl & isql > 7.51_fc2. > > Using ID informix > > a.dbaccess gisdb > table > info > company > privilles. output as below: > > ----------------------- gisdb@bgisrv1 -------- Press CTRL-W for Help > -------- > > User Select Update Insert Delete Index Alter > > public All All Yes Yes Yes No > > B.isql gisdb > table > info > company > privilles. output as below: > > ----------------------- gisdb ----- -------- Press CTRL-W for Help -------- > > User Select Update Insert Delete Index Alter > > --Cannot appear status for user,select,updated,insert,delete,index & > alter. > > This because i need to configure something on isql or it like bug? > > Please advice. > > notes: cannot upload screen capture here since no attachment file allow. > > Thank You > > > ************************************************************ > ******************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --94eb2c1cdb5e7f464c054c93afd7
HI,
"It's probably because the ISQL code dates back to the v7.xx catalog", This
means what & how to fix it. Currently we used latest version as below:
[3] % r4gl -v
IBM INFORMIX-4GL Version 7.51.FC2
Software Serial Number RDS#N000000
[4] % fglgo -v
IBM INFORMIX-4GL Version 7.51.FC2
Pcode Version 732-750
Software Serial Number RDS#N000000
[5] % fglpc -v
IBM INFORMIX-4GL Version 7.51.FC2
Pcode Version 732-750
[22] % isql -v
IBM INFORMIX-SQL Version 7.51.FC2
Software Serial Number RDS#N000000
Before this our application can run successful on version 7.50, but know
return this error:
Program stopped at "gis00000.4gl", line number 33.
SQL statement error number -404.
The cursor or statement is not available.
33 DATABASE gisdb
34 SELECT USER, co_name INTO usr_id, sys_name FROM company
35 LET db_flg = TRUE
36
37 -----------------------------------------<< Seq 1
38 LET mbrh = NULL
39 SELECT ua_branch INTO mbrh FROM useraccess
40 WHERE ua_userid = usr_id
41
42 LET dcnt = 0
43 SELECT COUNT(*) INTO dcnt FROM drbranch
44 WHERE br_branch = mbrh
45 IF dcnt IS NULL THEN LET dcnt = 0 END IF
46
47 IF dcnt <> 0 THEN
48 ERROR "Sorry!! You can't access. DRP is in the progress, you can only
access AFTER the DRP."
49 SLEEP 3
50 EXIT PROGRAM
51 END IF
52 ----------------------------------------->> Seq 1
53
Error 404 look like used don't have previllages to access database, but i
already grant it:
grant dba to "ping";
GRANT CONNECT TO "ping";
GRANT CONNECT TO PUBLIC;
But still problem not resolve, please advice.
Thank You
Error -404 means that the code tried to open a cursor or statement that was
not prepared.
Art
On Apr 7, 2017 11:42, "MOHD FADZIL JUSOH" <fadzil@isianpadu.com> wrote:
> HI,
>
> "It's probably because the ISQL code dates back to the v7.xx catalog", This
> means what & how to fix it. Currently we used latest version as below:
>
> [3] % r4gl -v
> IBM INFORMIX-4GL Version 7.51.FC2
> Software Serial Number RDS#N000000
> [4] % fglgo -v
> IBM INFORMIX-4GL Version 7.51.FC2
> Pcode Version 732-750
>
> Software Serial Number RDS#N000000
> [5] % fglpc -v
> IBM INFORMIX-4GL Version 7.51.FC2
> Pcode Version 732-750
>
> [22] % isql -v
> IBM INFORMIX-SQL Version 7.51.FC2
> Software Serial Number RDS#N000000
>
> Before this our application can run successful on version 7.50, but know
> return this error:
>
> Program stopped at "gis00000.4gl", line number 33.
> SQL statement error number -404.
> The cursor or statement is not available.
>
> 33 DATABASE gisdb
>
> 34 SELECT USER, co_name INTO usr_id, sys_name FROM company
>
> 35 LET db_flg = TRUE
>
> 36
>
> 37 -----------------------------------------<< Seq 1
>
> 38 LET mbrh = NULL
>
> 39 SELECT ua_branch INTO mbrh FROM useraccess
>
> 40 WHERE ua_userid = usr_id
>
> 41
>
> 42 LET dcnt = 0
>
> 43 SELECT COUNT(*) INTO dcnt FROM drbranch
>
> 44 WHERE br_branch = mbrh
>
> 45 IF dcnt IS NULL THEN LET dcnt = 0 END IF
>
> 46
>
> 47 IF dcnt <> 0 THEN
>
> 48 ERROR "Sorry!! You can't access. DRP is in the progress, you can only
> access AFTER the DRP."
>
> 49 SLEEP 3
>
> 50 EXIT PROGRAM
>
> 51 END IF
>
> 52 ----------------------------------------->> Seq 1
>
> 53
>
> Error 404 look like used don't have previllages to access database, but i
> already grant it:
>
> grant dba to "ping";
> GRANT CONNECT TO "ping";
> GRANT CONNECT TO PUBLIC;>
> But still problem not resolve, please advice.
>
> Thank You
>
>
> ************************************************************
> *******************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001a114b6c68d94528054c95b1e5
Hi, Yes, i agreed that but based on error line look like program cannot access database, i'm right? "The cursor or statement is not available because the connection to the server does not exist or was lost. The person who created this table has not granted Update privilege to your account name or to the public. The owner of the table or the DBA must grant this privilege before you can update a row in this table." Program stopped at "gis00000.4gl", line number 33. Line 33 refer to database: 33 DATABASE gisdb 34 SELECT USER, co_name INTO usr_id, sys_name FROM company 35 LET db_flg = TRUE 36 37 -----------------------------------------<< Seq 1 38 LET mbrh = NULL 39 SELECT ua_branch INTO mbrh FROM useraccess 40 WHERE ua_userid = usr_id Please advice. Thank You
That's possible
But what does it have to do with isql? If you can't check the privs woth
isql menus you still can using dbaccess or entering a query tl fetch the
privs record from sysuserauth for tbe user trying to run the app.
Art
On Apr 7, 2017 12:10, "MOHD FADZIL JUSOH" <fadzil@isianpadu.com> wrote:
Hi,
Yes, i agreed that but based on error line look like program cannot access
database, i'm right?
"The cursor or statement is not available because the connection to the
server
does not exist or was lost.
The person who created this table has not granted Update privilege to
your account name or to the public. The owner of the table or the DBA
must grant this privilege before you can update a row in this table."
Program stopped at "gis00000.4gl", line number 33.
Line 33 refer to database:
33 DATABASE gisdb
34 SELECT USER, co_name INTO usr_id, sys_name FROM company
35 LET db_flg = TRUE
36
37 -----------------------------------------<< Seq 1
38 LET mbrh = NULL
39 SELECT ua_branch INTO mbrh FROM useraccess
40 WHERE ua_userid = usr_id
Please advice.
Thank You
************************************************************
*******************
Forum Note: Use "Reply" to post a response in the discussion forum.
--94eb2c1cdb5e99cabc054c95eb25