Bo's Oracle Station

查看: 2605|回复: 0

第24次活动:2017-10-16(星期一晚上7:00-9:30)

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2017-10-16 20:04:06 | 显示全部楼层 |阅读模式
  1. [oracle@station90 ~]$ rman target / cmdfile=a.rcv

  2. Recovery Manager: Release 11.2.0.1.0 - Production on Mon Oct 16 19:18:50 2017

  3. Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

  4. connected to target database: ORCL (DBID=1343950367)

  5. RMAN> run {
  6. 2> set command id to 'botang';
  7. 3> allocate channel c1 device type sbt;
  8. 4> allocate channel c2 device type sbt;
  9. 5> backup   tag 'MY4'  duration  00:06 minimize load     (datafile 1 channel c1 ) ( datafile 2,3,4,5 channel c2 )   ;
  10. 6> }
  11. 7>
  12. executing command: SET COMMAND ID

  13. using target database control file instead of recovery catalog
  14. allocated channel: c1
  15. channel c1: SID=73 device type=SBT_TAPE
  16. channel c1: Oracle Secure Backup

  17. allocated channel: c2
  18. channel c2: SID=195 device type=SBT_TAPE
  19. channel c2: Oracle Secure Backup

  20. Starting backup at 16-OCT-17
  21. channel c2: starting full datafile backup set
  22. channel c2: specifying datafile(s) in backup set
  23. input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.257.816169553
  24. input datafile file number=00003 name=+DATA/orcl/datafile/undotbs1.258.816169553
  25. input datafile file number=00005 name=+DATA/orcl/datafile/example.265.957437977
  26. input datafile file number=00004 name=+DATA/orcl/datafile/users.259.816169553
  27. channel c2: starting piece 1 at 16-OCT-17
  28. channel c1: starting full datafile backup set
  29. channel c1: specifying datafile(s) in backup set
  30. input datafile file number=00001 name=+DATA/orcl/datafile/system.256.816169553
  31. channel c1: starting piece 1 at 16-OCT-17
  32. channel c1: finished piece 1 at 16-OCT-17
  33. piece handle=26sh67l7_1_1 tag=MY4 comment=API Version 2.0,MMS Version 10.4.0.4
  34. channel c1: backup set complete, elapsed time: 00:05:55
  35. channel c1: throttle time: 0:05:23
  36. channel c2: finished piece 1 at 16-OCT-17
  37. piece handle=25sh67l7_1_1 tag=MY4 comment=API Version 2.0,MMS Version 10.4.0.4
  38. channel c2: backup set complete, elapsed time: 00:05:55
  39. channel c2: throttle time: 0:05:23
  40. Finished backup at 16-OCT-17

  41. Starting Control File and SPFILE Autobackup at 16-OCT-17
  42. piece handle=c-1343950367-20171016-00 comment=API Version 2.0,MMS Version 10.4.0.4
  43. Finished Control File and SPFILE Autobackup at 16-OCT-17
  44. released channel: c1
  45. released channel: c2

  46. Recovery Manager complete.
  47. [oracle@station90 ~]$
复制代码

Screenshot.png


  1. create table t05110_a ( a  number default 99 );

  2. create table t05110_b ( a  number ) ;

  3. select  t.TABLE_NAME, t.DATA_DEFAULT
  4.   from  user_tab_columns t
  5. where t.TABLE_NAME  like 'T05110_%';

  6. insert into t05110_a values (default );

  7. commit;

  8. select  * from t05110_a;

  9. alter table t05110_a   modify  ( a default  null ) ;

  10. select  t.DATA_DEFAULT
  11.   from  user_tab_columns t
  12. where t.TABLE_NAME='T05110_A';

  13. insert into t05110_b values (default ) ;

  14. select  * from t05110_b  where a is null;
  15. insert into t05110_a values (default ) ;
  16. select  * from t05110_a  where a is null;

  17. ----
  18. create table  t05110_c ( a  varchar2(30) ,  b  blob ) ;
  19. -----




  20. CREATE OR REPLACE PROCEDURE
  21.   proc_blob (  p_1 varchar2,  p_dir  VARCHAR2, p_file  VARCHAR2)
  22. IS
  23.    v_f  BFILE;
  24.    v_b blob;
  25. BEGIN
  26.     INSERT INTO t05110_c  values(p_1,    EMPTY_BLOB ()) RETURN   b    into v_b;
  27.     v_f := BFILENAME (p_dir, p_file);
  28.    DBMS_LOB.FILEOPEN  (v_f, DBMS_LOB.FILE_READONLY);
  29.    DBMS_LOB.LOADFROMFILE (v_b, v_f,   DBMS_LOB.GETLENGTH (v_f));
  30.    DBMS_LOB.FILECLOSE (v_f);
  31.    commit;
  32. end;



  33. begin
  34.     proc_blob ('JUPITER','PICDIR','jupiter.jpg');
  35.   end;
  36.   
  37.   
  38.   select  * from t05110_c;
复制代码
  1. select  * from t05110_c  ;

  2. select sysdate from dual;

  3. insert into t05110_d values (current_timestamp , 2 ) ;

  4. select  * from t05110_d;

  5. create table t05110_e ( a  timestamp(9) );

  6. insert into t05110_e values ( systimestamp);

  7. select  * from  t05110_e;

  8. create table t05110_f ( a  timestamp with  time zone ) ;


  9. insert into t05110_f values ( systimestamp);


  10. select  * from  t05110_f;


  11. create table t05110_g  ( a  timestamp with local time zone ) ;

  12. insert into t05110_g values ( systimestamp);
  13. select  * from  t05110_g;
复制代码


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-3-29 18:42 , Processed in 0.037476 second(s), 27 queries .

快速回复 返回顶部 返回列表