sqlplus /as sysdba 报1013错误,另一种情况。
发现把oracle用户放在dba组里也不行了,放在oinstall组里解决问题。[@more@]
SharePlex for Oracle - ORA-01013: user requested cancel of current operation
This message is strictly informational. The "user requested cancel of current operation on rowid AAAAAAAAAx" error is just evidence of excessive rollback activity on the source database. This is when a user issues a ctrl c during execution of a script or someone's session was killed before a commit was issued. This is not a fatal error.[@more@]
以前没用过的sqlplus的输出格式
SET verify OFF 取消参数传入时对sql的校验set pagesize 0 取消返回记录之间的空行[@more@]
ORA-01031: insufficient privileges
克隆ORACLE之后用SYSDBA登陆出现1031错误,原因是新建的ORACLE用户没有放在DBA组里。[@more@]
PLS-00103 appears in the last row
把脚本COPY出来,删掉最后的"/;",再执行就可以了。[@more@]
export spfile to txt
SQL> create pfile='initsid.ora' from spfile;[@more@]
exp-00024 issue
re-execute $ORACLE_HOME/rdbms/admin/catexp.sql[@more@]
oracle9i切换undotbs
CREATE undo TABLESPACE UNDOTBS1 DATAFILE '/disk1/oradata/test/undotbs1.dbf' SIZE 2000M reuse AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED;alter system set undo_tablespace=undotbs1 scope=both;前提:启用spfile[@more@]
oracle9i启用spfile
CREATE SPFILE='$ORACLE_HOME/dbs/spfilesid.ora'FROM PFILE='$ORACLE_HOME/dbs/initsid.ora'; 重启。[@more@]
因数据文件丢失导致ORA-01157错误
start up数据库的时候报错:ORA-01157: cannot identify/lock data file 5 - see DBWR trace file ORA-01110: data file 5: '/disk3/oradata/test.dbf' 因为不需要恢复此数据文件,所以将它删除即可。解决方法:在数据库mount的状态下,alter database datafile '/disk3/oradata/test.dbf' offline drop;然后打开数据库:alter database open;删除表空间:select name from v$tablespace where ts# in(select ts# from v$datafile where name = '/disk3/oradata/test.dbf');drop tablespace NAME including contents;[@more@]
用sqlplus '/as sysdba'跟用户组有关系
新建的用户oracle,组定义为oinstall,用sqlplus '/as sysdba'登陆报权限不够,用usermod将组改为dba后解决。[@more@]
dba_sequences中cache_size的含义
每次取出cache_size个值,放在cache里。last_number每次增加的值=INCREMENT_BY*CACHE_SIZE[@more@]
ORA-01123: cannot start online backup; media recovery not enabled
Problem:SQL> alter tablespace xxxxxxx begin backup;alter tablespace xxxxxxxx begin backupORA-01123: cannot start online backup; media recovery not enabledSQL> archive log listDatabase log mode No Archive ModeAutomatic archival EnabledArchive destination /disk01/archive/xxxxxOldest online log sequence 84Current log sequence 86[@more@]Solution:SQL> shutdown immediateDatabase closed.Database dismounted.ORACLE instance shut down.SQL> star
ls 列表排序
按日期升序排列:ls -l|sort +5按日期降序排列:ls -lt按名称升序排列:ls -ln[@more@]
9i关闭RAC功能
需要建立一个独立的INSTANCE,源文件是从一个RAC的其中一个节点上CLONE出来的。在目标主机上解包、relink(这一步缺了几个lib,从源主机上获得后解决)后,启动oracle到nomount状态,报如下错误:[@more@]SQL> startup nomount pfile="$ORACLE_HOME/dbs/init<sid>.ora";ORA-27504: IPC error creating OSD context在metalink上获知此问题是因源主机是RAC的节点造成的,故需在新主机上关闭RAC功能。步骤如下:cd $ORACLE_HOME/rdbms/libmake -f ins_rdbms.mk rac_offmake -f ins_rdbms.mk ioracle如果要重新开启racORAC
工作中用到的东西
查看oracle位数:file $ORACLE_HOME/bin/oracle 查看solaris的补丁安装情况:pkginfo -i SUNWxwfnt[@more@]
SHAREPLEX:执行ORA_SETUP时报ORA-01552错
在指定了shareplex用到的表空间后开始建立相关对象,报错:ORA-01552 cannot use system rollback segment for non-system tablespace [@more@]与相关人员交流后了解这个库是从其他库CLONE过来的,版本是9.2.0.4。检查其表空间,发现没有UNDOTBS,有一个RBS,在INIT文件中,有 rollback_segments =(rbs01......) ,据此怀疑原库是从8i升级而来。解决步骤:1、建立UNDOcreate undo tablespace undotbsdatafile '/×××××/undotbs1.dbf' size 200M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED;2、修改INIT注释rollback_segments添
Use tar with gzip directly
This command create a compress file by tar|gzip.tar cvf - directory_name(or file_name) | gzip > file_name.tar.gzOS: Solaris 9[@more@]