473,378 Members | 1,104 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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 10680
"Paul" <ji***********@yahoo.com> wrote in
news:f2**************************@posting.google.c om...
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_constraints 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.thyssen.com>...
"Paul" <ji***********@yahoo.com> wrote in
news:f2**************************@posting.google.c om...
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_constraints to get
the names and issue dynamic sql statements which disable
those constraints.

hth,
Guido


Paul,
also check the table USER_CONS_COLUMNS

Frans H.
Jul 19 '05 #3

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

Similar topics

0
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)....
2
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...
4
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...
2
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...
6
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...
0
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...
5
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 ...
2
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...
4
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.