今天在使用impdp导入的时候(同一数据库中转换schema),遇到了
ORA-39083: Object type TYPE failed to create with error:
ORA-02304: invalid object identifier literal
具体报错的sql是 CREATE TYPE "xx"."xxxxx" OID '1J35J43H1J5H2JK3HJ52H3J45' AS OBJECT
此type无法创建成功,原因是OID重复,OID就是object id。
查看impdp help=y 可以使用一个参数:transform
TRANSFORM
Metadata transform to apply to applicable objects.
Valid transform keywords: SEGMENT_ATTRIBUTES, STORAGE OID, and PCTSPACE.
OID - If the value is specified as n, the assignment of the exported OID during the
creation of object tables and types is inhibited. Instead, a new OID is assigned.
This can be useful for cloning schemas, but does not affect referenced objects. The
default value is y.
这个参数默认是Y,如果改成N,那么导入的时候会把各个对象重新赋予新的OID。
这样,再用impdp导入的时候就不会出现
ORA-39083: Object type TYPE failed to create with error:
ORA-02304: invalid object identifier literal
注意:exp/imp不支持oid转换,又是一个使用数据泵的优势。
本文链接:http://www.cnblogs.com/kkterry/p/3277354.html,转载请注明。
思路:
一、对所有字段进行分组并计数
二、计数大于1的就显示
(显示重复)
本文链接:http://www.cnblogs.com/jeson-155/p/3280224.html,转载请注明。
1.s树形结构查询表中的数据:比如emp表中每个员工都有自己的头,即公司中的职位是按层次划分的,类似一个树,因此有时需要按层次显示查询的结果。
2 start with empno = 7839
3 connect by prior empno = mgr;
4
5
6 EMPNO MGR ENAME JOB
7 ---------- ---------- ---------- ---------
8 7839 KING PRESIDENT
9 7566 7839 JONES MANAGER
10 7788 7566 SCOTT ANALYST
11 7876 7788 ADAMS CLERK
12 7902 7566 FORD ANALYST
13 7369 7902 SMITH CLERK
14 7698 7839 BLAKE MANAGER
15 7499 7698 ALLEN SALESMAN
16 7521 7698 WARD SALESMAN
17 7654 7698 MARTIN SALESMAN
18 7844 7698 TURNER SALESMAN
19
20 EMPNO MGR ENAME JOB
21 ---------- ---------- ---------- ---------
22 7900 7698 JAMES CLERK
23 7782 7839 CLARK MANAGER
24 7934 7782 MILLER CLERK
25
26 14 rows selected.
2.使用level显示数据所在的层并格式化数据。
2 lpad(' ',2 * level - 1) || ename as "Ename",
3 job
4 from emp
5 start with ename = 'KING'
6 connect by prior empno = mgr;
7
8 LEVEL Ename JOB
9 ---------- ------------------------------ ---------
10 1 KING PRESIDENT
11 2 JONES MANAGER
12 3 SCOTT ANALYST
13 4 ADAMS CLERK
14 3 FORD ANALYST
15 4 SMITH CLERK
16 2 BLAKE MANAGER
17 3 ALLEN SALESMAN
18 3 WARD SALESMAN
19 3 MARTIN SALESMAN
20 3 TURNER SALESMAN
21
22 LEVEL Ename JOB
23 ---------- ------------------------------ ---------
24 3 JAMES CLERK
25