Oracle 建立全球化支持环境 [英] Oracle Setting Up a Globalization Support Environment

查看:26
本文介绍了Oracle 建立全球化支持环境的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们希望在用户/模式级别为所有会话设置此 SET NUMFORMAT 99999999999999999.00.当前,当设置此命令时,它仅适用于该会话.我们可以在全局范围内这样做吗,这样无论何时我们打开连接,这都有效>

We want to set this SET NUMFORMAT 99999999999999999.00 at the user/schema level, for all sessions. Currently ,when set this command , it is getting applicable for that session only. Can we do this globally , so that when ever we open the connection , this works >

推荐答案

SET NUMFORMAT 是一个 SQL*Plus 命令.通常,客户端设置用于显示数字.

SET NUMFORMAT is a SQL*Plus command. In general, it is a client-side setting to display the number.

您始终可以将 SQL*Plus 设置存储在 login.sqlglogin.sql 中.每当SQL*Plus 启动时,它都会在$ORACLE_HOME/sqlplus/admin 目录下查找名为glogin.sql 的文件.如果找到这样的文件,则读取它并执行包含的语句.另外,在读取glogin.sql后,sql*plus还会在SQL*Plus所在的目录和环境变量SQLPATH指向的目录中查找一个名为login.sql的文件并读取并执行它.login.sql 中的设置优先于 glogin.sql 中的设置.

You could always store the SQL*Plus settings in login.sql and glogin.sql. Whenever SQL*Plus starts up, it looks for a file named glogin.sql under the directory $ORACLE_HOME/sqlplus/admin. If such a file is found, it is read and the containing statements are executed. 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 SQLPATH points to and reads it and executes it. Settings from the login.sql take precedence over settings from glogin.sql.

如果您只是显示数字,并希望以所需格式显示,则在单个 SQL 语句级别使用TO_CHAR.

If you are just displaying the number, and want it to be displayed in desired format, then use TO_CHAR at individual SQL statement level.

例如

SQL> select to_char(123.456,'999.9') VALUE from dual
  2  /

VALUE
------
 123.5

底线,这是一个 SQL*Plus 命令,而不是 Oracle SQLPL/SQL 命令.这只会影响 SQL*Plus 中数据的显示方式,而不会影响访问数据库的其他程序.无论您使用什么来显示数据,都应该有类似的东西,而不是 SQL*Plus.

Bottomline, this is a SQL*Plus command, not an Oracle SQL or PL/SQL command. This will only affect how the data is displayed from SQL*Plus, not from other programs that access the database. There should be something similar in whatever you are using to display your data instead of SQL*Plus.

这篇关于Oracle 建立全球化支持环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