Just deep contact with Oracle soon (the Oracle knowledge Learned at the university and at the beginning of the job is only fur), because the previous use of SQL Server for nearly two years, is relatively familiar to SQL Server, in comparison, Oracle is really painful, scripting laborious, Error debugging laborious, eh, all sorts of laborious.
It is estimated that the gods are dismissive, even despised, and will say how good Oracle is. I'm just saying that Oracle is not as friendly as SQL Server to developers, and I don't mention performance.
With the recent project being migrated from SQL Server to Oracle, there are many scripting issues that need to be adjusted. One of the strange mistakes, tossing very depressed.
The problem is roughly the same.
Find out where I am in the department and possibly do other appropriate processing.
?
1 |
select department from users where username = ‘eyuan‘ |
and find out what my department is up to.
?
1 2 |
select taskname from tasks where department in ( "+myDepartments+" ) |
This time on the error, always prompt ora-03113 errors, and then confirm the prompt ora-03114.
After looking for information on the Internet, most of the experience is network problems, need to configure the network connection parameters, etc., but the problem is that the isolated department may be ' a ', ' B ', ' C ', ' d ', ' e ', and then I delete a few and then no problem, feeling and SQL statements are related, rather than network problems.
Finally found the reason, in fact, the table design, SQL statements, network connection of the results of the interaction.
I looked up the table structure and found that I defined n many useless indexes and then deleted them by the original ' A ', ' B ' added to ' a ', ' B ', ' C ', ' d ', but to ' e ', still wrong.
Later, the first query Department's statement was consolidated into the second Query task statement, and then OK.
The original Oracle's in statement has some mystery about the handling of string list variables.
Therefore, for those queries that are not derived from the table, they can be handled by select ' A ' from dual Union select ' B ' from dual.
Alas, Oracle has not reported the query time-out problem, the direct report network connection, not enough meticulous, for the novice, confirm more painful.