Chinaunix首页 | 论坛 | 博客
  • 博客访问: 313536
  • 博文数量: 84
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 890
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-13 16:46
文章分类

全部博文(84)

文章存档

2017年(2)

2016年(4)

2015年(78)

我的朋友

分类: Oracle

2015-10-22 10:26:14

SQLPlus查询的结果,可以根据自己的屏幕情况进行调节,设置如下:

1.设置页面显示总行数

show pagesize;   //首先查看目前的pagesize,默认是14

set pagesize 100; //将pagesize设置好100,则可以一次显示够多行记录了

2.设置行的宽度

show linesize;   //查看目前的linesize,默认是80

set linesize 200; //设置成200或者更宽都可

SQL>  select * from v$logfile;   查看v$logfile内容还是串行

    GROUP# STATUS  TYPE
---------- ------- -------
MEMBER
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
IS_
---
         3         ONLINE
/u01/app/oracle/oradata/orcl/redo03.log
NO

         2         ONLINE
/u01/app/oracle/oradata/orcl/redo02.log
NO

    GROUP# STATUS  TYPE
---------- ------- -------
MEMBER
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
IS_
---

         1         ONLINE
/u01/app/oracle/oradata/orcl/redo01.log
NO

         4         ONLINE
/u01/app/oracle/oradata/orcl/redo4.log

    GROUP# STATUS  TYPE
---------- ------- -------
MEMBER
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
IS_
---
NO


SQL> show line  #查看行的宽度
linesize 300
SQL>
SQL>
SQL>
SQL> col MEMBER format a50  #设置MEMBER等于50字符
SQL> /                      #执行sql

    GROUP# STATUS  TYPE    MEMBER                                             IS_
---------- ------- ------- -------------------------------------------------- ---
         3         ONLINE  /u01/app/oracle/oradata/orcl/redo03.log            NO
         2         ONLINE  /u01/app/oracle/oradata/orcl/redo02.log            NO
         1         ONLINE  /u01/app/oracle/oradata/orcl/redo01.log            NO
         4         ONLINE  /u01/app/oracle/oradata/orcl/redo4.log             NO

SQL> desc v$logfile;
 Name                                                                                                                                                                          Null?    Type
 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------- --------------------------------------------------------------------------------------------------------------------
 GROUP#                                                                                                                                                                        NUMBER
 STATUS                                                                                                                                                                        VARCHAR2(7)
 TYPE                                                                                                                                                                          VARCHAR2(7)
 MEMBER                                                                                                                                                                        VARCHAR2(513)
 IS_RECOVERY_DEST_FILE                                                                                                                                                         VARCHAR2(3)

SQL>
阅读(1614) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~