If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Oracle > Re-Create Other Users Tables

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-18-11, 21:39
JuankyKong JuankyKong is offline
Registered User
 
Join Date: Oct 2011
Posts: 14
Question Re-Create Other Users Tables

If i have SELECT access to another users table, what would be the proper "DESCRIBE" i can use in order to see what are the constraints, primary keys, foreing keys, type of data, colums etc so i can re-code those tables myself ??? thanks a lot for your help I appreciate it
Reply With Quote
  #2 (permalink)  
Old 11-18-11, 22:02
anacedent anacedent is offline
Registered User
 
Join Date: Aug 2003
Location: Where the Surf Meets the Turf @Del Mar, CA
Posts: 6,415
Dbms_metadata.get_ddl
__________________
You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
For most folks, they don't know, what they don't know.
Reply With Quote
  #3 (permalink)  
Old 11-18-11, 22:13
JuankyKong JuankyKong is offline
Registered User
 
Join Date: Oct 2011
Posts: 14
SELECT dbms_metadata.get_ddl
FROM PRESIDENT;
mmm am i missing something perhaps ?

ERROR at line 2:
ORA-00942: table or view does not exist

when i do :


SELECT Table_Name
FROM All_Tables
WHERE OWNER = 'BOB';


I get:


TABLE_NAME
------------------------------
MASTERTB
PRESIDENT

and when i do :

SELECT SUBSTR(Owner,1,10) AS "Owner",
SUBSTR(Table_Name,1,10) AS "Table_Name",
SUBSTR(Grantor,1,10) AS "Grantor",
SUBSTR(Grantee,1,10) AS "Grantee",
SUBSTR(Privilege,1,10) AS "Privilege"
FROM All_Tab_Privs_Recd
WHERE GRANTOR = 'BOB';


i get :

Owner Table_Name Grantor Grantee Privilege
---------- ---------- ---------- ---------- ----------
BOB MASTERTB BOB PUBLIC SELECT
BOB PRESIDENT BOB MYNAME SELECT

so im sure i have access im not sure whats wrong
Reply With Quote
  #4 (permalink)  
Old 11-18-11, 22:20
anacedent anacedent is offline
Registered User
 
Join Date: Aug 2003
Location: Where the Surf Meets the Turf @Del Mar, CA
Posts: 6,415
when all else fails Read The Fine Manual

DBMS_METADATA

http://download.oracle.com/docs/cd/E...a.htm#i1019414
__________________
You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
For most folks, they don't know, what they don't know.
Reply With Quote
  #5 (permalink)  
Old 11-18-11, 22:27
JuankyKong JuankyKong is offline
Registered User
 
Join Date: Oct 2011
Posts: 14
aw no thanks a lot or your help ^^
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On