473,657 Members | 2,505 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to disabled all constraints when importing data (urgent)

Hi:

I am not sure whether somebody can sort it out for me.

I am doing data transfer from one oracle database to another. Both of
them has the same structure (like same tables etc).the only thing i
need to do is data transfering.

i designed a vb program to do this, What i am worrying is when I run
this program it might fire some constrants. Anybody can give me some
ideas on how to avoid these constraints when data import?? I have to
disable all the constrainsts first or i can do it in another way?

Millions thanks in advance!
Paul
Jul 19 '05 #1
2 10717
"Paul" <ji***********@ yahoo.com> wrote in
news:f2******** *************** ***@posting.goo gle.com...
Hi:

I am not sure whether somebody can sort it out for me.

I am doing data transfer from one oracle database to another. Both of them has the same structure (like same tables etc).the only thing i
need to do is data transfering.

i designed a vb program to do this, What i am worrying is when I run
this program it might fire some constrants. Anybody can give me some
ideas on how to avoid these constraints when data import?? I have to
disable all the constrainsts first or i can do it in another way?

Millions thanks in advance!
Paul


Hi Paul,

are you really sure using VB is the right thing
for this task? It smells like imp / exp would be
the better way. Anyway: you can defer the column
constraints with the 'set constraints all deferred'
statement before starting the data insert. Then the
constraints will come into play at commit time.
If the constraints aren't deferable, you have to use
some pl/sql to loop through user_constraint s to get
the names and issue dynamic sql statements which disable
those constraints.

hth,
Guido
Jul 19 '05 #2
"Guido Konsolke" <Gu************ @triaton.com> wrote in message news:<10******* *******@news.th yssen.com>...
"Paul" <ji***********@ yahoo.com> wrote in
news:f2******** *************** ***@posting.goo gle.com...
Hi:

I am not sure whether somebody can sort it out for me.

I am doing data transfer from one oracle database to another. Both

of
them has the same structure (like same tables etc).the only thing i
need to do is data transfering.

i designed a vb program to do this, What i am worrying is when I run
this program it might fire some constrants. Anybody can give me some
ideas on how to avoid these constraints when data import?? I have to
disable all the constrainsts first or i can do it in another way?

Millions thanks in advance!
Paul


Hi Paul,

are you really sure using VB is the right thing
for this task? It smells like imp / exp would be
the better way. Anyway: you can defer the column
constraints with the 'set constraints all deferred'
statement before starting the data insert. Then the
constraints will come into play at commit time.
If the constraints aren't deferable, you have to use
some pl/sql to loop through user_constraint s to get
the names and issue dynamic sql statements which disable
those constraints.

hth,
Guido


Paul,
also check the table USER_CONS_COLUM NS

Frans H.
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
5290
by: John Towell | last post by:
------=_NextPart_000_0008_01C360DD.C2475700 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit We are trying to load a set of data using Hibernate (O/R mapping tool). Hibernate creates foreign key constraints when it is creating our DB (mysql 4.0.14). The process for loading data requires us to break these constraints at certain points, however they will all be satisfied at the end of the transaction.
2
5755
by: DW | last post by:
Greetings: I have to do a one-off forceful change of some data in a database. I need to disable some FK constraints, make the data change, and then re-enable the constraints. My process will be: ALTER TABLE TABLE1 NOCHECK CONSTRAINT FK_TABLE1_TABLE2 UPDATE TABLE1 SET COLUMN1=2 WHERE COLUMN2='Problem row'
4
4381
by: rafeekb | last post by:
Hello All, Is there any way to export data in the IXF version 1 format from a DB2 v8.2 database ? The problem I am facing is to get the data from a v8.2 database which produces a version 2 IXF and import it on to a v5.2 database which knows only about version 1 IXF format. Any suggestions, help is much appreciated.
2
2658
by: Janning Vygen | last post by:
hi PGurus, i searched the archives and read the docs, because this problem shouldn't be new. But i really don't know what to search for. i am populating a database (v7.4.1) with COPY. Some triggers in the db schema fire on inserts and do some additional data manipulations, which i dont want to take place by running COPY because my data don't need those additional manipulation. Therefor and for performance reasons, i disable all...
6
3727
by: =?Utf-8?B?bGpsZXZlbmQy?= | last post by:
I want to specify a custom color for disabled text that is used by a class that inherits from ToolStripProfessionalRenderer. The code would look something like this: Public Class MyRenderer Inherits Windows.Forms.ToolStripProfessionalRenderer Protected Overrides Sub OnRenderItemText(ByVal e As System.Windows.Forms.ToolStripItemTextRenderEventArgs) If (Not e.Item.Enabled) Then e.TextColor = Color.Red
0
3000
by: Anish G | last post by:
Hi All, I am getting the below given error while running my application in live server. In my local machine, its working fine. Please help me as it is very urgent for me. Exception from HRESULT: 0x800A03EC Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details:...
5
6839
by: yeoj13 | last post by:
Hello, I have a db2load script I'm using to populate a large table. Ideally, my target table is required to have "Not Null" constraints on a number of different columns. I've noticed a huge performance hit when I load the target table with "Not Null" constraints as compared to loading a target table without the constraints.
2
260
by: Paul | last post by:
Hi: I am not sure whether somebody can sort it out for me. I am doing data transfer from one oracle database to another. Both of them has the same structure (like same tables etc).the only thing i need to do is data transfering. i designed a vb program to do this, What i am worrying is when I run this program it might fire some constrants. Anybody can give me some
4
21969
by: Bobby Edward | last post by:
I have an xsd dataset. I created a simple query called GetDataByUserId. I can preview the data fine! I created a very simple BLL function that calls it and returns a datatable. When I run the code I get.... ======================= Server Error in '/MyCompanyMyProject' Application.
0
8420
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8842
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8740
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8516
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8617
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7353
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.