Chinaunix首页 | 论坛 | 博客
  • 博客访问: 540316
  • 博文数量: 65
  • 博客积分: 1158
  • 博客等级: 少尉
  • 技术积分: 1261
  • 用 户 组: 普通用户
  • 注册时间: 2012-07-18 22:07
文章分类

全部博文(65)

文章存档

2016年(1)

2014年(2)

2013年(9)

2012年(53)

分类: Oracle

2012-10-16 10:18:33

[root@v0A-123-96-70 ~]# mount /dev/xvda2 /data2
/dev/xvda2 looks like swapspace - not mounted
mount: you must specify the filesystem type
[root@v0A-123-96-70 ~]#  /dev/xvda2 /data2
-bash: /dev/xvda2: Permission denied
[root@v0A-123-96-70 ~]# more /etc/fstab
LABEL=/                 /                       ext3    defaults        1 1
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
/dev/xvda2              swap                     swap   defaults        0 0
/home/swap swap swap defaults 0 0
[root@v0A-123-96-70 ~]# mount -t ext3 /dev/xvde /data2
[root@v0A-123-96-70 ~]# su - oracle
[oracle@v0A-123-96-70 ~]$ sqlplus /nolog

SQL*Plus: Release 10.2.0.4.0 - Production on Tue Oct 16 08:48:54 2012

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.

