logs archiveIRC Archive / Freenode / #oracle / 2010 / February / 15 / 1
sileni
he guys what software do you guys use to write ER diagrams
alan_andrade
DIA
is very simple. But is cool.
sileni
alan_andrade, is it free?
Rudemeister
here I am, @Oracle today, whole week actually.
brrr
gigasoft
how to run oracle again after restarting ubuntu
Rudemeister
?
mator
morning
brig
hi
Rudemeister
hi
moarning
         

stede
how to avoid rounding-error from numtodsinterval()? e.g. i adding numtodsinterval(100.2,'SECOND') to a timestampand get a date with X.199 seconds at the end :-/
Rudemeister
wb
usn_work
good aftermorning
Rudemeister
hey usn_work
stede
i fixed my problem by addinf 0.001 to the value i give to numtodsinterval() - dirty, but works for now
idletask
Hello
Are there any examples somewhere of using dbca in silent mode to create a database from a template which includes datafiles?
Rudemeister
google response file
and datafiles
and change your nick to runningtask:P
;)
idletask
I have done that already but didn't really find what I want...
Rudemeister
have you tried working with oracle managed files?
idletask
No
Rudemeister
tablespace would imply datafiles
should be enough?
idletask
Why not...
But that won't solve my dbca problem :p
usn_work
maybe a Db create script is better than an unattended dbca
(I'd prefer it)
idletask
usn_work: unfortunately, dbvault installation via SQL scripts is not supported, otherwise I'd have used the scripts anytime :(
usn_work
Can you exercise the dbca once, and record the response file?
idletask
I have the template file generated already
usn_work
not TEMPLATE
RESPONSE FILE (ending .rsp)
the file that has your mouse clicks in it ;)
idletask
I haven't got the responsefile, no
usn_work
Can you exercise the dbca once, and record the response file?
idletask
How? Is it like OUI with -record -destinationFile /path/to/responsefile.rsp?
         

