Autoextend syntax

Note the order of maxsize and next, has to be specified in that order, a little annoyingly: alter database datafile ‘FILENAME’ autoextend on next 1024m maxsize 3072m ; alter tablespace TSNAME add datafile ‘FILENAME’ size 1024m autoextend on next 1024m maxsize 3072m ; From 10gR1 and above you can specify sizes in g. With 9i […]

Read More Autoextend syntax
March 6, 2009

Move script for ORA-03297: file contains used data beyond requested RESIZE value

Attempting to shrink files which have a lot of empty space can fail with this error: SQL> alter database datafile ‘/ora1data/TEST/TEST_ts_data1_f1.dbf’ resize 2g ; ORA-03297: file contains used data beyond requested RESIZE value Provided you can get an outage, one fix for this is to temporarily move segments to another tablespace using a scripts like […]

Read More Move script for ORA-03297: file contains used data beyond requested RESIZE value
March 5, 2009

Bug (ora-2019 or ora-2069) with User Defined Functions Insert/Update over Database Links

If you try to insert or update across a database link some values called by a user defined function: insert into mytable@remote (mycol) values ( myfunction (’01-JAN-2009′) ) ; That will fail with either: ORA-02019: connection description for remote database not found or ORA-02069: global_names parameter must be set to TRUE for this operation There […]

Read More Bug (ora-2019 or ora-2069) with User Defined Functions Insert/Update over Database Links
March 5, 2009

3 Comments

Application Express APEX datafile location for new schemas

How to change apex datafile location for new schemas? Just change the datafile location for the flow tablespace – because the new ones all create in that same directory. For example, in this database that is /ora1data/TEST/dbs/ : SQL> select file_name from dba_data_files where tablespace_name like ‘FLOW%’; FILE_NAME ——————————————————————————– /ora1data/TEST/dbs/FLOW_1.dbf You can change the datafile […]

Read More Application Express APEX datafile location for new schemas
March 5, 2009

Using tar with compress or gzip

1) To tar files up into a tarball: tar cvfp – file1 file2 file3 > tarfile.tar And to untar: tar xvfp tarfile.tar 2) Now, same thing but with compress added in: tar cvfp – file1 file2 file3 | compress > tarfile.tar.Z zcat tarfile.tar.Z | tar xvfp – 3) And, the same thing using gzip rather […]

Read More Using tar with compress or gzip
March 5, 2009