Bo's Oracle Station

查看: 3616|回复: 0

2014-06-29-orcl1.sql

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2014-6-29 21:09:36 | 显示全部楼层 |阅读模式
[root@station90 ~]# cd /1
[root@station90 1]# s
bash: s: command not found
[root@station90 1]# ls
1  119_Internet_Links  899_Oracle_Doc.loop0
[root@station90 1]# bmf
Please input the mount point full path: ?899_Oracle_Doc.loop0
Your input is: "899_Oracle_Doc.loop0". Are you sure ?(y/n) y
-rw-r--r--. 1 root root 7478444032  6月 26 22:43 899_Oracle_Doc.loop0
Decrypt 899_Oracle_Doc.loop0y/n)? y
/dev/loop0: [0805]:919463 (/1/899_Oracle_Doc.loop0)
Enter LUKS passphrase for /dev/loop0:
key slot 0 unlocked.
Command successful.
文件系统          容量  已用  可用 已用%% 挂载点
/dev/sda5              42G   37G  2.9G  93% /
tmpfs                 7.9G  6.5G  1.5G  82% /dev/shm
/dev/mapper/vol0-pub   40G  8.9G   29G  24% /var/ftp/pub
/dev/mmcblk0p1        1.9G     0  1.9G   0% /media/9A04-45FF
/dev/mapper/loop0     6.8G  6.4G   51M 100% /file/loop0
总用量 0
crw-rw----. 1 root root 10, 236  6月 29 10:05 control
lrwxrwxrwx. 1 root root       7  6月 29 10:28 loop0 -> ../dm-3
lrwxrwxrwx. 1 root root       7  6月 29 10:05 vol0-OCM10grac1 -> ../dm-0
lrwxrwxrwx. 1 root root       7  6月 29 10:05 vol0-OCM10grac2 -> ../dm-1
lrwxrwxrwx. 1 root root       7  6月 29 10:05 vol0-pub -> ../dm-2
[root@station90 1]# su - oracle
[oracle@station90 ~]$ ls
afiedt.buf        create_t04209_uname.sql  oradiag_oracle  revertape-root.sh        tnsnames.ora  update2_t04209_uname.sql  公共的  视频  文档  音乐
copytape-root.sh  mail                     rac_tns         select_t04209_uname.sql  ttio.rcv      update_t04209_uname.sql   模板    图片  下载  桌面
[oracle@station90 ~]$ pwd
/home/oracle
[oracle@station90 ~]$ cp -rp    /file/loop0/
1_数据库管理类/     2_数据库高等管理类/ 3_数据库开发类/     4_数据库高等开发类/ 5_其他/             gg001.gif           gg002.gif
[oracle@station90 ~]$ cp -rp    /file/loop0/1_数据库管理类/O
O10g/ O11g/ O12c/ O8i/  O9i/  
[oracle@station90 ~]$ cp -rp    /file/loop0/1_数据库管理类/O11g/1Z0-05
1Z0-052/ 1Z0-053/
[oracle@station90 ~]$ cp -rp    /file/loop0/1_数据库管理类/O11g/1Z0-052/
课程例子/     课程学生指南/ 其他/         
[oracle@station90 ~]$ cp -rp    /file/loop0/1_数据库管理类/O11g/1Z0-052/
课程例子/     课程学生指南/ 其他/         
[oracle@station90 ~]$ cp -rp    /file/loop0/1_数据库管理类/O11g/1Z0-052/课程学生指南/
1.1zh/ 2.0/   
[oracle@station90 ~]$ cp -rp    /file/loop0/1_数据库管理类/O11g/1Z0-052/课程学生指南/
1.1zh/ 2.0/   
[oracle@station90 ~]$ cp -rp    /file/loop0/1_数据库管理类/O11g/1Z0-052/课程学生指南/2.0/
labs/ pdf/  ppt/  
[oracle@station90 ~]$ cp -rp    /file/loop0/1_数据库管理类/O11g/1Z0-052/课程学生指南/2.0/labs/
lab_05_01_05.sh   lab_07_02_05.sql  lab_11_01_06.sh   lab_12_01_05.sh   lab_13_01_09.sql  lab_17_01_01.sh   lab_18_01_01.sh   shutdb.sh
lab_07_01_01.sh   lab_08_01_01.sh   lab_12_01_01.sh   lab_12_01_07.sh   lab_14_01_01.sh   lab_17_01_01.sql  lab_18_01_02.sql  startdb.sh
lab_07_01_01.sql  lab_09_01_01.sql  lab_12_01_02.sh   lab_12_01_11.sh   lab_16_01_01.sql  lab_17_02_01.ctl  lab_18_01_12.sh   wkfctrfunc
lab_07_01_01.txt  lab_09_01_02.sql  lab_12_01_03.sh   lab_13_01_01.sql  lab_16_02_01.sql  lab_17_02_01.dat  lab_corrupt.sh   
lab_07_02_02.sql  lab_11_01_02.sh   lab_12_01_04.sh   lab_13_01_02.sql  lab_16_03_02.sh   lab_17_02_02.ctl  set_asm.sh        
lab_07_02_04.sql  lab_11_01_04.sh   lab_12_01_04.sql  lab_13_01_07.sql  lab_16_04_01.sh   lab_17_02_02.dat  set_db.sh         
[oracle@station90 ~]$ cp -rp    /file/loop0/1_数据库管理类/O11g/1Z0-052/课程学生指南/2.0/labs/   ./
[oracle@station90 ~]$ ls
afiedt.buf               labs            rac_tns                  tnsnames.ora              update_t04209_uname.sql  视频  下载
copytape-root.sh         mail            revertape-root.sh        ttio.rcv                  公共的                   图片  音乐
create_t04209_uname.sql  oradiag_oracle  select_t04209_uname.sql  update2_t04209_uname.sql  模板                     文档  桌面
[oracle@station90 ~]$ cd labs
[oracle@station90 labs]$ ls
lab_05_01_05.sh   lab_07_02_05.sql  lab_11_01_06.sh   lab_12_01_05.sh   lab_13_01_09.sql  lab_17_01_01.sh   lab_18_01_01.sh   shutdb.sh
lab_07_01_01.sh   lab_08_01_01.sh   lab_12_01_01.sh   lab_12_01_07.sh   lab_14_01_01.sh   lab_17_01_01.sql  lab_18_01_02.sql  startdb.sh
lab_07_01_01.sql  lab_09_01_01.sql  lab_12_01_02.sh   lab_12_01_11.sh   lab_16_01_01.sql  lab_17_02_01.ctl  lab_18_01_12.sh   wkfctrfunc
lab_07_01_01.txt  lab_09_01_02.sql  lab_12_01_03.sh   lab_13_01_01.sql  lab_16_02_01.sql  lab_17_02_01.dat  lab_corrupt.sh
lab_07_02_02.sql  lab_11_01_02.sh   lab_12_01_04.sh   lab_13_01_02.sql  lab_16_03_02.sh   lab_17_02_02.ctl  set_asm.sh
lab_07_02_04.sql  lab_11_01_04.sh   lab_12_01_04.sql  lab_13_01_07.sql  lab_16_04_01.sh   lab_17_02_02.dat  set_db.sh
[oracle@station90 labs]$ vim lab_05_01_05.sh
[oracle@station90 labs]$ . oraenv
ORACLE_SID = [orcl] ?
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
[oracle@station90 labs]$ vim lab_05_01_05.sh
[oracle@station90 labs]$ vim set_db.sh
[oracle@station90 labs]$ ./lab_05_01_05.sh
-bash: ./lab_05_01_05.sh: 权限不够
[oracle@station90 labs]$ chmod +x *.sh
[oracle@station90 labs]$ ./lab_05_01_05.sh
ORACLE_SID = [orcl] ? The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle

