The whole process is installing oracle 10.2.0.1 first then updating it to 10.2.0.3 You can follow this article step by step: http://www.itpub.net/viewthread.php?tid=806933&extra=&page=1 Note: I was installing oracle in RedHat Enterprise Linux 4 Update 3, the only missing package is gcc.You can get help from this page: http://hi.baidu.com/thinkinginlamp/blog/item/f91ad1138ac429025aaf53e2.html If you are installing oracle in linux ...
今天一个任务是从两张表中用sql语句导出些数据,并且提交这些数据的插入语句。上网查询后找到个方法,例子如下: spool c:\data.sql; select 'insert into table_name values('''||field_1||''','''||field_2||''');'from table_name where field_n=some_conditon; spool off; 从这个方案中引申学到两条:spool命令和使用select语句批量拼装sql语句 spool命令 1 Oracle的spool命令可以用来将数据export出来到文本文件。Oracle的Import/Export命令用于备份和恢复比较有效,但对于一些临时数据量的导出,Export不好用,甚至不可用。在这里,就是spool的发挥之地了。 2Spool一般使用格式为spool [filepath]filename; 其他sql语句;spool off; 要输出的内容都在spool语句中包含; 3 spool还有些其他控制命令: set pagesize 0 --设置页面大小, 0表示无限制,如果设置为10,则10行数据后出现一空行 set num 18 --设置数字的长度,如果不够大,则用科学记数法显示 set heading off --设置不要题头,则不出现select的field list set feedback off --设置不需要返回信息, 比如" 100 rows selected“ set term off -- set trimspool on --trim 4 如果在sqlplus中直接使用sql语句,则导出的数据文件中会包含spool语句中使用的sql语句,如果不想让生成这些可把要使用的sql语句存在一个文件中再在sqlplus中执行此文件即可。 使用select语句批量拼装sql语句 仿照select 'insert into table_name values('''||field_1||''','''||field_2||''');'from table_name where field_n=some_conditon;可联想批量生成其他sql语句,例如drop、update、delete语句。其中||为连接符号,三个单引号最后生成一个单引号。

Oracle In vs Exist the two are processed very very differently. Select * from T1 where x in ( select y from T2 ) is typically processed as: select * from t1, ( select distinct y from t2 ) t2 where t1.x = t2.y; The subquery is evaluated, distinct'ed, indexed (or hashed or sorted) and then joined ...
Syntax: FOR record_index in cursor_name LOOP {.statements.} END LOOP; You would use a CURSOR FOR Loop when you want to fetch and process every record in a cursor. The CURSOR FOR Loop will terminate when all of the records in the cursor have been fetched. Here is an example of a function that uses a CURSOR ...
When you drop a materialized view, Oracle Database does not place it in the recycle bin. Therefore, you cannot subsequently either purge or undrop the materialized view. The keyword SNAPSHOT is supported in place of MATERIALIZED VIEW for backward compatibility. Prerequisites The materialized view must be in your own ...
1) Take the tablespace offline ALTER TABLESPACE tablespace-name OFFLINE; 2) Use the OS to Move the tablespace to the new location 3) Run the following command: ALTER TABLESPACE tablespace-name RENAME DATAFILE ‘OS path to old tablespace\tablespace-datafile- name.dbf’ TO ‘OS path to new location\tablespace-datafile-name.dbf’; 4) Take the tablespace back online ALTER TABLESPACE tablespace-name ONLINE; If the following error ...
I. Download patch set p5337014_10203_WINNT.zip II. To install the Oracle Database 10g patch set interactively: Log on as a member of the Administrators group to the computer on which you are going to install Oracle components. If you are installing on a Primary Domain Controller or a Backup Domain Controller, log on ...