 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
GeneW
Joined: 10 Apr 2012 Posts: 19 Country: United States |
|
Netezza odbc driver suddenly disconnects |
|
I have been using sql assistant 9.0.162 Professional and was testing some Netezza queries - suddenly started getting an error like this:
 |
 |
Prepare: ODBC Error (46): SQLPrepareW
Client: Release 7.2.1.2 [Build 47843]
Server: 07.02.0001 Release 7.2.1.2 [Build 47843]
SQL State: HY000
ERROR: Permission denied on "_T_USER".;
select distinct u.usename as schemaname, 'SC' as schematype, u.usesysid as schemaid
from _t_object AS o
join _t_user AS u
on u.usesysid = o.objowner
join _t_object_classes AS c
on c.objclass = o.objclass
where o.objdb in (SELECT 0::OID as objid
UNION ALL
SELECT d.oid
FROM _t_database AS d
WHERE d.datname = ? )
and c.classname IN ('TABLE',
'VIEW',
'MATERIALIZED VIEW',
'SEQUENCE',
'EXTERNAL TABLE',
'PROCEDURE',
'TRIGGER',
'FUNCTION',
'SYNONYM',
'SYSTEM TABLE',
'SYSTEM VIEW',
'SYSTEM SEQ',
'SYSTEM MVIEW',
'MANAGEMENT TABLE' )
and o.objclass > 0 |
I also have Aginity installed and I am not getting these connection errors with it. Normally I can run both side-by-side, both using odbc driver to connect to the Netezza box. In SQL Assistant the error pops up when I click on any of the databases in the object explorer tree. I have tried closing the SQL Editor and using the context menu in the notification panel to exit sql assistant completely - then restarting it, but it still throws the error.
|
|
Fri Oct 14, 2016 6:48 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
This error says ERROR: Permission denied on "_T_USER".;
The _t_user is referenced in the query
 |
 |
select distinct u.usename as schemaname, 'SC' as schematype, u.usesysid as schemaid
from _t_object AS o
join _t_user AS u
on u.usesysid = o.objowner
join _t_object_classes AS c
on c.objclass = o.objclass
where o.objdb in (SELECT 0::OID as objid
UNION ALL
SELECT d.oid
FROM _t_database AS d
WHERE d.datname = ? )
and c.classname IN ('TABLE',
'VIEW',
'MATERIALIZED VIEW',
'SEQUENCE',
'EXTERNAL TABLE',
'PROCEDURE',
'TRIGGER',
'FUNCTION',
'SYNONYM',
'SYSTEM TABLE',
'SYSTEM VIEW',
'SYSTEM SEQ',
'SYSTEM MVIEW',
'MANAGEMENT TABLE' )
and o.objclass > 0 |
I noticed you work with NZ 7.2. the query above is for 7.0 only. Please verify you use factory default SQL Assistant settings. The equivalent query in SQL Assistant settings for NZ version 7.1 and 7.2 is below
 |
 |
select distinct o.objname as schemaname, 'SC' as schematype, objid as schemaid
from _t_object as o
join _t_object_classes as c
on c.objclass = o.objclass
where c.classname = 'SCHEMA'
and o.objdb in (SELECT 0::OID as objid
UNION ALL
SELECT d.oid
FROM _t_database AS d
WHERE d.datname = :DB_NAME) |
As you can see, it does not refer to _t_user
|
|
Sat Oct 15, 2016 12:24 pm |
|
 |
GeneW
Joined: 10 Apr 2012 Posts: 19 Country: United States |
|
|
|
That seems to have fixed it. Thanks!
|
|
Sat Oct 15, 2016 2:49 pm |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|