Easy to truncate tables and load to server again?

I have 125 tables to work on. I  developed proc to  disable and enable constraints and triggers. What I want to do is create a SSIS package which pull all the tables and disable triggers/constraint before load and  enable triggers/constraint
after load and truncate all the previous tables. I am trying to find which way is easy and quicker way to do this requirements?

Just run this proc from the package as Execute SQL Task. One would be to disable, another to enable.
Arthur My Blog

Similar Messages

  • Truncate table and materialized view log

    I user oracle 10 R2
    I have a table and on that table a materialized view log.
    I execute in a pl/sql procedure:
    1) execute immediate('drop materialized view log on tab1');
    then:
    2) execute immediate('truncate table tab1');
    3) Now I insert a lot of records in tab1
    4) execute immediate('create materialized view log on tab1 WITH rowid INCLUDING NEW VALUES');
    When I create the materialized view log I recieved this message:
    ora32321: refresh fast on tab2 unsupported after detail table truncate
    Why?

    Refresh fast after truncate operation on container table is not supported, regardless the container table is or is not partitioned.
    Perform a refresh complete.
    ORA-32321 :
    Cause:     A detail table has been truncated and no materialized view
         supports fast refersh after a detail table has been truncated
    Action:     Use REFRESH COMPLETE. Note: you can determine why your
         materialized view does not support fast refresh after TRUNCATE
         using the DBMS_MVIEW.EXPLAIN_MV() API.

  • Help to save Vector data into a disk and load it back again

    Hi all
    I�m still need help to solve the problem of saving vector data object into disk and load it aging whenever I restart the program. I used one central design for the project. The codes below is most important part of the project.
    I stored data into vector collection through the GUI. My problem is, where should I put the FileOutputStream and ObjectInputStream in the steps below before the data that I stored in the Vector can be save in a disk and also to be loaded back to the vector when I restart program automatically. Pls I need help. Any assistance will be appreciate
    Step1:
    import java.io.*;
    public class UserP implements Serializable{
    private String staffNo;
    private String passW;
    public UserP(String staffNo,String passW){
    this.staffNo= staffNo;
    this.passW= passW;
    public String getUserCode(){
    return staffNo;
    public void setPassW(String passW ){
    //Use to change user password .
    this.passW= passW;
    public String getPassW(){
    return passW;
    Step2:
    import java.util.*;
    import java.io.*;
    public class UserPs implements Serializable{
    private Vector pUsers;
    public UserPS(){
    //initialize collection Object.
    this.pUsers= new Vector(10,10);
    //Helper method.
    private int getIndexFor(String staffNo){
    //Find the position index of User in the collection
    //Only used by the following method(getPUserFor, Add).
    for(int i=0; i< pUsers.size(); i++){
    UserP aUserP= (UserP) pUsers.elementAt(i);
    if(aUserP.getUserCode().equals(staffNo))
    return i;
    return -1;
    public UserP getPUserFor(String staffNo){
    int i= getIndexFor(staffNo);
    if(i < 0)
    return null;
    UserP aUserP= (UserPatient) pUsers.elementAt(i);
    return aUserP;
    public synchronized UserP add(UserP aUserP){
    //add the given prescription object to this collection but only if not already in.
    if(aUserP==null)
    return null;
    if(getIndexFor(aUserP.getUserCode()) >= 0)
    return null;
    pUsers.addElement(aUserP);
    return aUserP;
    public Enumeration list(){
    //returns the enumeration collection of UserP.
    return pUsers.elements();
    Step3:
    import java.io.*;
    //Every UserP has a collection of UserPs,a reference to such
    //collection is held by the instance variable 'userPs'.
    public class Hosp implements Serializable{
    private UserPs userPs;
    public Hosp(){
    userPs= new UserPs();
    public UserPs getUserPs(){
    // return a reference to the UserPatients collection
    return userPs;
    Step4 :
    public interface GateKeeper{
    public String addUserP(String staffNo,String passW);
    public String retrieveAllUserP();
    Step5:
    import java.util.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.*;
    public class GateKeeperImpl implements GateKeeper, Serializable {
    private Hosp hosp;
    public GateKeeperImpl(){ //CONSTRUCTION
    //Make an Hosp.
    hosp= new Hosp();
    public String addUserPs(String staffNo,String passW){
    if(stafNo == null)
    return("The staff is required.");
    if(passW.equals(""))
    return("Password is required.");
    UserP userP= new UserP(staffNo,passW);
    UserPs uPs =hosp.getUserPs();
    UserP collet= uPs.add(userP);
    if(collet == null)
    return ("This user is already in the collection.");
    else
    return ("The user has been added to the collection.");
    public String retrieveAllUserP(){
    UserPs uPs =hosp.getUserPs();
    String allUser="User informations:";
    Enumeration e= uPs.list();
    while(e.hasMoreElements()){
    UserP user =(UserP)e.nextElement();
    allUser = allUser +"\n"+"\n"+"UserCode:"+user.getUserCode()+" "+" "+"UserPassword:"+user.getPassW()+"\n";
    return allUser;
    Step 6:
    import java.util.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.*;
    public class HospFrame1 extends Jframe, implements Serializable {
    private GateKeeperImpl gate= new GateKeeperImpl();
    private JButton jButton1 = new JButton();
    private JButton jButton2 = new JButton();
    private JTextField sSfied = new JTextField();
    private JTextField pWfied = new JTextField();
    //Construct the frame
    public HospFrame1() {
    //The rest of the code comes here
    //The rest of the action method that used to implement also comes here.
    Step 7:
    import java.util.*;
    import java.io.*;
    import javax.swing.UIManager;
    public class Testing{
    public static void main(String[] args) {
    try {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    catch(Exception e) {
    e.printStackTrace();
    HospFrame1 hops=new HospFrame1();
    try
         // to save data to afile
    FileOutputStream sFile = new FileOutputStream("theData.dat");
    ObjectOutputStream oos = new ObjectOutputStream(sFile);
    oos.writeObject(hops);
    oos.close();
    catch (Exception e){
    e.printStackTrace();
    try {
    //to read data from previous save file
    FileInputStream fin = new FileInputStream("theData.dat");
    ObjectInputStream yess = new ObjectInputStream(fin);
    hops =(HospFrame1) yess.readObject();
    yess.close();
    catch(Exception e){
    e.printStackTrace();

    Stop multi-posting and cross-posting your questions.

  • Appraoch for archiving table data from a oracledb and load in archiv server

    Hi,
    I've a requirement where I need to archive and purge old data in datawarehouse.
    The archival strategy will select data from a list of tables and load into files.
    I also need to use sql loader control files to load data from the above files into archival server.
    I want to know which is the better approach to load data into files.
    Should I use utl_file or spool table data into file using select stmts.
    I also have some clob columns in some tables.

    I've doing something like this a couple of months ago. After some performance tests: the fastest way is to create files through UTL_FILE used in procedure with BULK SQL. Another good idea is to create files with Python which operates on text files blazingly. (Use PL/SQL if you need to create that files on server, but if you have to create files on remote machine use something else (Python?))

  • Loading MS Access Table and Data into Oracle

    Hi,
    I have few tables in MS Access. I want to create same layout of tables in Oracle and want to populate data from MS Access tables to Oracle tables.
    Please let me know if there is a way by which I can create tables and load data automatically (thru some option or script)?
    I have Oracle 10g database and its clients.
    Thanks in advance,
    Rajeev.

    You can use Oracle migration workbench
    Loading MS Access Table and Data into Oracle
    It´s very easy to use and good to import
    regards,
    Felipe

  • MDM - Examples needed with Tables and Data

    Hi,
    I am new to MDM. I just loaded the Console and Data Manager and connected to an MDM server. I am able to create a repository and browse in the Data Manager. However, I want to get some Table examples and data that go along with it. I am looking for a step by step guide to create some good tables and load actual data into it using a flat file or XML.
    Any help is greatly appreciated!

    Hi,
    MDM Repository Structure:-
    Table Types in MDM Repository
    1.Only one main Table.(Default name is Products)
    2.Sub Tables
    Lookup Sub tables are just one of the powerful ways that MDM enforces Data integrity in an MDM repository.
    (Parent - Child Relationships)
    3.Object Tables
    It is special type of Lookup Subtables.It includes the images ,Sounds,Videos,Binary objects,Text Blocks,Copy Blocks,Text HTMLs and PDFs.You cannot store any object dirctly to the Repository.Instead ,each object is defined or imported into the repository once then linked to a main or subtable field as a lookup into the object table of that type.
    [Object Tables eliminate redunt information ,since each object appears only once in the MDM repository even if it is linked in multiple records.]
    4.Special Tables
    Special Tables include Image variants,Masks,Families,Relationships,Work Flows,Named Searchs,Data Groups and Validation Group Tables.
    [Data Groups and Validation Group Tables are does not exist in the MDM Repository.]
    5.System Tables
    System Table appear under the Admin Node in the console Hierarchy include roles,Users,Connections,Change Tracking,Remote Systems,Portas,Links..etc.
    Creating Look up table.
    1.Create Lookup Table(Type as Hierarchy,Taxonomy,Qualifier)
    2.Add a Field in Main table
    3.Set the type(Hierarchy,taxonomy,Qualifier lookup)
    4.You need to enter or map the lookup table name and field.
    5.When ever u add new record in the Lookuptable,You can able to use that lookup data in the Main Table Record creation.
    I donot have software with me ,otherwise i would have given screenshot to u.
    For further info, U can refer Console reference Guide.
    Best Regards
    Devaraj PK

  • Provide truncate table permission for a user

    Please let me know the best possible way to provide truncate table permission to a SQL Server Database user (ddl_admin role cannot be granted to the user in my case)

    Grant CONTROL permissions on table, user will be able to truncate table.
    GRANT CONTROL ON user_table TO User
    http://www.sqlservercentral.com/blogs/steve_jones/2011/03/07/sql-server-truncate-table-permissions/
    Other ways check this:
    Grant Truncate Table Permissions in SQL Server without ALTER Table  
    http://www.mssqltips.com/sqlservertip/2583/grant-truncate-table-permissions-in-sql-server-without-alter-table/
    The ALTER permission provides the access required to alter the schema of a tables, this includes truncating the data in the table.
    http://www.jasonstrate.com/2013/05/security-questions-truncate-table-permissions/

  • Saving and loading control properties

    Quick question,
    Does anyone know of an "easy" way to save and load pre-defined appearences or "skins" for controls and indicators?
    I had hoped LV 8.0 did this in the property explorer, but having just checked it out, it doesn't seem to.
    I basically want to be able to define the appearance of indicators (XY
    graphs particularly) based on calling up either ini files or otherwise.
    I want to avoid writing a cumbersome cluster-based read and write
    routine for each and every type of control (Split into classes of
    course, but still.....)
    Shane.
    Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)

    Thanks tst
    I will add the link to my labview folder.  The property saver will be a useful feature and would be a great method to have added to all gi objects, like Gobject->SaveState(file) and Gobject->LoadState(File), this could be polymorphic and also include versioning information and even allow for some metadata about the object.  Here you could make skins of a vi and it would save all the objects in a standard form.
    Paul
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • How to find Fragmentation of tables and tablespaces in oracle 8i

    Hi,
    How can i measure the fragmentation of Tables and Tablespaces in oracle 8i.
    Do any one have any handy script to find the same.
    What are the attributes to be determined to do health checkup of a database.

    how many such empty blocks are there in the table and of what size.Again Tom Kyte reference :
    http://asktom.oracle.com/pls/ask/f?p=4950:8:7760471022221195640::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:231414051079
    For tablespace, fragmentation is the regular termAbout tablespace, the link from post above can help.
    Nicolas.

  • Loop Through Excel Files and Load into SQL Server Table

    I'm following the example here.
    https://www.youtube.com/watch?v=_B83CPqX-N4
    I'm pretty sure I did all the steps, but for some reason my project is not running.  I'm thinking there is a 32-bit or 64-bit issue lurking in here somewhere.
    Here's my error message.
    SSIS package "C:\Users\Ryan\Documents\Visual Studio 2010\Projects\Loop through Multiple Excel sheets and load them into a SQL Table\Integration Services Project1\Package.dtsx" starting.
    Information: 0x4004300A at Data Flow Task, SSIS.Pipeline: Validation phase is beginning.
    Error: 0xC0209303 at Package, Connection manager "Excel Connection Manager": The requested OLE DB provider Microsoft.ACE.OLEDB.12.0 is not registered. If the 64-bit driver is not installed, run the package in 32-bit mode. Error code: 0x00000000.
    An OLE DB record is available.  Source: "Microsoft OLE DB Service Components"  Hresult: 0x80040154  Description: "Class not registered".
    Error: 0xC001002B at Package, Connection manager "Excel Connection Manager": The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.
    For more information, see http://go.microsoft.com/fwlink/?LinkId=219816
    Error: 0xC020801C at Data Flow Task, Excel Source [2]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0209303. 
    There may be error messages posted before this with more information on why the AcquireConnection method call failed.
    Error: 0xC0047017 at Data Flow Task, SSIS.Pipeline: Excel Source failed validation and returned error code 0xC020801C.
    Error: 0xC004700C at Data Flow Task, SSIS.Pipeline: One or more component failed validation.
    Error: 0xC0024107 at Data Flow Task: There were errors during task validation.
    SSIS package "C:\Users\Ryan\Documents\Visual Studio 2010\Projects\Loop through Multiple Excel sheets and load them into a SQL Table\Integration Services Project1\Package.dtsx" finished: Failure.
    The program '[5392] DtsDebugHost.exe: DTS' has exited with code 0 (0x0).
    I have 32-bit Excel and 64-bit SQL Server.  Is that the issue?  Can someone tell me what's wrong here?
    Thanks!!
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    Sa-weeettttttt!!  Thanks.  I figured that's what it was.  For the benefit of others, this link shows you exactly how to make the modification recommended above.
    http://help.pragmaticworks.com/dtsxchange/scr/FAQ%20-%20How%20to%20run%20SSIS%20Packages%20using%2032bit%20drivers%20on%2064bit%20machine.htm
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

  • Full Load: Error while executing :TRUNCATE TABLE: S_ETL_PARAM

    Hi All,
    We are using Bi Apps 7.9.6.1. Full Load was running fine. But Now we are facing a problem with truncating a table "S_ETL_PARAM".
    I have restart informatica Server And also DAC Srever. But still I am getting the same in the DAC Log as, *"NOMALY INFO::: Error while executing : TRUNCATE TABLE:S_ETL_PARAM*
    *MESSAGE:::com.siebel.etl.database.IllegalSQLQueryException: DBConnection_OLTP:SIEBTRUN ('siebel.S_ETL_PARAM')*
    *Values :*
    *Null Map*
    *EXCEPTION CLASS::: java.lang.Exception"*
    Any Suggestion.....
    Thanks in Advance,
    Deepak

    are you trying to run incremental load when you get this truncate error? can you re-run full load and see that still runs ok? pls also check your DW side database logs like alert lor any DB level issue. such errors do not throw friendly messages in DAC/Informatica side.

  • SQL Server 2012 Management Studio:In the Database, how to print out or export the old 3 dbo Tables that were created manually and they have a relationship for 1 Parent table and 2 Child tables?How to handle this relationship in creating a new XML Schema?

    Hi all,
    Long time ago, I manually created a Database (APGriMMRP) and 3 Tables (dbo.Table_1_XYcoordinates, dbo.Table_2_Soil, and dbo.Table_3_Water) in my SQL Server 2012 Management Studio (SSMS2012). The dbo.Table_1_XYcoordinates has the following columns: file_id,
    Pt_ID, X, Y, Z, sample_id, Boring. The dbo.Table_2_Soil has the following columns: Boring, sample_date, sample_id, Unit, Arsenic, Chromium, Lead. The dbo.Table_3_Water has the following columns: Boring, sample_date, sample_id, Unit, Benzene, Ethylbenzene,
    Pyrene. The dbo.Table_1_XYcoordinates is a Parent Table. The dbo.Table_2_Soil and the dbo.Table_3_Water are 2 Child Tables. The sample_id is key link for the relationship between the Parent Table and the Child Tables.
    Problem #1) How can I print out or export these 3 dbo Tables?
    Problem #2) If I right-click on the dbo Table, I see "Start PowerShell" and click on it. I get the following error messages: Warning: Failed to load the 'SQLAS' extension: An exception occurred in SMO while trying to manage a service. 
    --> Failed to retrieve data for this request. --> Invalid class.  Warning: Could not obtain SQL Server Service information. An attemp to connect to WMI on 'NAB-WK-02657306' failed with the following error: An exception occurred in SMO while trying
    to manage a service. --> Failed to retrieve data for this request. --> Invalid class.  .... PS SQLSERVER:\SQL\NAB-WK-02657306\SQLEXPRESS\Databases\APGriMMRP\Table_1_XYcoordinates>   What causes this set of error messages? How can
    I get this problem fixed in my PC that is an end user of the Windows 7 LAN System? Note: I don't have the regular version of Microsoft Visual Studio 2012 in my PC. I just have the Microsoft 2012 Shell (Integrated) program in my PC.
    Problem #3: I plan to create an XML Schema Collection in the "APGriMMRP" database for the Parent Table and the Child Tables. How can I handle the relationship between the Parent Table and the Child Table in the XML Schema Collection?
    Problem #4: I plan to extract some results/data from the Parent Table and the Child Table by using XQuery. What kind of JOIN (Left or Right JOIN) should I use in the XQuerying?
    Please kindly help, answer my questions, and advise me how to resolve these 4 problems.
    Thanks in advance,
    Scott Chang    

    In the future, I would recommend you to post your questions one by one, and to the appropriate forum. Of your questions it is really only #3 that fits into this forum. (And that is the one I will not answer, because I have worked very little with XSD.)
    1) Not sure what you mean with "print" or "export", but when you right-click a database, you can select Tasks from the context menu and in this submenu you find "Export data".
    2) I don't know why you get that error, but any particular reason you want to run PowerShell?
    4) If you have tables, you query them with SQL, not XQuery. XQuery is when you query XML documents, but left and right joins are SQL things. There are no joins in XQuery.
    As for left/right join, notice that these two are equivalent:
    SELECT ...
    FROM   a LEFT JOIN b ON a.col = b.col
    SELECT ...
    FROM   b RIGHT JOIN a ON a.col = b.col
    But please never use RIGHT JOIN - it gives me a headache!
    There is nothing that says that you should use any of the other. In fact, if you are returning rows from parent and child, I would expect an inner join, unless you want to cater for parents without children.
    Here is an example where you can study the different join types and how they behave:
    CREATE TABLE apple (a int         NOT NULL PRIMARY KEY,
                        b varchar(23) NOT NULL)
    INSERT apple(a, b)
       VALUES(1, 'Granny Smith'),
             (2, 'Gloster'),
             (4, 'Ingrid-Marie'),
             (5, 'Milenga')
    CREATE TABLE orange(c int        NOT NULL PRIMARY KEY,
                        d varchar(23) NOT NULL)
    INSERT orange(c, d)
       VALUES(1, 'Agent'),
             (3, 'Netherlands'),
             (4, 'Revolution')
    SELECT a, b, c, d
    FROM   apple
    CROSS  JOIN orange
    SELECT a, b, c, d
    FROM   apple
    INNER  JOIN orange ON apple.a = orange.c
    SELECT a, b, c, d
    FROM   apple
    LEFT   OUTER JOIN orange ON apple.a = orange.c
    SELECT a, b, c, d
    FROM   apple
    RIGHT  OUTER JOIN orange ON apple.a = orange.c
    SELECT a, b, c, d
    FROM   apple
    FULL OUTER JOIN orange ON apple.a = orange.c
    go
    DROP TABLE apple, orange
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Load table data to any server-client

    Hi...
    I have a requirement to load Cost Centre data from CSKS and CSKT tables to any Server u2013 Client. What is the best way to accomplish the same? Do i have to use RFC or just put the cost center into a file and load to another system?
    Regards,
    Aruna Nivetha.R

    Hi,
    Actually, it's a task more to your ABAP or BASIS team, but you can do it yourself as well. You can read more here:
    http://help.sap.com/saphelp_47x200/helpdata/en/94/e2d63b8ad9c01ce10000000a11402f/frameset.htm
    Another way, is to put this master data in a change request and transport it. You can do it via OKE6.
    Regards,
    Eli

  • Financial/Project Analytics Load - Some of the Tasks TRUNCATE Table Fails

    Oracle Business Applications 7.9.6.1 - Financial and Project Analytics
    DAC Load for Project Analytics fails with most of the tasks failing at Truncate Table Tasks.
    I am implementing OBIA Financial Analytics and Project Analytics, I am able to configure and run the Out of the Box Loads without any isssues for Financial Analytics. After making sure everything is fine with Fin Analytics i configured the Project Analytics and ran the Load only for the Project - ORA12.
    Financial analytics : Load went through fine without any issues.
    Project Analytics : Majority of the Tasks fail with 'TRUNCATE TABLE table_name' itself.
    No log of Informatica Session Files are Created
    No Log of Workflow logs but taskname.log.bin files are Created.
    I am assuming the loads are failing because it is unable to truncate the data loaded by Financial Analytics Load and due to Foreign Key constraints,
    I did the integration as per the document by unchecking in the Configuration Tags.
    Do i need to run the load together, As i am unable to figure out what is happening due to the absense of the log files i.e Session, Workflow.
    DAC logs are not providing much info.
    Any inputs are appreciated.
    Thanks

    hi
    you need to create a new execution plan that contains fin & project subject area. Do not forget to build the new plan,
    thx

  • Loading images in a table and show this image in a html form

    Hi All,
    I'am a newbie in Oracle and PL/SQL.
    I need to load a image in a table and restrive this image and show it in a html form. I'd like to use a PL/SQL procedure.
    Thanks in advance for any suggestions.

    Hi,
    This forum is for Oracle9iAS Web Services discussion.
    I would recommend that you post your question to the 9iAS - General discussion forum.
    Regards,
    Tim

Maybe you are looking for

  • Generic DataSource using InfoSet on BI 7.0

    Hi gurus, I need to extract data from a InfoCube through a generic DataSource. I have created an InfoSet Query based on this InfoCube and I have noticed this kind of InfoSet is not the same that is used by Tcode RSO2. Does anybody know if there is an

  • Strange schema validation error

    Hi, I have the following piece of schema: <xsd:complexType name="New Item"> <xsd:complexContent> <xsd:extension base="xyz:Item"/> </xsd:complexContent> </xsd:complexType> <xsd:element name="New Item" type="xyz:New Item"/> and I got the following erro

  • Excel File Management Apache POI HSSF vs. jxl jar

    I've been reviewing Java technologies for managing Excel files, and I'm a little confused about the differences between Apache's POI HSSF implementation and JExcelApi, and utimately what technology it makes sense to use. They are both open source, al

  • Duplicate search results

    Hi ,   I am creating a search model using ESH_MODELER transaction, am using tables like HRP1001 , /shcm/hrp5091, /shcm/hrp5090, BUT0iD, BUT000 etc. On clicking search am getting duplicate entries. Really not sure whats the problem here, has anyone en

  • I did the lasted update 11.2 music is now distorted, like i'm underwater

    I did the most recent update and now all my music sounds distorted, almost like i'm underwater and lead vocals are really faint.  I have tried 3 different headphones on my 3rd gen Ipod Touch.  I have tried the standard apple earbuds, Panasonic earbud