|
-
Dear friend : the Oracle database per se will ** IGNORE ** the system clock : see, the database controls itself using an internal number, a "sequence" called SCN, not the system clock. So, if you change the system clock, the data WILL be rigorously THE SAME, and the database WILL be self-consistent.
So, what will be your problems/difficulties if you change the clock ? Basically things/actions based in date/time - JOBs, RECOVERs UNTIL time, things like that.
Now : your allegation about IMP being time/date dependent is , in the best of my knowledge, PURE and TOTAL b.s. : see the example (ignore the text messages in another language, it´s just the routine sql*plus and MS-DOS messages) :
system:SQL>select TO_CHAR(SYSDATE, 'dd/mm/yyyy hh24:mi:ss') from dual;
TO_CHAR(SYSDATE,'DD
-------------------
04/03/2004 21:39:06
1 linha selecionada.
system:SQL>create table TAB_TEST_EXP (c1 number, c2 varchar2(40));
Tabela criada.
system:SQL>insert into TAB_TEST_EXP values(1, 'Line 1');
1 linha criada.
system:SQL>insert into TAB_TEST_EXP values(2, 'Line 2');
1 linha criada.
system:SQL>commit;
Validação completa.
system:SQL>show user
USER é "SYSTEM"
==> table created in 2004, march, ok ?
Microsoft Windows 2000 [Versão 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.
C:\>date /t
qui 04/03/2004
==> ok, let´s export ....
C:\>exp system/manager@o8ir3 file=system_exp.dmp direct=y compress=n statistics=none tables=TAB_TEST_EXP
Export: Release 8.1.7.0.0 - Production on Qui Mar 4 21:44:10 2004
(c) Copyright 2000 Oracle Corporation. All rights reserved.
Conectado a: Personal Oracle8i Release 8.1.7.0.0 - Production
With the Partitioning option
JServer Release 8.1.7.0.0 - Production
ExportaþÒo executada no conjunto de caracteres de WE8ISO8859P1 e no conjunto de caracteres de WE8ISO8859P1 NCHAR
Sobre exportar tabelas especificadas ... via Caminho Direto ...
. . exporting table TAB_TEST_EXP 2 linhas exportadas
ExportaþÒo encerrada com Ûxito, sem advertÛncias.
===>>> now I will change the system clock, see the proofs :
system:SQL>select TO_CHAR(SYSDATE, 'dd/mm/yyyy hh24:mi:ss') from dual;
TO_CHAR(SYSDATE,'DD
-------------------
04/03/2003 21:47:47
1 linha selecionada.
system:SQL>drop table TAB_TEST_EXP;
Tabela eliminada.
C:\>date /t
ter 04/03/2003
===> the key point : I will try to import a .dmp with a table created AFTER the system clock date ...
C:\>imp system/manager@o8ir3 file=system_exp.dmp analyze=n full=y
Import: Release 8.1.7.0.0 - Production on Ter Mar 4 21:49:28 2003
(c) Copyright 2000 Oracle Corporation. All rights reserved.
Conectado a: Personal Oracle8i Release 8.1.7.0.0 - Production
With the Partitioning option
JServer Release 8.1.7.0.0 - Production
Arquivo de exportaþÒo criado por EXPORT:V08.01.07 via caminho direto
importaþÒo realizada nos conjuntos de caracteres WE8ISO8859P1 e NCHAR WE8ISO8859P1
. importando objetos de SYSTEM para SYSTEM
. . importando table "TAB_TEST_EXP" 2 linhas importadas
ImportaþÒo encerrada com Ûxito, sem advertÛncias.
system:SQL>select TO_CHAR(SYSDATE, 'dd/mm/yyyy hh24:mi:ss') from dual;
TO_CHAR(SYSDATE,'DD
-------------------
04/03/2003 21:50:25
1 linha selecionada.
system:SQL>select * from TAB_TEST_EXP;
C1 C2
---------- ----------------------------------------
1 Line 1
2 Line 2
2 linhas selecionadas.
system:SQL>
===>>>WOW!! TOTAL and ABSOLUTE success : case dismissed......
SUGGESTION : I suppose that the reason for you wanting to change the system clock is to do something like that :
select datecolumn - SYSDATE from sometable
and you DO NOT want the correct/real day/time in SYSDATE, so think about writing a MY_SYSDATE function returning the desired date (reading it from a parameter/auxiliar table, maybe)
Regards,
Chiappa
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|