永久改变会话
即使我关闭 Oracle sql Developer 后,是否可以永久更改会话?
我想要更改的语句的示例:
Alter Session Set Nls_Timestamp_Tz_Format='HH24:MI TZR';
上面的语句只允许我更改当前会话,而不是永久更改它。
谢谢
Is it possible to alter the session permanently even after i close my oracle sql developer?
An example of the statement that i want to alter:
Alter Session Set Nls_Timestamp_Tz_Format='HH24:MI TZR';
The above statement only allow me to alter the current session and not making it permanently.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
如果您只想更改 SQL Developer 的默认值,可以在 SQL Developer 设置中执行此操作。在 SQL Developer 3.1 中(早期版本中存在相同的设置,但导航可能略有不同),工具 |偏好 |数据库| NLS 允许您指定时间戳格式和时间戳 TZ 格式。然后,每当创建新会话时,SQL Developer 就会自动为您发出适当的
ALTER SESSION
命令。If you just want to change the default value for SQL Developer, you can do that in the SQL Developer settings. In SQL Developer 3.1 (the same settings exist in earlier versions though the navigation may be slightly different), Tools | Preferences | Database | NLS allows you to specify a Timestamp Format and a Timestamp TZ Format. SQL Developer will then automatically issue the appropriate
ALTER SESSION
commands for you whenever it creates a new session.您需要在初始化参数文件 全局影响数据库。
You need to set this in the initialization parameter file to affect the database globally.
可以从三个来源设置诸如 Nls_Timestamp_Tz_Format 之类的初始化参数:
ALTER SESSION SET
语句的会话中init.ora
spfile
Initialization parameters such as
Nls_Timestamp_Tz_Format
can be set up from three sources:ALTER SESSION SET
statementinit.ora
spfile
要在数据库中永久设置默认值,请从数据库:-
然后作为 SYS(因此您可能需要与 DBA 交谈),并且显然是在适当的时间! -
(我知道已经提到了 spfile,但是这一切都可以从 sqlplus cmdline 完成,至少在 11g 中是这样。)
To set default permanently in the db, from the database:-
then as SYS (so you may need to talk to a DBA), and obviously at an appropriate time! -
(I know the spfile has been mentioned, but it can all be done from the sqlplus cmdline, at least in 11g.)