oracle11g

How to get rid of NUL characters in Oracle database?

大憨熊 提交于 2019-12-05 13:46:14
The database : I have a Oracle11g database with a table that contains about 10 million rows and has about 40 columns. The data originates from punched card age and has been transformed from one Oracle version to the next several times. This is a live production database and in somewhat continuous use. But it's not so critical (especially during night time) that I could not strain it with expensive queries and updates. So that's ok. edit: Charset is AL32UTF8. The problem : I noticed that some columns contain NUL characters. I have found values that consist of 1-4 NUL characters, but there can

Why am I getting “format error: Property is 'v$session.program'” connecting to Oracle?

牧云@^-^@ 提交于 2019-12-05 13:31:42
I'm connecting to an Oracle 11g database from a Java application. I'm getting the following exception: Caused by: java.sql.SQLException: Connection property: format error: Property is 'v$session.program' and value is '<My Maven application's name>' at oracle.jdbc.driver.T4CConnection.validateConnectionProperties(T4CConnection.java:4540) at oracle.jdbc.driver.PhysicalConnection.readConnectionProperties(PhysicalConnection.java:2345) at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:517) at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:228) at oracle.jdbc.driver

Table Name with more than 30 characters

被刻印的时光 ゝ 提交于 2019-12-05 12:42:51
I have a table in a MySQL database. The name of the table is more than 30 characters long and I want to make the same table in Oracle 11g, but Oracle only allows tables with a maximum of 30 characters in the name. I can't change the name of the table to make it less than 30 charachters, because the system is based on these tables, and it will cost me a lot if I change the name, so changing the table name is not the answer I am looking for. There is a table called user_tables , and when I describe the table it says the the table_name field has a datatype varchar2(30) , so I tried to alter the

Oracle not available ora-01034

送分小仙女□ 提交于 2019-12-05 12:30:10
I am trying to create to connect with oracle sqlplus. When I login with: User: sys as sysdba Pass: It says Connected to an idle instance. And when I try to create a table, it gives the error ORA-01034: Oracle not available Process ID: 0 Session ID: 0 Serial number: 0 Why is it not creating the table? First - and most importantly: Only use the SYS account for DBA work. Never use it for "regular" work (e.g. creating tables) - use a dedicated regular user account for that. Secondly: " connected to an idle instance " means Oracle was not started. So as you are already connected as sysdba (again:

Should I partition/subpartition my table?

不羁岁月 提交于 2019-12-05 11:38:14
Case The system has dispositives , basically formed by id, type, name . I may have N dispositives . I have a table to store a log of all dispositives . This is the biggest table in the system. (Now counting 100 mi records) The log table has: id_dispositive, date, status . Problem Obviously this huge data it's causing performance issues. I must store at least two months log values.. Today I have this dispositives by type : TYPE COUNT --------------- 1 78956 2 125161 3 13213 4 6112 5 25426 6 12314 7 1241 8 622 I also have some business logic to feed this log table. Anyways, here is my thoughts:

How to call Oracle function, with return value using LINQ to Entities?

拥有回忆 提交于 2019-12-05 10:33:40
I'm working on an application which accesses data from an Oracle 11g database. I'm using EF4 and data is accessed using LINQ. I have come across a scenario where I need to call a function stored in a package. This function also has a return value. I have added this function to the entity data model but am unable to perform "Add Function Import" on it. Hence I'm unable to access it using LINQ. How can I call this function and also get it's return value? I asked this question a while back, but have not got any answer for it yet. Anyways, I'm updating it with some details so that it becomes

Oracle direct-load INSERTs through JDBC?

折月煮酒 提交于 2019-12-05 10:23:04
Is it possible to do direct-load INSERTs in Oracle through JDBC? I currently use batched prepared statements (through Spring JDBC), is there any way to make these bypass the redo logs on a NOLOGGING table? This is with Oracle 11g. There is an APPEND_VALUES hint introduced in 11gR2 for direct path inserts with INSERT...VALUES. Don't have an 11gR2 instance available to test whether it works with JDBC batch inserts . It is worth a try though. direct path inserts are only possible in a insert into x as select * from y scenario. This can be done using jdbc, no problem. This can not be done with

difference between “tab” table and all_tables in oracle

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-05 09:55:49
what tables are returned by using (in oracle) select * from tab and select * from all_tables I would like to know the difference between two. tab is an ancient data dictionary table that should never be used. It exists solely to provide backwards compatibility for scripts that were written potentially decades ago. tab does not get updated as new object types and new features get added. all_tables gives you information about all the tables that you have access to. tab gives you information about tables, views, and synonyms that you own (making it more similar to views like user_tables , user

Fastest way to insert a million rows in Oracle

早过忘川 提交于 2019-12-05 09:50:51
How can I insert more than a million rows in Oracle in optimal way for the following procdeure? It hangs if I increase FOR loop to a million rows. create or replace procedure inst_prc1 as xssn number; xcount number; l_start Number; l_end Number; cursor c1 is select max(ssn)S1 from dtr_debtors1; Begin l_start := DBMS_UTILITY.GET_TIME; FOR I IN 1..10000 LOOP For C1_REC IN C1 Loop insert into dtr_debtors1(SSN) values (C1_REC.S1+1); End loop; END LOOP; commit; l_end := DBMS_UTILITY.GET_TIME; DBMS_OUTPUT.PUT_LINE('The Procedure Start Time is '||l_start); DBMS_OUTPUT.PUT_LINE('The Procedure End Time

How can I easily analyze an Oracle package's execution for performance issues?

↘锁芯ラ 提交于 2019-12-05 09:45:51
I have a pl/sql package in an 11g R2 DB that has a fair number of related procedures & functions. I execute a top level function and it does a whole lot of stuff. It is currently processing < 10 rows per second. I would like to improve the performance, but I am not sure which of the routines to focus on. This seems like a good job for Oracle's "PL/SQL hierarchical profiler (DBMS_HPROF)" Being the lazy person that I am I was hoping that either SQLDeveloper v3.2.20.09 or Enterprise Manager would be able do what I want with a point & click interface. I cannot find this. Is there an "easy" way to