oracle log

770阅读 2评论2011-02-24 terry-xcb
分类:Oracle

oracle中查看总共有哪些用户: select   username   from   all_users;
oracle中查看总共有哪些表:  select table_name   from   all_tables;
===========================================================================
oracle 修改表字段的长度

alter   table   表名   modify(字段名   varchar2(50)) ,

修改表字段和列名称 :alter   table   表名   modify(字段   varchar2(20),   字段   varchar2(50))


==================

[svcs@localhost ~]$ sqlplus svcsOra/svcsOra

SQL*Plus: Release 11.1.0.6.0 - Production on Tue Mar 12 14:58:58 2013

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

ERROR:
ORA-01033: ORACLE initialization or shutdown in progress
Process ID: 0
Session ID: 0 Serial number: 0
------------------------------------------------
分析以上问题:
[svcsWeb@localhost ~]$ sqlplus / as sysdba
SQL> shutdown immediate;

SQL> startup
ORACLE instance started.

Total System Global Area  426852352 bytes
Fixed Size                  1300380 bytes
Variable Size             293603428 bytes
Database Buffers          125829120 bytes
Redo Buffers                6119424 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 5 - see DBWR trace file
ORA-01110: data file 5: '/oracle/ora11g/oradata/test/svcs_db01.dbf'
--通过start查看问题.

因为数据文件在没有被offline的情况下物理删除了,导致oracle的数据不一致,因此启动失败.

解决方法:

sqlplus as sysdba;

SQL> alter database datafile 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\TSTEST001.DBF' offline drop;


上一篇:vi 使用
下一篇:TUXEDO

文章评论