力挺一下sqluldr

客户要求导出大量的数据(约800万记录),开始为了格式上的好看生成的是ACCESS数据库文件,用Toad 11导出成生ACCESS,本地域名网的DB,生成700W生成的文件有1G多点,都用了约三个小时,更悲惨的是三个小时后,弹出的一个错误窗口,提示无空间,莫名其妙,硬盘空间很充足,当时的心情可真是”唯有长江水无语东流…” 变通一下800万的记录在ACCESS也没有可读性,无非是数据导入,所以考虑生成flat file,文本文件的形式。 想到了老楼的小工具sqluldr,free命令行操作方便。 下面是真实的操作,早知如此何必加那三小时班。 [oracle@dev-db ~]$ ./sqluldr2 user=icme6/icme6 query=”select /*+parallel(t 8)*/* from sdscore t” file=sd_score.txt field=0x09 record=0x0d0x0a 0 rows exported at 2013-04-12 19:59:18, size 0 MB. 1000000 rows exported at 2013-04-12 19:59:21, size 200 MB. 2000000 rows exported at 2013-04-12 19:59:24, size 320 MB. 3000000 rows exported at 2013-04-12 19:59:27, size 420 MB. … Read more

More about ITL in oracle

ITL(Interested Transaction List ),The Oracle database engine locks the data modified by a transaction at the row level. To implement this feature every data block contains a list of all transactions that are modifying it. This list is commonly called interested transaction list (ITL).

oracle forall instructs must be followed by DML

Oracle BULK COLLECT and Oracle FORALL are the new features in Oracle 8i, 9i and 10g PL/SQL that can really make a different to you PL/SQL performance. The keyword FORALL instructs the PL/SQL engine to bulk-bind input collections before sending them to the SQL engine. Although the FORALL statement contains an iteration scheme, it is … Read more

The lowercase and quotes table names may not be able to audit(小写表名可能不会审计)

昨一好朋友问我开了审计,有些表但无审计记录。 下面我来还原这个问题 db_version oracle 10201 for linux SQL> show parameter audit NAME TYPE VALUE ———————————— ———– —————————— audit_file_dest string /u1/oracle/admin/ORCL/adump audit_sys_operations boolean FALSE audit_syslog_level string audit_trail string DB, EXTENDED audit select any table by access; SQL> select os_username,username,terminal,timestamp,owner,obj_name,audit_option from DBA_AUDIT_TRAIL order by 4; OS_USERNAM USERNAME TERMINAL TIMESTAMP OWNER OBJ_NAME AUDIT_OPTION ———- ———- ———- ——————- —————————— … Read more

ORA-1688: unable to extend table SYS.WRH$_ACTIVE_SESSION_HISTORY

1) Export the snapshots and then do a manual purge To purge the Table SYS.WRH$_ACTIVE_SESSION_HISTORY, you may first query the Snapshot History with the query below: select snap_id, begin_interval_time from sys.dba_hist_snapshot order by snap_id; Then, you choose the range of snapshot you want to delete, and you execute the following Procedure: exec dbms_workload_repository.drop_snapshot_range ( low_snap_id … Read more

batch change read only DB in mssql 2K

I had an issue while dropping a mssql user today, I was unable to drop the user and it failed with the user in an read_only db. I had many db in the server(more than 200),and many read-only db,so To delete an user must setting there DB to read write status.