logs archiveIRC Archive / Freenode / #oracle / 2010 / May / 24 / 1
zasz
RJarett:
alive?
RJarett
hi
zasz
NO
spheniscus
afternoon all
anyone suceeded in getting the database diff generation script in sql developer to work?
Ramen
whats the difference between table owner/tablespace/schema?
RJarett
schema is a user
a schema/user can hold many objects
many types
a tablespace is a unit of storage
tablespaces can contain multiple datafiles which are real files on the OS (or pseudo files in raw devices)
Ramen
nice thanks
do you have any good oracle books u'd recommend?
RJarett
beginners guide to oracle
Ramen
does that cover up to 11g or are all the version more or less the same?
         

Galaxor
I'm trying to create a trigger. I got "Success with compilation error" and no indication what the error might be.
RJarett
ramen
http://www.amazon.com/gp/product/0071598758?ie=UTF8&tag=oraclebooks03&linkCode=as2&camp=1789&creative=9325&creativeASIN=0071598758
the complete reference is good too if you arent braindead
Galaxor: set serveroutput on
show errors
Galaxor
RJarrett: What is this set serveroutput option? I'm using tora to connect to an Oracle database, but I'm not the server admin. Is this something I can do?
RJarrett: I found the problem. I'm trying to move the value of a sequence up by some amount. Oracle seems to be unfriendly to my attempted method.
RJarrett: I was trying to alter sequence blah_seq increment by variablename;
RJarrett: Is there some other way to do this? I guess I could loop the right number of times, selecting nextval from the sequence...
RJarrett: EXECUTE IMMEDIATE. Aha.
RJarett
i dont support tora
if you ask a question expect a sqlplus answer
or you alter sequence
and you set it to the min value you want
like the docs say to do
Galaxor
RJarrett: The set serveroutput command is a sqlplus thing? Okay. Sorry, I'm new to oracle stuff. I thought it was a server option.
RJarett: Which docs say how to do this? Sorry, like I say, I'm pretty new to this. I've been fumbling my way through by googling and finding various blog posts.
RJarett: I'm trying to set this up so that if you insert a row, and set the column to NULL, then it'll pick the next value from the sequence. But if you don't set it to NULL, it'll change the sequence so that the next value will be above the one you just inserted.
RJarett
yeah nice job reinventing the wheel there brainiac
http://www.lmgtfy.com/?q=oracle+autonumber+trigger
somehow i bet you are making it overcomplex
dont allow people to insert into the id field at all and only let the trigger handle it
your method of altering the sequence makes your app entirely non threadable and non parallizable, and low volume.
You risk much more problems and chances of dup value
and if your app calling to this is on something like a connection pool, youre totally screwed
Galaxor
Aha. Yeah, I'm coming from a mysql background, where you can accomplish what I want just by putting "auto_increment" in the table definition. I figured Oracle could handle that type of behavior too, but I was getting confused in all the different blog posts I was reading.
RJarett
forget everything you learned about mysql
Galaxor
Thanks for those search terms, though. "autonumber" was not a word I would've though of on my own.
RJarett
mysql makes people stupid
enumeration datatype
Galaxor
Well, it makes people have different expectations, that's for sure.
RJarett
or auto increment are too complex of words for mysql users
so autonumber is simple
Galaxor
I kind of don't understand what your goals are. You're being very helpful, but insulting me at the same time. What does this mean? How should I respond? Thanks for the helpful tips, though.
RJarett
lets say user1 inserts 5 into the table via sequence commits, user 2 inserts 6 doesnt commit yet, user 3 inserts null trigger fires alters the sequence sequence changes to 6, user 2 commits, user 3 queries the sequence and gets 6 commits
mean you need to learn how to think
Your alter the seq on null is really really bad
really braindead
its y2k mentality
sequences exist so you dont have issues like that
so you cant get dups
sequence abuse, and changes will force you to
Galaxor
Can you recommend websites that are good tutorials on oracle? Or do I have to go take a $1200 course.
RJarett
www.google.com
there is so much information online its crazy
Galaxor
In that case, can you recommend some good keywords?
RJarett
you have full manuals
oracle tutorials
thatll get you millions
start reading
Galaxor
Yeah, the "information" I found was telling me to alter the sequence in the trigger. That's why I was asking if you knew any *GOOD* ones.
For example, aside from your obvious genetic superiority to me in the brain department, was there any particular source of information that you relied upon when learning oracle?
RJarett
no the information is not
bad searches and bad methodology are to blame
you asked a specific question i bet, to a poorly planned solution
         

