18 is a nice age here. You can vote, you can watch movie or drink Gin-tonic. You also get married and go to jail !
Are you really 18 today?
select add_months(date '1990-02-28',18*12) from dual;
ADD_MONTHS(DATE'199
-------------------
29.02.2008 00:00:00
come back tomorrow
or check an old post of mine How old are you
Tags:
Sven’s Technik-Blog » Blog Archive » Oracle 10.2.0.4 für Linux x86 ist verfügbar…
Patchset 6810189 is now available for Download on Metalink.
[[code]]czozMzI6XCJzZWxlY3QgKiBmcm9tIHYkdmVyc2lvbjsNCg0KQkFOTkVSDQotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS17WyYqJl19LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KT3JhY2xlIERhdGFiYXNlIDEwZyBFbnRlcnByaXNlIEVkaXRpb24gUmVsZXtbJiomXX1hc2UgMTAuMi4wLjQuMCAtIFByb2QNClBML1NRTCBSZWxlYXNlIDEwLjIuMC40LjAgLSBQcm9kdWN0aW9uDQpDT1JFICAgIDEwLjIue1smKiZdfTAuNC4wICAgICAgUHJvZHVjdGlvbg0KVE5TIGZvciBMaW51eDogVmVyc2lvbiAxMC4yLjAuNC4wIC0gUHJvZHVjdGlvbg0KTkxTUlR7WyYqJl19TCBWZXJzaW9uIDEwLjIuMC40LjAgLSBQcm9kdWN0aW9uDQpcIjt7WyYqJl19[[/code]]
Tags:
I wrote it already :
Laurent Schneider » Blog Archive » TO_CHAR(…, ‘D’)
I thought the one I found out this night was fun
select to_char(sysdate,'DAY',
'NLS_DATE_LANGUAGE=''numeric date language''')
from dual;
T
-
3
[edit]this feature is not documented, do not use in prod[/edit]
Tags:
I first thought of adding Klingon. Well, finally I added Romansh, which is the fourth official language in my country.
Ok, here we go :
$ $ORACLE_HOME/nls/lbuilder/lbuilder &
The Oracle Locale Builder tool is started.
File –> New… –> Language
You specify the language, the spelling for January, for Monday, etc… Most fields are mandatory. If you do not know about one field, like EBCDIC, just find one in the “Show existing definition…” Dialog
File –> Save as…
You save your nlt file
File –> Tools –> Generate NLB
Three NLB files are generated.
$ ls -l *.nl*
-rw-r--r-- 1 lsc users 934 2008-02-19 18:17 lx003eb.nlb
-rw-r--r-- 1 lsc users 3843 2008-02-19 18:17 lx003eb.nlt
-rw-r--r-- 1 lsc users 128 2008-02-19 18:17 lx0boot.nlb
-rw-r--r-- 1 lsc users 428 2008-02-19 18:17 lx0boot.nlt
-rw-r--r-- 1 lsc users 22528 2008-02-19 18:17 lx1boot.nlb
Copy all your the NLB files to your ORACLE_HOME/data/nls.
Restart your instance.
Let’s test it
select
to_char(
sysdate,
'fmday dd month yyyy','NLS_DATE_LANGUAGE=romansch'
)
from dual;
TO_CHAR(SYSDATE,'FMDAYDDMONTHYY
-------------------------------
mardis 19 favrer 2008
Tags:
In Oracle11g the alert log is an XML file. The old style alertSID.log is created out of the log.xml for backward compatibility only. However, some exciting enhancement are not noticable in the old one.
$ tail -3 alert*.log
Mon Feb 04 15:52:38 2008
ALTER SYSTEM SET recyclebin='OFF' SCOPE=SPFILE;
ALTER SYSTEM SET recyclebin='ON' SCOPE=SPFILE;
If I check in the xml file, I get more info about the execution time, which contains milliseconds
$ adrci exec="show alert -term"|tail -4
2008-02-04 15:52:38.366000 +01:00
ALTER SYSTEM SET recyclebin='OFF' SCOPE=SPFILE;
2008-02-04 15:52:42.101000 +01:00
ALTER SYSTEM SET recyclebin='ON' SCOPE=SPFILE;
This timestamp could be really usefull !
There is also a command -tail for adrci, but it outputed the whole log for some unkown reason
Tags: