Tag Info

New answers tagged




There are 2 ways of doing this. Edit your shell dot file (.profile, .bash_profile etc) to add: export EDITOR=gedit Or, you can create the sqlplus equivalent of a Unix dot file. Create a file called glogin.sql and place it in $ORACLE_HOME/sqlplus/admin, then add this to it: DEFINE _EDITOR=gedit


You should be able to do this using the either glogin.sql or login.sql. The former is run whenever anyone logs into SQL*Plus and the latter is specific to a user. Im not currently in a position to install it myself to try out but this link to the Oracle docs should help. Configuring SQL*Plus


To answer your question if you can migrate a linux database to a higher oracle release on a windows platform: Yes you can. There are a few things to keep in mind... Linux and windows use little endian, unix uses big endian -- basically it depends on the CPU not so much on the OS. If you want to minimize downtime and restore the database on the windows ...


You say Then we gather statistics on the table (and implicitly on the index): but statistics on indexes aren't gathered unless you do this: dbms_stats.gather_table_stats(null,'PART',cascade=>true); What appears to be happening is index statistics are not being gathered (or not gathered correctly) on; if specifying cascade=>true ...


Grouping a Primary Key is wasted time, since you get groups of one record only. Hence, the SUM function is unnecessary, you just need to get the column. But, the real problem you are trying to solve, is a bit unclear. If you ever have 2 tables in a database, with EXACTLY the same Primary Key, there is something wrong. Obviously, they should be 1 table ...


If you have a primary key, you don't have duplicate rows. In Oracle, you do multi-table UPDATEs by using MERGE, and not UPDATE, because that is inefficient. merge into table1 using (select col1, col2, col3, col4, sum(val2) sum_val2 from table2 group by col1, col2, col3, col4) table2 on (table1.col1 = table2.col1 and table1.col2 = table2.col2 and ...

Top 50 recent answers are included