-- Get
select sessiontimezone from dual;
--Db timezone
select dbtimezone from dual;
-- Set
set ora_sdtz=db_tz
or
alter session set time_zone=dbtimezone;
--change db time_zone
16:51:23 SQL> alter database set time_zone='+01:00';
Database altered.
16:55:11 SQL> create table t_lt (id timestamp with local time zone);
Table created.
Elapsed: 00:00:00.64
16:55:29 SQL> alter database set time_zone='+01:00';
Database altered.
Elapsed: 00:00:00.06
16:55:31 SQL> alter database set time_zone='+02:00';
Database altered.
16:56:16 SQL> insert into t_lt select systimestamp from dual;
1 row created.
Elapsed: 00:00:00.07
16:56:33 SQL> commit;
Commit complete.
Elapsed: 00:00:00.00
16:56:35 SQL> alter database set time_zone='+01:00';
alter database set time_zone='+01:00'
*
ERROR at line 1:
ORA-30079: cannot alter database timezone when database has TIMESTAMP WITH LOCAL TIME ZONE columns
This site contains information, scripts and instructions related to Oracle database and other technologies. Please use sqlplus and test my scripts on test environment before actual use on production. All relevant comments are welcome.
Страницы
- Main
- Veritas cluster
- AIX
- Solaris
- Linux
- Performance scripts
- RAC
- TNS
- Init parameters
- Dataguard
- ASM
- Unix tips
- VxVM
- Linux HA (hearbeat)
- Oracle internals
- Metalink (useful notes)
- Security
- OGG Oracle Golden Gate
- HTML/JavaScript in sqlplus
- Automatic TSPITR 11.2.0.3 (dropped user)
- 12.1
- SQL Performance Analyzer
- Backup/Recovery
- Alert log
вторник, 7 декабря 2010 г.
Подписаться на:
Комментарии к сообщению (Atom)
Update BLOB
set define off DECLARE vb1 CLOB := 'long text'; vb2 CLOB := 'long text'; vb3 CLOB := ...
-
set define off DECLARE vb1 CLOB := 'long text'; vb2 CLOB := 'long text'; vb3 CLOB := ...
-
RMAN> sql "alter database datafile '/u01/app/oracle/oradata/orcl/test_1.dbf' off line"; using target database contro...
-
-- After media failure 03:03:25 150 4294967295 SYS@orcl> select * from t_t where object_name = 'test'; select * from t_t where ob...
Комментариев нет:
Отправить комментарий