SQL*Plus: Release 11.2.0.1.0 Production on Sun Jun 29 10:57:49 2014

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

ERROR:
ORA-28002: the password will expire within 7 days



Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options

SQL> SQL> SQL> SQL>
Tablespace created.

SQL> SQL> drop table jmw purge
           *
ERROR at line 1:
ORA-00942: table or view does not exist


SQL> SQL>
Table created.

SQL> SQL>
1 row created.

SQL> SQL>
Commit complete.

SQL> SQL>   2    3    4    5    6    7  
PL/SQL procedure successfully completed.

SQL> SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
[oracle@station90 labs]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Sun Jun 29 11:06:26 2014

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

SQL> conn system/oracle_4U
ERROR:
ORA-28002: the password will expire within 7 days


Connected.
SQL> delete from system.jmw where rownum<500;

499 rows deleted.

SQL> commit;

Commit complete.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
[oracle@station90 labs]$ exit
logout
[root@station90 1]# raw -qa
/dev/raw/raw7:    bound to major 8, minor 7
/dev/raw/raw8:    bound to major 8, minor 8
/dev/raw/raw9:    bound to major 8, minor 9
/dev/raw/raw10:    bound to major 8, minor 10
/dev/raw/raw11:    bound to major 8, minor 11
/dev/raw/raw12:    bound to major 8, minor 12
/dev/raw/raw13:    bound to major 8, minor 13
/dev/raw/raw14:    bound to major 8, minor 14
/dev/raw/raw15:    bound to major 8, minor 15
/dev/raw/raw20:    bound to major 7, minor 5
/dev/raw/raw21:    bound to major 7, minor 6
/dev/raw/raw22:    bound to major 7, minor 7
/dev/raw/raw23:    bound to major 7, minor 4
[root@station90 1]# dd if=/dev/zero of=/dev/raw/raw8  bs=4M  
dd: 正在写入"/dev/raw/raw8": 设备上没有空间
记录了242+0 的读入
记录了241+0 的写出
1011677184字节(1.0 GB)已复制,5.71943 秒,177 MB/秒
[root@station90 1]# raw -qa
/dev/raw/raw7:    bound to major 8, minor 7
/dev/raw/raw8:    bound to major 8, minor 8
/dev/raw/raw9:    bound to major 8, minor 9
/dev/raw/raw10:    bound to major 8, minor 10
/dev/raw/raw11:    bound to major 8, minor 11
/dev/raw/raw12:    bound to major 8, minor 12
/dev/raw/raw13:    bound to major 8, minor 13
/dev/raw/raw14:    bound to major 8, minor 14
/dev/raw/raw15:    bound to major 8, minor 15
/dev/raw/raw20:    bound to major 7, minor 5
/dev/raw/raw21:    bound to major 7, minor 6
/dev/raw/raw22:    bound to major 7, minor 7
/dev/raw/raw23:    bound to major 7, minor 4
[root@station90 1]# su - oracle
[oracle@station90 ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Sun Jun 29 11:12:21 2014

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

SQL> conn system/oracle_4U
ERROR:
ORA-28002: the password will expire within 7 days


Connected.
SQL>  delete from system.jmw where rownum<500;

499 rows deleted.

SQL> commit;

Commit complete.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
[oracle@station90 ~]$ exit
logout
[root@station90 1]# dd if=/dev/zero of=/dev/raw/raw8  bs=4M  
dd: 正在写入"/dev/raw/raw8": 设备上没有空间
记录了242+0 的读入
记录了241+0 的写出
1011677184字节(1.0 GB)已复制,4.99014 秒,203 MB/秒
[root@station90 1]# su - oracle
[oracle@station90 ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Sun Jun 29 11:18:27 2014

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

SQL> conn system/oracle_4U
ERROR:
ORA-28002: the password will expire within 7 days


Connected.
SQL>  delete from system.jmw where rownum<500;

26 rows deleted.

SQL> commit;

Commit complete.

SQL>


























回复

使用道具 举报

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

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-12-5 10:38 , Processed in 0.046840 second(s), 24 queries .

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