Welcome to oracle_awen's archive blog
[oracle@rac2 ~]$ sqlplus sys/oracle@myorc1 as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Sun Dec 25 10:16:55 2011

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
SQL> alter system quiesce restricted;

System altered.
SQL> conn scott/oracle
/////////////////////////////////一直等


再开窗口

[oracle@rac2 ~]$ sqplus sys/oracle@myorc1 as sysdba
bash: sqplus: command not found
[oracle@rac2 ~]$ sqlplus sys/oracle@myorc1 as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Sun Dec 25 10:20:51 2011

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options

SQL> alter table scott.pic add test varchar2(20);

Table altered.

SQL> desc scott.pic 
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 PATH                                      NOT NULL VARCHAR2(200)
 IP                                        NOT NULL VARCHAR2(15)
 LOADTIME                                           DATE
 OWNER                                     NOT NULL VARCHAR2(15)
 SCORE                                              NUMBER(10)
 LOCKED                                    NOT NULL CHAR(5)
 TEST                                               VARCHAR2(20)

SQL>  alter table scott.pic modify test number(20);

Table altered.

SQL> desc scott.pic 
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 PATH                                      NOT NULL VARCHAR2(200)
 IP                                        NOT NULL VARCHAR2(15)
 LOADTIME                                           DATE
 OWNER                                     NOT NULL VARCHAR2(15)
 SCORE                                              NUMBER(10)
 LOCKED                                    NOT NULL CHAR(5)
 TEST                                               NUMBER(20)

SQL>  alter table scott.pic drop column test;

Table altered.

SQL> desc scott.pic 
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 PATH                                      NOT NULL VARCHAR2(200)
 IP                                        NOT NULL VARCHAR2(15)
 LOADTIME                                           DATE
 OWNER                                     NOT NULL VARCHAR2(15)
 SCORE                                              NUMBER(10)
 LOCKED                                    NOT NULL CHAR(5)

SQL> alter system unquiesce  ;

System altered.

\\\\\\\\\\\\\\\\\\\\\\\scott连上了

SQL> conn scott/oracle
Connected.
添加评论

昵称 *

E-mail (防止垃圾信息,此栏留空)