<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Decode360's Blog

    業(yè)精于勤而荒于嬉 QQ:150355677 MSN:decode360@hotmail.com

      BlogJava :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 ::  :: 管理 ::
      302 隨筆 :: 26 文章 :: 82 評(píng)論 :: 0 Trackbacks

    ??? 最近遇到一個(gè)問(wèn)題,在sqlplus首次登錄時(shí),會(huì)調(diào)用login.sql,顯示指定的SQLPROMPT,但是當(dāng)再次使用connect命令連接其他用戶(hù)時(shí),顯示的SQLPROMPT一直無(wú)法改變,而且重新connect之后所有在login.sql中設(shè)置的屬性也全部丟失。找了很久原因之后才發(fā)現(xiàn)原來(lái)是因?yàn)镺racle的版本問(wèn)題,9i中只能在初次登錄sqlplus時(shí)才會(huì)去調(diào)用login.sql,而在10g之后,每次connect都會(huì)調(diào)用該腳本。

    ?

    ??? 下面看一個(gè)轉(zhuǎn)載的文章,說(shuō)的比較清楚:注意紅色粗體部分。

    ?

    ---------------------------------------------------------------------------------------------------------

    ?

    Storing settings for SQL*PLUS (login.sql and glogin.sql)

    ?

    glogin.sql


    ????Whenever SQL*PLUS starts up, it looks for a file namedglogin.sql under the directory $ORACLE_HOME/sqlplus/admin. If such a file is found, it is read and the containing statements executed. This allows to store settings (such as linesize) accross SQL*PLUS sessions.

    ?

    ??? New in Oracle 10g: Oracle also reads glogin.sql and login.sql at a connect in sql*plus.

    login.sql


    ??? Additionally, after reading glogin.sql, sql*plus also looks for a file named login.sql in the directory from where SQL*PLUS was and in the directory that the environment variable SQLPATHpoints to and reads it and executes it. Settings from the login.sql take precedence over settings from glogin.sql

    ?

    ??? If the restriction level is set to 3, the login.sql is not read.

    A common login.sql file

    ??? set pagesize 0
    ??? set linesize 190
    ??? define _editor=gvim

    ?

    ??? 10g

    ??? Since Oracle 10g, the login.sql is executed after a connect.

    ??? This allows to have a prompt that displays the username.

    ??? For that, the following line must be in the login.sql:
    ??? set sqlprompt "&_user> "

    ?

    ------------------------------------------------------------------------------------------------------------

    ?

    ??? 同時(shí)在10g官方文檔《SQLPlus User's Guide and Reference》里也有記載,設(shè)置SQLPLUSCOMPATIBILITY可以改變sqlplus某些屬性,其中就包括glogin/login的讀取:

    ?

    ?

    SET SQLPLUSCOMPATIBILITY {x.y[.z]}

    ?

    Value??? Consequence?????????????????????????????????????????????????????????When available
    >=10.1?? SHOW ERRORS sorts PL/SQL error messages using new???????????????????10.1
    ???????? columns only available in Oracle Database 10g.
    >=10.1?? SPOOL Options CREATE, REPLACE, SAVE were added which????????????????10.1
    ?????????may affect filename parsing on some platforms.
    >=10.1?? SET SQLPROMPT???????????????????????????????????????????????????????10.1
    >=10.1?? Whitespace characters are allowed in Windows file names that??????? 10.1
    ???????? are enclosed in quotes. Some other special punctuation characters
    ???????? are now disallowed in Windows.
    >=10.1?? Glogin/login files are called for each reconnect.???????????????????10.1
    ?<10.1???Uses the obsolete DOC> prompt when echoing /* comments.???????????? 10.1
    ?>=9.2?? A wide column defined FOLD_AFTER may be displayed at the??????????? 9.2.
    ???????? start of a new line. Otherwise it is incorrectly put at the end

    ???????? of thepreceding line with a smaller width than expected.
    ?>=9.0?? Whitespace before a slash ("/") in a SQL statement is ignored and?? 9.0.1.4.
    ???????? the slash is taken to mean execute the statement. Otherwise the
    ???????? slash is treated as part of the statement, for example, as a

    ???????? divisionsign.

    ?>=9.0?? The length specified for NCHAR and NVARCHAR2 types is???????????????9.0.1
    ???????? characters. Otherwise the length may represent bytes or
    ???????? characters depending on the character set.

    ?





    -The End-

    posted on 2009-03-11 23:49 decode360-3 閱讀(623) 評(píng)論(0)  編輯  收藏 所屬分類(lèi): Oracle
    主站蜘蛛池模板: 8x8x华人永久免费视频| 亚洲国产欧美国产综合一区 | 免费无码又爽又黄又刺激网站 | 亚洲人成激情在线播放| 精品无码无人网站免费视频| 亚洲国产精品久久久久婷婷软件| www.av在线免费观看| 丁香五月亚洲综合深深爱| 一级毛片一级毛片免费毛片| 久久精品国产亚洲5555| baoyu777永久免费视频| 久久亚洲免费视频| 精品国产免费人成电影在线观看 | 一区二区三区在线免费观看视频 | 亚洲尹人九九大色香蕉网站| 免费国产午夜高清在线视频| 亚洲AV成人精品网站在线播放| 日韩人妻无码精品久久免费一| 91亚洲精品第一综合不卡播放| 成人免费视频77777| 亚洲成a∨人片在无码2023| 国产成人在线观看免费网站| 国产成人自产拍免费视频| 亚洲精品无码mv在线观看网站| 免费无码一区二区三区| 亚洲免费闲人蜜桃| 浮力影院第一页小视频国产在线观看免费 | 一二三四免费观看在线电影| 亚洲乱亚洲乱妇24p| 亚洲精品无码久久不卡| 91免费国产视频| 亚洲国产中文在线二区三区免| 四色在线精品免费观看| a级午夜毛片免费一区二区| 久久亚洲精品无码aⅴ大香| 永久免费AV无码网站在线观看 | 久久久久亚洲国产AV麻豆 | 免费一级毛片无毒不卡| 中文字幕 亚洲 有码 在线| 亚洲男人的天堂在线va拉文 | 嫩草视频在线免费观看|