Oracle学习笔记-0003

来源:互联网 发布:董小飒淘宝 编辑:程序博客网 时间:2024/05/20 10:56

1、ORA-32004解决方法
我在修改参数 log_archive_start =true后启动数据库,报告错误ORA-32004,我以为是我改错了,又改回了false,后来重启还是报这个错,

查看了官方文档之后才知道原来这个参数在10G已经废除了,我等于是加了一条没有的参数在spfile里面,后来我用如下语句解决了该问题。
SQL> startup open;
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORACLE instance started.
Total System Global Area  285212672 bytes
Fixed Size                  1218992 bytes
Variable Size             100664912 bytes
Database Buffers          180355072 bytes
Redo Buffers                2973696 bytes
Database mounted.
Database opened.
SQL>  alter system reset  log_archive_start scope=spfile sid='*'; /*这里注意SID就是符号*,而不是你的SID名称*/
System altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup open;
ORACLE instance started.
Total System Global Area  285212672 bytes
Fixed Size                  1218992 bytes
Variable Size             100664912 bytes
Database Buffers          180355072 bytes
Redo Buffers                2973696 bytes
Database mounted.
Database opened.
2、#cat /etc/group 查看linux下用户组。
3、#cat /etc/passwd 查看linux下用户。
4、linux系统下对*.cpio.gz文件的操作。该文件是一个经过压缩的文件,当然要先解压了。
   #gunzip *.cpio.gz,这样文件就解压成为 "*.cpio" 了,然后再对它进行cpio操作
   #cpio -idmv < *.cpio,这样就将cpio文件彻底暴露在我们面前了。
5、*.tar.gz文件的解压,gunzip -d *.tar.gz,会生成一个*.tar的文件,然后使用tar -xvf *.tar即可。
6、DB2启动服务管理器(本例中采用系统默认)
   #su - dasusr1
   $db2admin start
7、启动DB2数据库步骤:
   #su - dasusr1(切换至服务管理器用户环境)
   $db2admin start(启动服务管理器)
   $su - db2inst1(切换至db2inst1实例)
   $db2 connect to hfgjjdb(db2 connect to hfgjjdb user db2inst1 using oracle,用db2inst1用户连接到数据库hfgjjdb)
   $db2start(启动数据库hfgjjdb)
8、用exp导出scott模式下的所有表。
   #export NLS_LANG=AMERICAN_AMERICA.UTF8
   #su - oracle
   $cd /home/oracle/
   $exp scott/tiger  file=scott.dmp owner=scott triggers=n grants=n indexes=n log=scott.log