Total System Global Area 9730785280 bytes
Fixed Size                  2099848 bytes
Variable Size            2097153400 bytes
Database Buffers         7616856064 bytes
Redo Buffers               14675968 bytes
Database mounted.
Database opened.
SQL> exit 
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@v0A-123-96-70 ~]$ ls -la
total 310084
drwx------ 25 oracle oinstall      4096 Aug 24 14:04 .
drwxr-xr-x  5 root   root          4096 Jul 11 13:03 ..
drwxr-xr-x  2 oracle oinstall      4096 May 20  2011 0520
-rw-r--r--  1 oracle oinstall    156789 Jun  4 08:48 166-167.lst
-rw-r--r--  1 oracle oinstall    124535 Jun 11 16:35 168-169.lst
-rw-r--r--  1 oracle oinstall    119309 Jul  4 15:25 170_171.lst
-rw-r--r--  1 oracle oinstall      6596 May 12  2011 afiedt.buf
-rw-r--r--  1 oracle oinstall    126336 Jun  1 16:32 a.lst
-rw-------  1 oracle oinstall     16042 Oct 12 03:50 .bash_history
-rw-r--r--  1 oracle oinstall        33 Mar 22  2011 .bash_logout
-rw-r--r--  1 oracle oinstall      1040 Aug 24 14:04 .bash_profile
-rw-r--r--  1 oracle oinstall       901 Aug 21 20:41 .bash_profile.bak
-rw-r--r--  1 oracle oinstall       124 Mar 22  2011 .bashrc
drwx------  2 oracle oinstall      4096 Mar 22  2011 .chewing
-rwxrwxrwx  1 oracle oinstall      4644 May  8 04:51 .com.zerog.registry.xml
-rw-r--r--  1 oracle oinstall  51691520 Jul 19 16:12 content1.dmp
-rw-r--r--  1 oracle oinstall 133087232 Aug  6 11:29 data.dmp
drwxr-xr-x  2 oracle oinstall      4096 Mar 22  2011 Desktop
-rw-------  1 oracle oinstall        26 Mar 22  2011 .dmrc
-rwxr-xr-x  1 oracle oinstall 120180114 May  8 03:33 D_PAO_Agent_70310_Linux_x64.bin
drwxr-x---  2 oracle oinstall      4096 Mar 22  2011 .eggcups
-rw-r--r--  1 oracle oinstall       515 Mar 22  2011 .emacs
-rw-------  1 oracle oinstall        16 Mar 22  2011 .esd_auth
drwx------  3 oracle oinstall      4096 Mar 22  2011 .gconf
drwx------  2 oracle oinstall      4096 Mar 22  2011 .gconfd
-rw-r--r--  1 oracle oinstall         0 Apr 21  2011 ?]??=?~??gﶃ{??D???n??ۤ4
drwxr-xr-x  3 oracle oinstall      4096 Mar 22  2011 .gnome
drwx------  6 oracle oinstall      4096 Mar 22  2011 .gnome2
drwx------  2 oracle oinstall      4096 Mar 22  2011 .gnome2_private
drwxr-xr-x  2 oracle oinstall      4096 Mar 22  2011 .gstreamer-0.10
-rw-r--r--  1 oracle oinstall        88 Mar 22  2011 .gtkrc-1.2-gnome2
-rw-------  1 oracle oinstall       175 Mar 22  2011 .ICEauthority
drwxrwxr-x  2 oracle oinstall      4096 May  8 04:01 .InstallAnywhere
drwxrwxr-x  6 oracle oinstall      4096 May  8 04:39 install.dir.10500
drwxrwxr-x  6 oracle oinstall      4096 May  8 04:01 install.dir.9370
-rw-r--r--  1 oracle oinstall       127 Mar 31  2011 load.ctl
-rw-r--r--  1 oracle oinstall       253 Mar 31  2011 load.log
-rw-r--r--  1 oracle oinstall   6886263 May  7 16:17 logon.txt
drwxrwxr-x  2 oracle oinstall      4096 May  8 04:47 LSI_Logs.10500
drwxrwxr-x  2 oracle oinstall     20480 May  8 05:33 LSI_Logs.11048
drwxrwxr-x  2 oracle oinstall     12288 May  8 04:26 LSI_Logs.9370
drwx------  3 oracle oinstall      4096 Mar 22  2011 .metacity
drwxr-xr-x  4 oracle oinstall      4096 Mar 22  2011 .mozilla
drwxr-xr-x  3 oracle oinstall      4096 Mar 22  2011 .nautilus
drwxr-xr-x  3 oracle oinstall      4096 Mar 22  2011 .redhat
drwx------  4 oracle oinstall      4096 Mar 22  2011 .scim
-rw-r--r--  1 oracle oinstall         0 Mar 29  2011 select
-rw-r--r--  1 oracle oinstall         0 Mar 12  2012 sp_114_115.lst
-rw-r--r--  1 oracle oinstall    138393 Mar 19  2012 sp_134_144.lst
-rw-r--r--  1 oracle oinstall    130051 Mar 21  2012 sp_144_154.lst
-rw-r--r--  1 oracle oinstall       195 Aug 23  2011 spcpkg.lis
-rw-r--r--  1 oracle oinstall      4160 Aug 23  2011 spctab.lis
-rw-r--r--  1 oracle oinstall      2299 Aug 23  2011 spcusr.lis
-rw-r--r--  1 oracle oinstall       392 May  7 16:15 spool1.txt
-rw-r--r--  1 oracle oinstall       539 May 22 14:23 spool2.txt
-rw-r--r--  1 oracle oinstall       489 May  7 15:59 spool.txt
-rw-r--r--  1 oracle oinstall       131 Mar 31  2011 sqlldr.log
drwx------  2 oracle oinstall      4096 Mar 24  2011 .ssh
-rw-r--r--  1 oracle oinstall   3358720 May 30 16:06 t_coupon_code.dmp
-rw-r--r--  1 oracle oinstall    884736 May  4 15:43 t_dayintegral_log.dmp
drwx------  2 oracle oinstall      4096 Mar 22  2011 .Trash
-rw-r--r--  1 oracle oinstall     16384 Jun  8 16:30 t_sales_sharecontent.dmp
-rw-------  1 oracle oinstall      5736 Aug 24 14:04 .viminfo
[oracle@v0A-123-96-70 ~]$ sqlplus /nolog

SQL*Plus: Release 10.2.0.4.0 - Production on Tue Oct 16 08:56:05 2012

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

SQL> conn / as sysdba
Connected.

SQL> desc dba_data_files          
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 FILE_NAME                                          VARCHAR2(513)
 FILE_ID                                            NUMBER
 TABLESPACE_NAME                                    VARCHAR2(30)
 BYTES                                              NUMBER
 BLOCKS                                             NUMBER
 STATUS                                             VARCHAR2(9)
 RELATIVE_FNO                                       NUMBER
 AUTOEXTENSIBLE                                     VARCHAR2(3)
 MAXBYTES                                           NUMBER
 MAXBLOCKS                                          NUMBER
 INCREMENT_BY                                       NUMBER
 USER_BYTES                                         NUMBER
 USER_BLOCKS                                        NUMBER
 ONLINE_STATUS                                      VARCHAR2(7)

SQL> select file_name from dba_data_files;

FILE_NAME
--------------------------------------------------------------------------------
/opt/oracle/oradata/orcl/users01.dbf
/opt/oracle/oradata/orcl/sysaux01.dbf
/opt/oracle/oradata/orcl/system01.dbf
/opt/oracle/oradata/orcl/gdyx1.dbf
/opt/oracle/oradata/orcl/gdyx2.dbf
/opt/oracle/oradata/orcl/gdyx3.dbf
/opt/oracle/oradata/orcl/gdyx4.dbf
/opt/oracle/oradata/orcl/gdyx5.dbf
/opt/oracle/product/10.2.0/db_1/dbs/statspace.dat
/data2/dbf/user01.dat
/data2/dbf/system01.dat

FILE_NAME
--------------------------------------------------------------------------------
/data2/dbf/gdyx9.dbf
/data2/dbf/gdyx10.dbf
/data2/dbf/gdyx6.dbf
/data2/dbf/foglight.dbf
/data2/dbf/gdyx7.dbf
/data2/dbf/gdyx8.dbf
/data2/dbf/undotbs02.dbf

18 rows selected.

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@v0A-123-96-70 ~]$ cd /opt/oracle/oradata/orcl/
[oracle@v0A-123-96-70 orcl]$ ls -la
total 67055228
drwxr-x--- 3 oracle oinstall        4096 Mar 19  2012 .
drwxr-xr-x 3 oracle oinstall        4096 Mar 22  2011 ..
-rw-r----- 1 oracle oinstall     8077312 Oct 16 08:57 control01.ctl
-rw-r----- 1 oracle oinstall     8077312 Oct 16 08:57 control02.ctl
-rw-r----- 1 oracle oinstall     8077312 Oct 16 08:57 control03.ctl
drwxr-xr-x 2 oracle oinstall        4096 Mar 22  2011 datefile
-rw-r----- 1 oracle oinstall  9013567488 Oct 16 08:57 gdyx1.dbf
-rw-r----- 1 oracle oinstall  9013567488 Oct 16 08:57 gdyx2.dbf
-rw-r----- 1 oracle oinstall 10485768192 Oct 16 08:57 gdyx3.dbf
-rw-r----- 1 oracle oinstall 10485768192 Oct 16 08:57 gdyx4.dbf
-rw-r----- 1 oracle oinstall  2621448192 Oct 16 08:56 gdyx5.dbf
-rw-r--r-- 1 oracle oinstall       33534 Mar  9  2011 gdyx.sql
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:49 redo01.log
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:49 redo02.log
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:49 redo03.log
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:49 redo04.dbf
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:49 redo05.dbf
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:49 redo06.dbf
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:49 redo07.dbf
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:49 redo08.dbf
-rw-r----- 1 oracle oinstall  1073750016 Oct 16 08:54 sysaux01.dbf
-rw-r----- 1 oracle oinstall   534781952 Oct 16 08:57 system01.dbf
-rw-r----- 1 oracle oinstall 21474844672 Oct 15 22:15 temp01.dbf
-rw-r----- 1 oracle oinstall  3451133952 Oct 16 08:49 users01.dbf
[oracle@v0A-123-96-70 orcl]$ df -f
df: invalid option -- f
Try `df --help' for more information.
[oracle@v0A-123-96-70 orcl]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/xvda1             90G   86G  189M 100% /
tmpfs                 8.0G     0  8.0G   0% /dev/shm
/dev/xvde             296G  200G   81G  72% /data2
[oracle@v0A-123-96-70 orcl]$ sqlplus /nolog

SQL*Plus: Release 10.2.0.4.0 - Production on Tue Oct 16 08:59:06 2012

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

[oracle@v0A-123-96-70 orcl]$ cd /home/oracle
[oracle@v0A-123-96-70 ~]$ ls
0520         content1.dmp                     install.dir.9370  LSI_Logs.9370   spctab.lis  t_coupon_code.dmp
166-167.lst  data.dmp                         load.ctl          select          spcusr.lis  t_dayintegral_log.dmp
168-169.lst  Desktop                          load.log          sp_114_115.lst  spool1.txt  t_sales_sharecontent.dmp
170_171.lst  D_PAO_Agent_70310_Linux_x64.bin  logon.txt         sp_134_144.lst  spool2.txt
afiedt.buf   ?]??=?~??gﶃ{??D???n??ۤ4           LSI_Logs.10500    sp_144_154.lst  spool.txt
a.lst        install.dir.10500                LSI_Logs.11048    spcpkg.lis      sqlldr.log
[oracle@v0A-123-96-70 ~]$ rm *.dmp
[oracle@v0A-123-96-70 ~]$ ls -l
total 125136
drwxr-xr-x 2 oracle oinstall      4096 May 20  2011 0520
-rw-r--r-- 1 oracle oinstall    156789 Jun  4 08:48 166-167.lst
-rw-r--r-- 1 oracle oinstall    124535 Jun 11 16:35 168-169.lst
-rw-r--r-- 1 oracle oinstall    119309 Jul  4 15:25 170_171.lst
-rw-r--r-- 1 oracle oinstall      6596 May 12  2011 afiedt.buf
-rw-r--r-- 1 oracle oinstall    126336 Jun  1 16:32 a.lst
drwxr-xr-x 2 oracle oinstall      4096 Mar 22  2011 Desktop
-rwxr-xr-x 1 oracle oinstall 120180114 May  8 03:33 D_PAO_Agent_70310_Linux_x64.bin
-rw-r--r-- 1 oracle oinstall         0 Apr 21  2011 ?]??=?~??gﶃ{??D???n??ۤ4
drwxrwxr-x 6 oracle oinstall      4096 May  8 04:39 install.dir.10500
drwxrwxr-x 6 oracle oinstall      4096 May  8 04:01 install.dir.9370
-rw-r--r-- 1 oracle oinstall       127 Mar 31  2011 load.ctl
-rw-r--r-- 1 oracle oinstall       253 Mar 31  2011 load.log
-rw-r--r-- 1 oracle oinstall   6886263 May  7 16:17 logon.txt
drwxrwxr-x 2 oracle oinstall      4096 May  8 04:47 LSI_Logs.10500
drwxrwxr-x 2 oracle oinstall     20480 May  8 05:33 LSI_Logs.11048
drwxrwxr-x 2 oracle oinstall     12288 May  8 04:26 LSI_Logs.9370
-rw-r--r-- 1 oracle oinstall         0 Mar 29  2011 select
-rw-r--r-- 1 oracle oinstall         0 Mar 12  2012 sp_114_115.lst
-rw-r--r-- 1 oracle oinstall    138393 Mar 19  2012 sp_134_144.lst
-rw-r--r-- 1 oracle oinstall    130051 Mar 21  2012 sp_144_154.lst
-rw-r--r-- 1 oracle oinstall       195 Aug 23  2011 spcpkg.lis
-rw-r--r-- 1 oracle oinstall      4160 Aug 23  2011 spctab.lis
-rw-r--r-- 1 oracle oinstall      2299 Aug 23  2011 spcusr.lis
-rw-r--r-- 1 oracle oinstall       392 May  7 16:15 spool1.txt
-rw-r--r-- 1 oracle oinstall       539 May 22 14:23 spool2.txt
-rw-r--r-- 1 oracle oinstall       489 May  7 15:59 spool.txt
-rw-r--r-- 1 oracle oinstall       131 Mar 31  2011 sqlldr.log
[oracle@v0A-123-96-70 ~]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/xvda1             90G   86G  370M 100% /
tmpfs                 8.0G     0  8.0G   0% /dev/shm
/dev/xvde             296G  200G   81G  72% /data2
[oracle@v0A-123-96-70 ~]$ pwd
/home/oracle
[oracle@v0A-123-96-70 ~]$ cd -
/opt/oracle/oradata/orcl
[oracle@v0A-123-96-70 orcl]$ cd /data2
[oracle@v0A-123-96-70 data2]$ ls -la
total 48
drwxr-xr-x  8 oracle root      4096 May  8 04:53 .
drwxr-xr-x 29 root   root      4096 Oct 16 08:42 ..
drwxr-xr-x  5 oracle oinstall  4096 Mar 19  2012 data_bak
drwxr-xr-x  2 oracle oinstall  4096 Oct 11 16:44 dbf
drwxr-xr-x  2 oracle oinstall  4096 Mar  1  2012 dbfbak
drwx------  2 oracle root     16384 Feb 10  2012 lost+found
drwxr-xr-x  3 oracle oinstall  4096 May  8 04:53 quest_software
drwxr-xr-x  2 oracle oinstall  4096 Jul  3 09:40 tmp
[oracle@v0A-123-96-70 data2]$ cd dbf
[oracle@v0A-123-96-70 dbf]$ ls -la
total 121390236
drwxr-xr-x 2 oracle oinstall        4096 Oct 11 16:44 .
drwxr-xr-x 8 oracle root            4096 May  8 04:53 ..
-rw-r----- 1 oracle oinstall  1073750016 Oct 16 08:58 foglight.dbf
-rw-r----- 1 oracle oinstall 10737426432 Oct 16 08:58 gdyx10.dbf
-rw-r----- 1 oracle oinstall 11786002432 Oct 16 09:06 gdyx6.dbf
-rw-r----- 1 oracle oinstall 10737426432 Oct 16 09:10 gdyx7.dbf
-rw-r----- 1 oracle oinstall 10737426432 Oct 16 08:58 gdyx8.dbf
-rw-r----- 1 oracle oinstall 10737426432 Oct 16 08:58 gdyx9.dbf
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:49 redo09.log
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:52 redo10.log
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:53 redo11.log
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:53 redo12.log
-rw-r----- 1 oracle oinstall    52429312 Oct 16 09:11 redo13.log
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:49 redo14.log
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:49 redo15.log
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:49 redo16.log
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:49 redo17.log
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:49 redo18.log
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:49 redo19.log
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:49 redo20.log
-rw-r----- 1 oracle oinstall   524296192 Oct 16 09:02 system01.dat
-rw-r----- 1 oracle oinstall 21474844672 Oct 16 00:43 temp02.dbf
-rw-r----- 1 oracle oinstall 21474844672 Oct 16 00:42 temp03.dbf
-rw-r----- 1 oracle oinstall 21474844672 Oct 16 09:11 undotbs02.dbf
-rw-r----- 1 oracle oinstall  2796560384 Oct 16 08:58 user01.dat
[oracle@v0A-123-96-70 dbf]$ sqlplus /nolog

SQL*Plus: Release 10.2.0.4.0 - Production on Tue Oct 16 09:14:33 2012

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

SQL> conn / as sysdba
Connected.
SQL> alter temporary tablespace temp offline;
alter temporary tablespace temp offline
      *
ERROR at line 1:
ORA-00940: invalid ALTER command


SQL> alter tablespace temp offline;
alter tablespace temp offline
*
ERROR at line 1:
ORA-03217: invalid option for alter of TEMPORARY TABLESPACE

--临时表空间不能offline

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@v0A-123-96-70 dbf]$ cd /opt/oracle/
[oracle@v0A-123-96-70 oracle]$ ls
admin  flash_recovery_area  install  oradata  oraInventory  product
[oracle@v0A-123-96-70 oracle]$ cd oradata
[oracle@v0A-123-96-70 oradata]$ ls
orcl
[oracle@v0A-123-96-70 oradata]$ cd orcl
[oracle@v0A-123-96-70 orcl]$ ls
control01.ctl  datefile   gdyx3.dbf  gdyx.sql    redo03.log  redo06.dbf  sysaux01.dbf  users01.dbf
control02.ctl  gdyx1.dbf  gdyx4.dbf  redo01.log  redo04.dbf  redo07.dbf  system01.dbf
control03.ctl  gdyx2.dbf  gdyx5.dbf  redo02.log  redo05.dbf  redo08.dbf  temp01.dbf
[oracle@v0A-123-96-70 orcl]$ ls -l
total 67055220
-rw-r----- 1 oracle oinstall     8077312 Oct 16 09:23 control01.ctl
-rw-r----- 1 oracle oinstall     8077312 Oct 16 09:23 control02.ctl
-rw-r----- 1 oracle oinstall     8077312 Oct 16 09:23 control03.ctl
drwxr-xr-x 2 oracle oinstall        4096 Mar 22  2011 datefile
-rw-r----- 1 oracle oinstall  9013567488 Oct 16 09:23 gdyx1.dbf
-rw-r----- 1 oracle oinstall  9013567488 Oct 16 09:23 gdyx2.dbf
-rw-r----- 1 oracle oinstall 10485768192 Oct 16 09:23 gdyx3.dbf
-rw-r----- 1 oracle oinstall 10485768192 Oct 16 09:23 gdyx4.dbf
-rw-r----- 1 oracle oinstall  2621448192 Oct 16 09:23 gdyx5.dbf
-rw-r--r-- 1 oracle oinstall       33534 Mar  9  2011 gdyx.sql
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:49 redo01.log
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:49 redo02.log
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:49 redo03.log
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:49 redo04.dbf
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:49 redo05.dbf
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:49 redo06.dbf
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:49 redo07.dbf
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:49 redo08.dbf
-rw-r----- 1 oracle oinstall  1073750016 Oct 16 09:23 sysaux01.dbf
-rw-r----- 1 oracle oinstall   534781952 Oct 16 09:23 system01.dbf
-rw-r----- 1 oracle oinstall 21474844672 Oct 15 22:15 temp01.dbf
-rw-r----- 1 oracle oinstall  3451133952 Oct 16 09:23 users01.dbf
[oracle@v0A-123-96-70 orcl]$ cp temp01.dbf /data2/dbf/temp01.dbf
[oracle@v0A-123-96-70 orcl]$ pwd
/opt/oracle/oradata/orcl
[oracle@v0A-123-96-70 orcl]$ cd /data2/dbf/
[oracle@v0A-123-96-70 dbf]$ ls -l
total 142382260
-rw-r----- 1 oracle oinstall  1073750016 Oct 16 09:23 foglight.dbf
-rw-r----- 1 oracle oinstall 10737426432 Oct 16 09:23 gdyx10.dbf
-rw-r----- 1 oracle oinstall 11786002432 Oct 16 09:23 gdyx6.dbf
-rw-r----- 1 oracle oinstall 10737426432 Oct 16 09:23 gdyx7.dbf
-rw-r----- 1 oracle oinstall 10737426432 Oct 16 09:23 gdyx8.dbf
-rw-r----- 1 oracle oinstall 10737426432 Oct 16 09:23 gdyx9.dbf
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:49 redo09.log
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:52 redo10.log
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:53 redo11.log
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:53 redo12.log
-rw-r----- 1 oracle oinstall    52429312 Oct 16 09:19 redo13.log
-rw-r----- 1 oracle oinstall    52429312 Oct 16 09:23 redo14.log
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:49 redo15.log
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:49 redo16.log
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:49 redo17.log
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:49 redo18.log
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:49 redo19.log
-rw-r----- 1 oracle oinstall    52429312 Oct 16 08:49 redo20.log
-rw-r----- 1 oracle oinstall   524296192 Oct 16 09:23 system01.dat
-rw-r----- 1 oracle oinstall 21474844672 Oct 16 09:29 temp01.dbf
-rw-r----- 1 oracle oinstall 21474844672 Oct 16 00:43 temp02.dbf
-rw-r----- 1 oracle oinstall 21474844672 Oct 16 00:42 temp03.dbf
-rw-r----- 1 oracle oinstall 21474844672 Oct 16 09:23 undotbs02.dbf
-rw-r----- 1 oracle oinstall  2796560384 Oct 16 09:23 user01.dat
[oracle@v0A-123-96-70 dbf]$ sqlplus /nolog

SQL*Plus: Release 10.2.0.4.0 - Production on Tue Oct 16 09:30:24 2012

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

SQL> conn /as sysdba;
Connected to an idle instance.
SQL> startup mount;
ORACLE instance started.

Total System Global Area 9730785280 bytes
Fixed Size                  2099848 bytes
Variable Size            2097153400 bytes
Database Buffers         7616856064 bytes
Redo Buffers               14675968 bytes
Database mounted.
SQL> alter database rename tempfile '/opt/oracle/oradata/orcl/temp01.dbf' to '/data2/dbf/temp01.dbf';   
alter database rename tempfile '/opt/oracle/oradata/orcl/temp01.dbf' to '/data2/dbf/temp01.dbf'
                      *
ERROR at line 1:
ORA-02231: missing or invalid option to ALTER DATABASE


SQL> alter database rename file  '/opt/oracle/oradata/orcl/temp01.dbf' to '/data2/dbf/temp01.dbf'; 

Database altered.

SQL> alter database open;

Database altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.

Total System Global Area 9730785280 bytes
Fixed Size                  2099848 bytes
Variable Size            2097153400 bytes
Database Buffers         7616856064 bytes
Redo Buffers               14675968 bytes
Database mounted.
Database opened.
SQL> select file_name from dba_temp_files;

FILE_NAME
--------------------------------------------------------------------------------
/data2/dbf/temp01.dbf
/data2/dbf/temp02.dbf
/data2/dbf/temp03.dbf

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@v0A-123-96-70 dbf]$ cd /opt/oracle/oradata/orcl
[oracle@v0A-123-96-70 orcl]$ ls -l
total 67055220
-rw-r----- 1 oracle oinstall     8077312 Oct 16 09:33 control01.ctl
-rw-r----- 1 oracle oinstall     8077312 Oct 16 09:33 control02.ctl
-rw-r----- 1 oracle oinstall     8077312 Oct 16 09:33 control03.ctl
drwxr-xr-x 2 oracle oinstall        4096 Mar 22  2011 datefile
-rw-r----- 1 oracle oinstall  9013567488 Oct 16 09:33 gdyx1.dbf
-rw-r----- 1 oracle oinstall  9013567488 Oct 16 09:33 gdyx2.dbf
-rw-r----- 1 oracle oinstall 10485768192 Oct 16 09:33 gdyx3.dbf
-rw-r----- 1 oracle oinstall 10485768192 Oct 16 09:33 gdyx4.dbf
-rw-r----- 1 oracle oinstall  2621448192 Oct 16 09:33 gdyx5.dbf
-rw-r--r-- 1 oracle oinstall       33534 Mar  9  2011 gdyx.sql
-rw-r----- 1 oracle oinstall    52429312 Oct 16 09:33 redo01.log
-rw-r----- 1 oracle oinstall    52429312 Oct 16 09:33 redo02.log
-rw-r----- 1 oracle oinstall    52429312 Oct 16 09:33 redo03.log
-rw-r----- 1 oracle oinstall    52429312 Oct 16 09:33 redo04.dbf
-rw-r----- 1 oracle oinstall    52429312 Oct 16 09:33 redo05.dbf
-rw-r----- 1 oracle oinstall    52429312 Oct 16 09:33 redo06.dbf
-rw-r----- 1 oracle oinstall    52429312 Oct 16 09:33 redo07.dbf
-rw-r----- 1 oracle oinstall    52429312 Oct 16 09:33 redo08.dbf
-rw-r----- 1 oracle oinstall  1073750016 Oct 16 09:33 sysaux01.dbf
-rw-r----- 1 oracle oinstall   534781952 Oct 16 09:33 system01.dbf
-rw-r----- 1 oracle oinstall 21474844672 Oct 15 22:15 temp01.dbf
-rw-r----- 1 oracle oinstall  3451133952 Oct 16 09:33 users01.dbf
[oracle@v0A-123-96-70 orcl]$ rm -rf temp01.dbf
[oracle@v0A-123-96-70 orcl]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/xvda1             90G   66G   21G  77% /
tmpfs                 8.0G     0  8.0G   0% /dev/shm
/dev/xvde             296G  220G   61G  79% /data2
[oracle@v0A-123-96-70 orcl]$ lsnrctl start

LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 16-OCT-2012 09:34:06

Copyright (c) 1991, 2007, Oracle.  All rights reserved.

Starting /opt/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.2.0.4.0 - Production
System parameter file is /opt/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /opt/oracle/product/10.2.0/db_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=v0A-123-96-70)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=v0A-123-96-70)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.4.0 - Production
Start Date                16-OCT-2012 09:34:08
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File         /opt/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=v0A-123-96-70)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "PL***tProc" has 1 instance(s).
  Instance "PL***tProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@v0A-123-96-70 orcl]$ 
阅读(5814) | 评论(0) | 转发(0) |
0

上一篇:网络相关命令traceroute

下一篇:共同的前缀

给主人留下些什么吧!~~