Nytt, fräscht och intressant inom systemutvecklingssfären med tonvikt på .NET

2010-04-16

Create dropscript in Oracle

This is a quite smooth way to create a “drop all tables” script.
Note that it does not take care of foreign key relations, which means that it might throw errors when running.

select 'drop table ' || table_name || ';' from ALL_TABLES;

You might want to a where statement for example for owner:

select 'drop table ' || table_name || ';' from ALL_TABLES where owner='xxx'

Etiketter:

2010-04-07

Get Oracle version from a production server using SQL Developer

There are several ways to do this depending on what privileges you have and what tools you are using. This is one way:

select * from v$version where banner like ‘Oracle%’;

The blog My Digital Life presents a few other alternatives:

http://www.mydigitallife.info/2005/10/18/check-oracle-version/

Etiketter: