/* specify the database to use, example below “ABCDB” means the ABCDB database use ABCDB /* Count Number Of Tables In A Database */ SELECT COUNT(*) AS TABLE_COUNT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE=’BASE TABLE’ /* Count Number Of Views In A Database */ SELECT COUNT(*) AS VIEW_COUNT FROM INFORMATION_SCHEMA.VIEWS /* Count Number Of Stored Procedures In […]
January 19, 2012
Welcome! In the past 10 or so years of web design, development and database work I’ve compiled endless links, references, examples, and notes saved and stored in various formats all over the web, my laptops, backup drives and post-it notes that I will attempt to slowly consolidate into this blog so that 1) I have […]
January 18, 2012
— Note: only works if the ALL_TABLES object is up to date – read up on the ALL_TABLES first SELECT sum(num_rows) FROM all_tables WHERE owner LIKE ‘MyObjectOwnerName’
January 18, 2012
You can display your own custom comments, debug information or output from a function or package by specifying the output using DBMS_OUTPUT() If you’re running the code and not seeing the output when executing a command start by running “set serveroutput on feedback off;” end by running “set serveroutput off feedback on;”
January 18, 2012
You must first create a “Database Link”, which is a schema object that allows you to access objects in one database, from another. The example below assumes you have already created a database link that allows adequate permissions. Let’s assume you have two Oracle database instances, one named PROD which contains your live production data, […]
January 18, 2012
exp user/pswd@mySchema exp USER/PSWD@mySchema file=c:\temp\DBNAME_20080806.dmp exp scott/tiger file=mySchema.dmp log=mySchema.log tables=mySchema rows=yes indexes=no
January 18, 2012
Dim strDate as Date = “1/5/03” Dim strOracleDate as String = strDate.ToString(“dd-MMM-yy”).ToUpper()
January 18, 2012
UPDATE FROM ** SQL version *** UPDATE erp.rse SET expardesc = r.expardesc || ‘ – ‘ || p.parname FROM erp.rse r INNER JOIN erp.omqc_paramdesc p ON p.rsid = r.rsid AND r.rtype = ‘PSVP’ *** Oracle vesrion *** UPDATE erp.rse SET rse.expardesc = rse.expardesc || ‘ – ‘ || (SELECT p.parname FROM erp.omqc_paramdesc p WHERE p.exparid […]
January 24, 2012
0