usn_work
http://www.lmgtfy.com/?q=dbca+response+file
idletask
Been there, done that :/
Grrr
And the answer is apparently no,
There is no such option for dbca
:(
Great
OK, now that really gets on my nerves
Even dbca in silent mode fails to activate dbvault
Rudemeister
huh
idletask
Not only do the generated scripts fail at activating it, but dbca will fail activating dbvault with its own generated template file
babo1
i've installed 11g and i can get sqlplus on the terminal. i don't have a username and password though ...
idletask
That SUCKS
babo1
now what
?
Rudemeister
?
idletask
babo1: during the install, have you elected to create a database?
babo1
idletask, no
idletask
babo1: then you should create one, obviously... Using that joke of a tool that is dbca (sorry, but it gets on my nerves bad)
babo1
idletask, how do i access dbca ?
idletask
babo1: as the user which installed the engine (oracle typically)
babo1
idletask, i installed as babo.
idletask
Well then as babo
babo1
how do i physically access dbca though. where is it ?
idletask
In $OH/bin
You do have ORACLE_BASE and ORACLE_HOME set, don't you?
babo1
idletask: yes
idletask
Then you should set PATH to $ORACLE_HOME/bin:$PATH
Grrr, this sucker of dbca, even when electing to use a template in which I said NOT to configure EM, tries and activate it nevertheless
How on earth has this thing been programmed
Rudemeister
:>
idletask
tarball, here I come
At least I know _that_ will work :/
Grrr, it has also f*ed up my datafiles locations
Rudemeister
idletask: any luck yet
?
idletask: what exactly is the problem?
idletask
Rudemeister: dbca cannot manage to create working scripts for a database in which you want dbvault in it
Rudemeister
hmm
idletask
As I don't want anything interactive, my only option seems to be generate the database, make a tarball of all datafiles/config and use that tarball - which I can afford since all my systems are with the same arch, but which is not supported by oracle
Rudemeister
true
already created an SR about this?
idletask
Yes
Rudemeister
what do "they" say
?
idletask
"It's not a bug, an enhancement request has been created about that" :/
Rudemeister
:P
niice
idletask
Well, whatever, tarball it will be, I want non interactive since production environments don't have anything X
sytse
say, is there no way at all that I can make the CBO perform an INDEX UNIQUE SCAN on the first column of a multi-column index?
making an additional unique index on the first column alone doesn't appear to make it clear to oracle that that first column by itself is already guaranteed to be unique (I do want it to use the multi-column index btw, because all I retrieve from the rows of that table is contained in the index)
idletask
sytse: is this column the first declared in the multicolumn index?
sytse
yes.
it performs an index range scan, as one would expect when the uniqueness of this column could not be guaranteed
one index is on tablename (upper(code)), the other on tablename (upper(code), id), both unique, and it does use the multi-column one as that will yield the id immediately without having to read the row data
oh, and the table also has a primary key constraint on id, which guarantees that each value of upper(code) yields at most one value of id
I'm using 10g btw, no idea if this has been fixed in 11g
idletask
Unique constraint automatically generates an index
sytse
yes, but I can't create a unique constraint on a function can I?
idletask
Errwhat? This is a _functional_ index?
sytse
yes
idletask
Aiee
You should have started by that
This type of index is frowned upon by the optimizer, and this is not without reason
The optimizer has no way to know that the yielded value will be unique
sytse
of course it has, when I have a unique index on that column that should guarantee the uniqueness
*on that column put through the function
as I said, I have a unique index on tablename (id) because of the PK, a unique index on tablename (upper(code)), and a unique index on tablename (upper(code), id)
idletask
Hmm, I don't know the syntax to create a "functional unique" index
But try and force feed it to the optimizer, you may realize that after all it was right to use the range scan :p
sytse
nope, pretty sure it could use a unique scan if it implemented single level unique scans on multi-column indexes
idletask
Well, TIAS
sytse
can't force a unique scan with oracle hints btw
idletask
No, but you can hint the optimizer to use an index and not use another one
sytse
yes, but all that gives me is that it does a unique scan on the upper(code) single column index, then does a table access
that I already knew it would
(just tried it)
Rudemeister
hu
hi
ho
idletask
OK, tarball works
And metalink has answered me that SQL script generation for a dbvault instance will be 12g :(
Rudemeister
really, idletask :S
bummer
Dormir
morning
josemoreira
how can i execute an sql script but skip errors?
idletask
josemoreira: I don't know offhand, but google for "whenever sqlerror"
josemoreira
ok thanks
f00
you could handle errs with exceptions
josemoreira
cant rememebr sintax
ill look it up thx
sytse
f00: nah, you'd need to create an exception block for each line of code, much more cumbersome
josemoreira
sytse, you seem to be right
"ou can still handle an exception for a statement, then continue with the next statement. Place the statement in its own sub-block with its own exception handlers."
wtf
no wonder a lot of ppl hates oracle
sytse
josemoreira: the first result on googling 'whenever sqlerror' gives you a good alternative
josemoreira
ive found a fix
sytse
whenever sqlerror continue
josemoreira
ah nice
sytse
put that at the top of your script and it will do what you want
josemoreira
thanks
usn_work
and go on hating oracle :P
josemoreira
:)
ive done a script that generates ddl and executes it
sytse
(that's a SQL*Plus command btw)
josemoreira
its not that i really "hate" oracle
sytse
you just hate working with it? ;p
josemoreira
it's just that working with it always causes me "problems"
indirectly
for exmaple the php pdo driver is broken
and made we do way over around it
usn_work
if Oracle won't cause trouble, 90% of this channel were on the dole
josemoreira
it's broken on lob's/clobs
sytse
who wants to use php, of all languages, as a server-side scripting language on a database...
josemoreira
i dont
but i have to
sytse
most terrible choice ever
josemoreira
unfortunately
sytse
why?
josemoreira
yeah try explaining that to my bosses
i'd rather be working on python
or possibly java
sytse
oh wait, PDO.. never mind me, I thought you used php server-side
but you use it client-side
'client' as in database client
josemoreira
yes its server side
sytse
josemoreira: common lisp! ;-)
josemoreira
lisp's out of our league
we do web apps
this specific customer has an oracle db
we ususally do mysql
i would prefer postgres
but try explaining also that to my bosses :)
sytse
oh, it -is- server-side? So you mean, you actually have the oracle database server store php functions as oracle functions/procedures to call from your SQL?
josemoreira
no lol
we use php for the app accessing an oracle instance
sytse
that's what I call server-side when I talk about databases
josemoreira
yes
im using a workflow library
taht uses PDO as a backend for db abstraction
not oci directly
and pdo seems broken
i've heard the author refuses to maintain it
Ahroun
Question: Following note 356221.1 regarding adding fonts to a report server running on linux for report builder running on windows, I see references to REPORTS_HOME. However, when I log in as the oracle user on the linux side, no such environment variable seems to exist. Is it safe to simply export this in .bashrc or does this reside in a configuration file somewhere? The document does not address where to find this variable.
josemoreira
so i could wrote a backend that uses oci directly but that takes a lot of time
so im vonverting all lob's to varchar(4000) for now
sytse
well, oracle definitely is more powerful in some respects than postgres.. but you do really have to be an expert to get all that out of oracle, and postgres has some advantages, too (mainly server maintenance simplicity and some really cool types I think)
josemoreira
i undertstand oracle is built the way it it because its on a whole different league on databases
sytse
oh man.. yeah, I'd love to have something like postgres TOAST in oracle, those 'text' and 'bytea' types are almost too good to be true
josemoreira
meaning its for time 500 customers with petabyte databases
Ahroun
er, sorry -- REPORTS_PATH, not REPORTS_HOME.
josemoreira
yes
oracle could have a heavier TEXT type
similar to other databases
because php returns LOB's as streams
php ~ sql statements
sytse
josemoreira: yeah, definitely, for just a simple webapp with 1 GB of data it doesn't make much sense to choose oracle over postgres IMHO
josemoreira
yes
« prev 1 2 next »