oracle11g

What is the easiest way to transfer Oracle database from one PC to another?

旧街凉风 提交于 2019-12-05 00:29:08
问题 i want to transfer my oracle database to another PC. What is the easiest way to do it? Are there any GUI tools to do it? 回答1: APC's answer is the way to go for a logical transfer. If you're asking because you just want a one-time transfer to another PC then: install the same version of Oracle on the second PC create the same directory structure for the database files on the second PC copy the database files (tablespace files, control files, redo logs) to the second PC (with the database shut

How to set default value for column of new created table from select statement in 11g

倾然丶 夕夏残阳落幕 提交于 2019-12-04 23:56:34
I create a table in Oracle 11g with the default value for one of the columns. Syntax is: create table xyz(emp number,ename varchar2(100),salary number default 0); This created successfully. For some reasons I need to create another table with same old table structure and data. So I created a new table with name abc as create table abc as select * from xyz. Here "abc" created successfully with same structure and data as old table xyz . But for the column "salary" in old table "xyz" default value was set to "0". But in the newly created table "abc" the default value is not set. This is all in

increment function in plsql

好久不见. 提交于 2019-12-04 23:54:56
In most programming languages you have a fast way to write an increment for a variable like the following examples: inc(variableName); variableName++; variableName += 1; Which ways are there in Oracle Pl/Sql to do this instead of using the following: variableName := variableName + 1; The operators are listed in the documentation . There is no equivalent of ++ or += . I'm afraid you have to do it the long way. You could write your own inc() function but that would probably make your code less readable to others as it would be non-standard. 来源: https://stackoverflow.com/questions/28606855

How to add interval partitions to an existing table in Oracle

夙愿已清 提交于 2019-12-04 22:48:57
I have a scenarios like ,I need to create interval partitions(monthly) to an existing table in Oracle which has no partitions .please suggest me how to proceed. I tried with below alter table RSST_TP_ORDERINVOICED_NETREV_F set interval(NUMTOYMINTERVAL(1,'MONTH')); TABLESPACE "RSST_DATA" PARTITION BY RANGE ( "DATE_SK" ) INTERVAL ( NUMTOYMINTERVAL(1,'MONTH') ) ( PARTITION "P_FIRST" VALUES LESS THAN (TO_DATE(' 2000-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) TABLESPACE "RSST_DATA" ) You cannot partition an existing non-partitioned table. In general, you'll need to create

no ocijdbc12 in java.library.path

不想你离开。 提交于 2019-12-04 22:27:44
I am trying to make a connection to oracle through java program using OCI driver. Following is the configuration. Windows 7, 32 bit. JDK 1.7 Oracle client 11g R2. ojdbc7.jar in the class path of my standalone application. But I am getting following exception: Exception in thread 'main' java.lang.UnsatisfiedLinkError: no ocijdbc12 in java.library.path I tried connection using thin driver. For thin driver it is Connection Succeeded. I googled but was not able to figure out the solution. Please help me solve this problem. I had the same issue, it was just the external folder of the my *.ora files

Current version of data in database has changed since user initiated update process

假如想象 提交于 2019-12-04 21:40:59
I have a Master Detail form in my Oracle APEX application. When I am trying to update data in this form, I am getting below error. Current version of data in database has changed since user initiated update process. current row version identifier = "26D0923D8A5144D6F483C2B9815D07D3" application row version identifier = "1749BCD159359424E1EE00AC1C3E3FCB" (Row 1) I have cleared browser cache and try to update. But it not worked. How can I solve this? I have experienced similar problem where my detail records set has timestamp fields. By default master detail wizard creates the timestamp fields

ORACLE server session terminated by fatal error

落花浮王杯 提交于 2019-12-04 21:14:29
I have edited a Trigger and try to save. then i got below error. Error: ORA-00603: ORACLE server session terminated by fatal error ORA-00600: internal error code, arguments: [kqlidchg1], [], [], [], [], [], [], [], [], [], [], [] ORA-00604: error occurred at recursive SQL level 1 ORA-00001: unique constraint (SYS.I_PLSCOPE_SIG_IDENTIFIER$) violated i can't save my trigger with modifications. how can i solve this ? ORA-00600 is a generic Oracle message indicating an unhandled side-effect of your action i.e. an Oracle bug. The precise reason for the bug may be dependent on the database version,

What is the easiest way to make a column READONLY in Oracle?

吃可爱长大的小学妹 提交于 2019-12-04 19:52:33
问题 We have one of those weird cryptic data corruption bugs that pops up every few weeks and no one knows why. So far, it appears that the primary key on a table is spontaneously changing, so other rows that point to it are now messed up. Though I'm still looking for the root cause of this (it's impossible to repro), I would like some sort of temporary hack to prevent a column value from ever changing. Here's the table schema: CREATE TABLE TPM_INITIATIVES ( INITIATIVEID NUMBER NOT NULL, NAME

Oracle aggregation function to allocate amount

江枫思渺然 提交于 2019-12-04 19:43:10
问题 Suppose I have 2 tables T1 and T2 as follows T1 : bag_id bag_type capacity ------|--------|-------- 1 A 500 2 A 300 3 A 100 4 B 200 5 B 100 T2 : item_type item_amount ---------|----------- A 850 B 300 Each record in table T1 represents a bag and its capacity, here I have 5 bags. I want to write an SQL that allocate items in table T2 into each bag with the same type, i.e. the result should be like this bag_id bag_type capacity allocated_amount ------|--------|--------|---------------- 1 A 500

Connect to an Oracle database

梦想的初衷 提交于 2019-12-04 19:25:24
问题 I'm trying to connect to an Oracle database but when the the code is executing the line: con = new OracleConnection(oradb); It gives this error. "The program can't start because oraons.dll is missing from your computer. Try reinstalling the program to fix this problem." I installed the ODP for .net on my computer already from the following site http://www.oracle.com/technetwork/topics/dotnet/index-085163.html and referenced the Oracle.DataAccess. I also checked the folder that was installed