Galaxor
Or did you just sit there and use your incredible powers of thinking to deduce what the entire behavior of Oracle was?
RJarett
i was given hundreds of oracle books to read in a few weeks
and i read
Galaxor
Did you find any particular ones of those books to be good?
RJarett
Galaxor
Okay, thanks. That will be my starting point.
BTW, are you like 14 years old or something?
RJarett
nope
Xgc
Galaxor: The primary mistake is in attempting to control the next value. Don't do that. Design your application to treat the sequence values are unique and nothing else. Don't assume order. Don't assume there are no holes.
RJarett
Just tired of idiots who dont think properly
Xgc
s/are/as/
Galaxor: Try to ignore the insults. MySQL is a bit offtopic here and tends to trigger a guttural grunt, not generally an intelligent response.
Galaxor
xgc: Apparently! Yeesh.
Xgc
Galaxor: That's not to say those making that type of response aren't intelligent. They just can't help the reflex.
We all do it from time to time.
Galaxor
xgc: In the past, oracle has sort of been that way for me. I've dealt with a lot of oracle professionals who don't know what they're talking about, so I ended up unconsciously blaming the technology and not those individuals.
xgc: Which is why I never got around to learning Oracle properly until now.
xgc: But I'm trying to get over it. Tech rivalries can be so inconvenient.
RJarett
You both are wrong. We just hate stupid people, because you cause us more work.
Especially 'developers'
Many of us started before google/altavista when there was no free and easy oracle download. We have to work our ass off to learn it.
We expect the same dedication now.
Xgc
I find it really detracts from the positive and correct comments.
RJarett
I dont care
Xgc
Galaxor: I was speaking to you, of course.
RJarett
These people need to learn to suck it up and take it, since its better coming from peers than from the boss or client after they totally ruin a project with bad methodology
Xgc
It's easy to be rude or impolite on irc.
RJarett
Im this way in person too
you should see me badmouth the brainless drolls here who talk about fantasy football. Barbies for the new metro generation
dogmeat
how can i describe materalized view? tried desc FOO.OVERALL_POSTABLE_RANK; but said, "ORA-04043: object FOO.OVERALL_POSTABLE_RANK does not exist', however select owner, object_name, object_type from dba_objects where object_name='OVERALL_POSTABLE_RANK'; lists FOO OVERALL_POSTABLE_RANK MATERIALIZED VIEW
RJarett
SELECT DBMS_METADATA.GET_DDL('MATERIALIZED_VIEW', 'YOURVMVIEW') from dual;
dogmeat
http://pastebin.com/inKC9L5d
RJarett
are you running it as FOO?
dude, read
seriously wtf
it was plain as day in front of you and you cant copy and paste.
you forgot the _
avaia
hello_
dogmeat
calm down
i tried the command a couple of times
with the _
RJarett
what db version?
dogmeat
'Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production'
the object is owned by 'FOO', was another error related to that.
RJarett
ahh. upgrade
dogmeat
http://pastebin.com/eCddVuRW
in this paste bin, it shows the schema, "SYS". how do i get it to report for schema "FOO"?
RJarett
dont run anything as / as sysdba or as sys
log in to the real user
dogmeat
http://pastebin.com/Nj9bwNuK
RJarett
you can specify schema in get_ddl
look up the command
dogmeat
http://pastebin.com/HbFyPenD
RJarett
stop using sysdba
zasz
wup rj
dogmeat
fine. ill drop the mtv and try to recreate it, e.g. not as sysdba
;-)
how can i list the mtv's for the current schema?
ech0s7
hi
are there any OpenSource or Freeware tools to generate an ER diagram from an existing database ?
« prev next »