by using some simple view in Oracle you can extract a lot of information about your DB schema, some explicit samples : (assuming that MyDBOwner is the owner of the DB and ACTIVITY is a table of a schema, this sample is succesfully tested on Oracle 10g)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
-- LIST OF USERS select OWNER,COUNT(DISTINCT TABLE_NAME) from ALL_TAB_COLUMNS GROUP BY OWNER -- LIST OF TABLES PER OWNER select table_name from ALL_TAB_COLUMNS where owner = 'MyDBOwner' group by table_name -- LIST OF FIELDS PER TABLE select COLUMN_NAME, DATA_TYPE, DATA_LENGTH, NULLABLE, CHAR_LENGTH from ALL_TAB_COLUMNS where owner = 'MyDBOwner' AND TABLE_NAME = 'ACTIVITY' -- FINDING PRIMARY KEYS select COLUMN_NAME, DATA_TYPE, DATA_LENGTH, NULLABLE, CHAR_LENGTH from ALL_TAB_COLUMNS where owner = 'MyDBOwner' AND TABLE_NAME = 'ACTIVITY' -- A single character that indicates the type of constraint: 'C' = NOT NULL, 'P' = PRIMARY KEY, 'U' = UNIQUE, and 'R' = FOREIGN KEY. SELECT UC.CONSTRAINT_NAME, UCC.* FROM USER_CONSTRAINTS UC, USER_CONS_COLUMNS UCC WHERE UC.OWNER='MyDBOwner' AND UC.TABLE_NAME = 'ACTIVITY' AND UC.CONSTRAINT_TYPE = 'P' AND UC.CONSTRAINT_NAME = UCC.CONSTRAINT_NAME |
a great article about this is :…
Leggi tutto
(This article is a draft but if something is of interesting …. ) The fantastic world of old Midas now called DataSnap introduced the TClientDataSet component , that is a in memory DataSet for Delphi and C++ Builder. With TClientDataSet was introduced the concept of Brief Case model Application Style. A brief case model App.…
Leggi tutto
Delphi was born exactly fifteen years ago from Today, Marco Cantu on his web site have posted a great article on this because he is one of the first guru of this beatifull dev language… the article
this article is a draft, but i published it because if you need something of that the resources that i found on internet are very interesting. mission of the post : mixing dynaic query and functions to allow join from db2db Dynamic SQL Great Article : http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/dynamic.htm#CHDGJEGD Dreate functions and consuming inside SQL , a…
Leggi tutto
[lang_it] Oggi è stata rilasciata la seconda versione del calendario di ZK ( articolo ufficiale : http://www.zkoss.org/product/zkcalendar.dsp) , non ho resistito son subito andato a provare la demo all’indirizzo http://zcal.zkoss.org/. La mia prima impressione è che sia molto ma molto più veloce delle precedenti, non sò bene perchè ma questa mi è balzata immediatamente all’occhio,…
Leggi tutto
After upgrading from my Ubuntu 8.10 to new and excellent Ubuntu 9.10 with Firefox 3.5.7 i found some problem with my vmWare Server 2.0, the script “sudo /usr/bin/vmware-config.pl” won’t run. To configure vmware we need to add a patch to our system like this :
1 2 3 4 5 6 7 |
wget http://www.ubuntugeek.com/images/vmware-server.2.0.1_x64-modules-2.6.30.4-fix.tgz tar xvzf vmware-server.2.0.1_x64-modules-2.6.30.4-fix.tgz tar xvzf vmware-server.2.0.1_x64-modules-2.6.30.4-fix.tgz sudo sh vmware-server.2.0.1_x64-modules-2.6.30.4-fix.sh |
after this i was able to run the vmware…
Leggi tutto