: :
SpicyGreenIguana  
Forum Newest Posts Userlist Archive Register
Search Forums:
»  SpicyGreenIguana » Applications » Program  » Oracle via OCI8, no Rows

Register FAQ Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
  #1 ()  
Old 06-23-2009, 11:43 AM
 
Join Date: Sep 2008
Posts: 8
Default 

Oracle via OCI8, no Rows


Hi forum,

I try to draw just out of an Oracle German Railways a few data. The connection stands, but I receive no Rows...
$conn = oci_connect ('dbuser', 'pwd', '//x.x.x.of x/Servicename');
if (! $conn) {
$e = oci_error ();
print htmlentities ($e ['message']);
exit;
} else {
echo "connection stands!";
}


$query = 'select table_name from user_tables';

$stid = oci_parse ($conn, $query);
oci_execute ($stid, OCI_DEFAULT);
while ($row = oci_fetch_array ($stid, OCI_ASSOC)) {
foreach ($row as $item) {
echo $item." ";
}
echo "\n";
}
oci_free_statement ($stid);
oci_close ($conn);


"This example lists all tables owned by the user"
is called it in the How To!

unfortunately, I receive only one "connection stands!"...

being able to do it vl. be, the fact that the Admin has prevented it, the fact that dbuser all tables via select table_name from user_tables may list?

Somebody an idea?
to thanks!
Reply With Quote
  #2 ()  
Old 06-23-2009, 12:04 PM
 
Join Date: Jul 2009
Posts: 0
Default 

Oracle via OCI8, no Rows


If you are sure then, the fact that the user with you connectest generally own Tables has put in?
attempt, nevertheless, otherwise, sometimes nen:

select 1+1 ergebnis from binary

Then you get back guaranteed a line, if everything functions...
Reply With Quote
  #3 ()  
Old 06-23-2009, 12:16 PM
 
Join Date: Sep 2008
Posts: 8
Default 

Oracle via OCI8, no Rows


2 it is given

Confirming dbuser no Tables has put in?
Reply With Quote
  #4 ()  
Old 06-23-2009, 12:20 PM
 
Join Date: Jul 2009
Posts: 0
Default 

Oracle via OCI8, no Rows


Jap, then there functions your connection, but the user has no tables...
Reply With Quote
  #5 ()  
Old 06-23-2009, 12:58 PM
 
Join Date: Sep 2008
Posts: 8
Default 

Oracle via OCI8, no Rows


The Admin means:

hello, the user DBUSER_STATISTIK is no Schemaowner and has therefore no tables. He has reading authorisations on the Views known to them.
shows a Query which everybody "known to me" Views Giving?
Reply With Quote
  #6 ()  
Old 06-23-2009, 01:56 PM
 
Join Date: Jul 2009
Posts: 0
Default 

Oracle via OCI8, no Rows


You are able to come it sometimes try:
select * from table_privileges where grantee! = 'PUBLIC'

of case the Views, nevertheless, for everybody are released, if the following Query limits the list something:
select * from table_privileges where owner of like' %SYS' and owner in ('of XDB', 'SYSTEM', 'ORDPLUGINS')

LG Ben
Reply With Quote
  #7 ()  
Old 06-24-2009, 06:40 AM
 
Join Date: Sep 2008
Posts: 8
Default 

Oracle via OCI8, no Rows


This claps!
now I get all Views listed:... GRAIN TEA: DBUSER_STATISTIK
OWNER: DWH
TABLE_NAME: DIM_KUNDE
GRAIN GATE: DWH
SELECT_PRIV: Y
INSERT_PRIV: N
DELETE_PRIV: N
UPDATE_PRIV: N
REFERENCES_PRIV: N
ALTER_PRIV: N
INDEX_PRIV: N...
to the understanding:
What exactly I see here?
"SELECT * FROM DIM_KUNDE" delivers an "ORA 00942: Table or View not available".
How I access a View?
Reply With Quote
  #8 ()  
Old 06-24-2009, 12:25 PM
 
Join Date: Jan 2005
Posts: 1
Default 

Oracle via OCI8, no Rows


If the table does not belong to the announced user, if you always have to do "pattern"."Object names" brag. After your above example probably "DWH"."DIM_KUNDE". the announced user must have Of course in addition also the authorisation SELECT.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 05:21 AM.


Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82