Options for loading parent-child SQL 2005 tables

I was reading about a few examples of using Table types and a stored procedure to load tables that are joined by a foreign key (parent-child).  Seems straight forward enough.  However, that requires at least SQL 2008 and the system we are using
is on 2005 still for the time being. As much as I would like to upgrade, there is no time for it, even though we have other 2008 and 2012 instances.  So with that said, what are my options for getting data from BTS to SQL where the destination is 2 tables
that have relations.  
There are probably a dozen or more, but my first thought is a stored procedure with an xml parameter, then use xquery and xpath statements to pull the data out and insert.  TRY/CATCH and RAISEERROR to return error codes back to the BTS application.
Thoughts?

First, how many records are you dealing with?  I don't even think of terms of 'bulk' until 10,000 or so.  And once that threshold is crossed, the first tool out of the box is SSIS.
Second, are you debatching or is there a triple confirmed requirement that all records be loaded in a single transaction?
Finally, the 'DB round-trip' issue is often misunderstood in real world settings.  In a typical db transaction, the most expensive operation is establishing the connection.  Once that's done, the SQL Client is very efficient in transporting data
to and from the database.  Since the wcfSqlBinding uses a Connection Pool, that setup is only done once to some high-water mark.
Consider, the data has to be sent no matter what and in every conseivable scneario*, the byte count of a stored procedure over TDS would be less than sending the same data wrapped in Xml.  The network adds considerable latency to the conversation. 
This is why I'm skeptical of using OPENXML() without a provable benefit.
So, don't get caught up in theoritical 'performance' issues without understanding the entire scenario first.
*SQL Code being the primary exception.

Similar Messages

  • Sub Total value is empty in  parent child hierarchy pivot table

    Hi All,
    I am using obiee 11.1.1.6.2 in Test environment. Is it a known issue/bug for 11.1.1.6.2 to show empty/blank values for sub total when using parent child hierarchy pivot table. The sub total for parent value is showing but sub total for child value is coming blank. However, in 11.1.1.5.0, we do not have any issue with this.
    Is it a known bug in obiee 11.1.1.6.2?
    Thanks,
    Sushil

    Yes it is a known bug...
    Thanks.

  • Material exchange in a PO for a parent child relationship

    Hi ,
    Please advise if there are SAP provide any solution for material exchange in a PO for a parent child relationship? I.e the two materials are NOT maintained as interchangable materials.
    Thanks.
    Regards,
    Clarice

    hello
    Do you mean exchange agreements/contracts where two parties are buyer & seller both to each other. This is well supported by Std SAP.
    Pls correct me, if I am not getting it correct.
    Ganesh...

  • How to integrate DRM with third party tool for loading metadata in SQL table

    Experts,
    I am new to DRM and I have a requirement in which we want to integrate DRM with third party tool(lets say SQL table) as target and load metadata from DRM (Parent node, name , alias etc) to SQL table (same column name)
    Is there any way we can integrate DRM to export the same to table directly instead to files. If yes what are the steps we have to follow.
    Is there anyway we can customize DRM to execute queries or run batch
    Can I have a basic example please.
    Thanks in advance,
    Regards,

    1. Use DRM Export to Table option, for that create an External Connection first for the Target Database and select the respective Tables to which you wish to Export the Hierarchy information.
    2. You can perform most of the DRM Actions via the DRM_BATCH_CLIENT.exe.
        Please refer to Using the Data Relationship Management Batch Client of DRM User guide.
    let me know if you have any issues.

  • Creating View for a table with parent child relation in table

    I need help creating a view. It is on a base table which is a metadata table.It is usinf parent child relationship. There are four types of objects, Job, Workflow, Dataflow and ABAP dataflow. Job would be the root parent everytime. I have saved all the jobs
    of the project in another table TABLE_JOB with column name JOB_NAME. Query should iteratively start from the job and search all the child nodes and then display all child with the job name. Attached are the images of base table data and expected view data
    and also the excel sheet with data.Picture 1 is the sample data in base table. Picture 2 is data in the view.
    Base Table
    PARENT_OBJ
    PAREBT_OBJ_TYPE
    DESCEN_OBJ
    DESCEN_OBJ_TYPE
    JOB_A
    JOB
    WF_1
    WORKFLOW
    JOB_A
    JOB
    DF_1
    DATAFLOW
    WF_1
    WORKFLOW
    DF_2
    DATAFLOW
    DF_1
    DATAFLOW
    ADF_1
    ADF
    JOB_B
    JOB
    WF_2
    WORKFLOW
    JOB_B
    JOB
    WF_3
    WORKFLOW
    WF_2
    WORKFLOW
    DF_3
    DATAFLOW
    WF_3
    WORKFLOW
    DF_4
    DATAFLOW
    DF_4
    DATAFLOW
    ADF_2
    ADF
    View
    Job_Name
    Flow_Name
    Flow_Type
    Job_A
    WF_1
    WORKFLOW
    Job_A
    DF_1
    DATAFLOW
    Job_A
    DF_2
    DATAFLOW
    Job_A
    ADF_1
    ADF
    Job_B
    WF_2
    WORKFLOW
    Job_B
    WF_3
    WORKFLOW
    Job_B
    DF_3
    DATAFLOW
    Job_B
    DF_4
    DATAFLOW
    Job_B
    ADF_2
    ADF
    I implemented the same in oracle using CONNECT_BY_ROOT and START WITH.
    Regards,
    Megha

    I think what you need is recursive CTE
    Consider your table below
    create table basetable
    (PARENT_OBJ varchar(10),
    PAREBT_OBJ_TYPE varchar(10),
    DESCEN_OBJ varchar(10),DESCEN_OBJ_TYPE varchar(10))
    INSERT basetable(PARENT_OBJ,PAREBT_OBJ_TYPE,DESCEN_OBJ,DESCEN_OBJ_TYPE)
    VALUES('JOB_A','JOB','WF_1','WORKFLOW'),
    ('JOB_A','JOB','DF_1','DATAFLOW'),
    ('WF_1','WORKFLOW','DF_2','DATAFLOW'),
    ('DF_1','DATAFLOW','ADF_1','ADF'),
    ('JOB_B','JOB','WF_2','WORKFLOW'),
    ('JOB_B','JOB','WF_3','WORKFLOW'),
    ('WF_2','WORKFLOW','DF_3','DATAFLOW'),
    ('WF_3','WORKFLOW','DF_4','DATAFLOW'),
    ('DF_4','DATAFLOW','ADF_2','ADF')
    ie first create a UDF like below to get hierarchy recursively
    CREATE FUNCTION GetHierarchy
    @Object varchar(10)
    RETURNS @RESULTS table
    PARENT_OBJ varchar(10),
    DESCEN_OBJ varchar(10),
    DESCEN_OBJ_TYPE varchar(10)
    AS
    BEGIN
    ;With CTE
    AS
    SELECT PARENT_OBJ,DESCEN_OBJ,DESCEN_OBJ_TYPE
    FROM basetable
    WHERE PARENT_OBJ = @Object
    UNION ALL
    SELECT b.PARENT_OBJ,b.DESCEN_OBJ,b.DESCEN_OBJ_TYPE
    FROM CTE c
    JOIN basetable b
    ON b.PARENT_OBJ = c.DESCEN_OBJ
    INSERT @RESULTS
    SELECT @Object,DESCEN_OBJ,DESCEN_OBJ_TYPE
    FROM CTE
    OPTION (MAXRECURSION 0)
    RETURN
    END
    Then you can invoke it as below
    SELECT * FROM dbo.GetHierarchy('JOB_A')
    Now you need to use this for every parent obj (start obj) in view 
    for that create view as below
    CREATE VIEW vw_Table
    AS
    SELECT f.*
    FROM (SELECT DISTINCT PARENT_OBJ FROM basetable r
    WHERE NOT EXISTS (SELECT 1
    FROM basetable WHERE DESCEN_OBJ = r.PARENT_OBJ)
    )b
    CROSS APPLY dbo.GetHierarchy(b.PARENT_OBJ) f
    GO
    This will make sure it will give full hieraracy for each start object
    Now just call view as below and see the output
    SELECT * FROM vw_table
    Output
    PARENT_OBJ DESCEN_OBJ DESCEN_OBJ_TYPE
    JOB_A WF_1 WORKFLOW
    JOB_A DF_1 DATAFLOW
    JOB_A ADF_1 ADF
    JOB_A DF_2 DATAFLOW
    JOB_B WF_2 WORKFLOW
    JOB_B WF_3 WORKFLOW
    JOB_B DF_4 DATAFLOW
    JOB_B ADF_2 ADF
    JOB_B DF_3 DATAFLOW
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Parent-Child Join on tables in Database Adapter

    Hi,
    We are doing a join on two tables(T1 and T2) in Database adapter for an Insert operation. There is no Reference Integrity between these two tables in Database, but join is done through bpel database adapter.
    Here is a scenario - when we try to insert a record(parent-child), into these two tables, If there is any data issue in any of the child record, Adapter inserts parent-record, also inserts few child-records it processed before it encountered this data issue and terminates.
    Issue here is , We want this to be transactional, it means, If any of the child record fails adapter should rollback the entire insert operation both from parent and child tables and exit with an error. Instead BPEL inserting half records into child table.
    Is there any parameter I need to set or am I missing anything? Someone please suggest.
    Thanks,
    Phani

    There are a few options I guess.
    1. Add the referential key constraint.
    2. Add custom logic in your BPEL project to compensate for any errors you encounter in your BPEL processes.

  • Load Parent-Child dimension with attributes by rule file

    Well, I've cracked my head open while banging against this wall.
    Task is plain & simple:
    How can I load build dimension from such table, using rule file?
    Data
    ProductParent ProductChild ProductAttribute
    Balls Ball_8 Round
    I want to load both product dimension and attribute by single rule file (neither of these dimensions exists in database before load), so I do the following:
    1) Set dimension build settings, creating dimension Products (marking it P\C generated, sparse), having an attribute dimension AttributeDim
    2) Mark the fields as Parent, Child and AttributeDim of dimension Products
    After loading rule file a get three types of errors:
    a) "Base member (Balls) association level does not match base dimension association level" -- does this mean that I cannot assign attributes in P\C way?
    b) "Record #327 - Can not uniquely identify member by Balls (3335)
    Balls     Ball_8     Round" -- That's strange, I thought member should be identified by Ball_8 (and this column is unique)
    c) "\\Record #418 - Error in association transaction [Ball_8] to [Round] (3362)"
    I've read all I could find on topic from this forum, network45 board and going to start my way through metalink3, but maybe some kind soul will rescue me from drowning in information ocean?

    Hi,
    Outline is blank at the start of load and I expect dimensions Product and ProdAttribute to be added.
    Generations are unapplicable, since I can't turn this parent-child dimension (it's ragged) into generation one.
    And, by the way Integration Services manages to do this somehow, why rule files wouldn't?

  • How to filter parent & child rows from tables while export usingData export

    Hi,
    I have a requirement of export schema. Assume there is a account details table and account transactions table under schema.They have parent child relation exist. if i filter accounts from account details the corresponding transactions in account transactions table should be filterd.How to achieve this?
    Regards,
    Venkat Vadlamudi
    Mobile:9850499800

    Not sure if this is a SQL and PL/SQL question or whether it's an Oracle Apps type question or a Database General.
    Whatever, you've posted in the wrong forum (http://forums.oracle.com/forums/ann.jspa?annID=599)
    You should post in a more appropriate forum e.g.
    PL/SQL
    General Database Discussions
    etc.
    locking this thread

  • Defining Report LayOut for a parent child report

    I have a parent child report. I want to print this report in PDF using BI Publisher. Now I wanted to define a layout for that report using BI template builder. My stratagey for defining Report layuout is
    1. Write a query containing all fields that I need
    2. Convert that query data to XML, one way or the other
    3. Load that XML into template builder.
    4. Define the layout.
    Now the problem is that I need some fields for parent and some from child. If I do not use group buy clause in the query I will not be able to use the tabular format in template builder (taht I wanted to use).
    IF I use a group By caluse then I am unable to select the child fields as they are not the part of group by clause.
    Plz help

    You have 2 repeating frames: R_contracts and R_ads. Create a frame M_disclaimer after R_ads, within R_contracts to hold the disclaimer page. This page will print after all the ad records have been printed, and before the new contract starts.
    You can set Page Break Before on M_disclaimer to print this frame on a new page.

  • Windows Event Collector - Built-in options for load balancing and high availability ?

    Hello,
    I have a working collector. config is source initiated, and pushed by GPO.
    I would like to deploy a second collector for high availability and load balancing. What are the available options ? I have not found any guidance on TechNet articles.
    As a low cost option, is it fine to simply start using DNS round-robin with a common alias for both servers pushed as a collector name through GPO ?
    In my GPO Policy, if I individually declare both servers, events are forwarded twice, once for each server. Indeed it does cover high availability, but not really optimized.
    Thanks for your help.

    Hi,
    >>As a low cost option, is it fine to simply start using DNS round-robin with a common alias for both servers pushed as a collector name through GPO ?
    Based on the description, we can utilize DNS round robin to distribute workloads and increase fault tolerance. By default, DNS uses round robin to rotate the order of RR data returned in query answers where multiple RRs of the same type exist for a queried
    DNS domain name. This feature provides a simple method for load balancing client use of Web servers and other frequently queried multihomed computers. Besides, by default, DNS will perform round-robin rotation for all RR types.
    Regarding DNS round robin, the following article can be referred to for more information.
    Configuring round robin
    http://technet.microsoft.com/en-us/library/cc787484(v=ws.10).aspx
    TechNet Subscriber Support
    If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback here.
    Best regards,
    Frank Shen

  • Options for loading data from legacy mainframe to SAP CRM and ECC

    Hello All,
    I am new to SAP.
    As part of data conversion planning from legacy mainframe to SAP CRM and ECC systems, I need to know the different tools available for loading the data and comparative analysis of the tools by showing the features. Please also describe the process to evaluate the tools (prototyping, technical discussions etc) and make the recommendations.
    I would also appreciate any information on testing tools like (eCATT) and any third party tools (like Informatica)
    I know I am asking for lot of things here. But, I really appreciate any information reagrding this.
    Thanks,
    Balu

    Hi
    Data Migration(Conversions) mainly involves the following Major Steps
    Discovery->Extract->Cleanse->Transform->Load
    Discovery-> Involves identifying various source systems available where the actual data is residing.
    Extract->Extract the data from the source systems(legacy systems)
    Cleanse->Cleanse the data by enriching it,De-duplications etc
    Transform->Transform the data into SAP Loadable format
    Load->Upload the data into SAP Using the Load Programs(Eg,BDC,LSMW,Data Transfer Workbench,BAPIs etc)
    Also i would request you to visit http://www.businessobjects.com/solutions/im/data_migration.asp
    Cheers,
    Hakim

  • Parent Child In Same Table Management

    I have a simple entity (Process) which has ID and Name.
    It also has Parent property which reference the parent Process of this one.
    When the user ask to delete a process, I have to disconnect its children from it, otherwise I'll have a reference integrity violation, and the logic of the application permit to delete a process in the middle of hierarchy.
    The question is where is it best to put the code that will handle it?
    In a session bean managing the processes, the bad thing is that there are other places that delete processes. so the logic will be have to be duplicated.
    Maybe in an entity listener, the problem is how to get hold of an EntityManager there to update the child processes when a parent process is deleted?
    Thank you,
    Ido.

    Hi,
    In a CONNECT BY query, related rows will always come together. That is, if row r p has children, then the row immediately after p will be one of p's children, and all of the descendants of p will come before any row that is not a descendant of p.
    An ORDER BY clause will cancel the above, but an ORDER SIBLINGS BY clause will keep to the rules above.
    For example:
    SELECT     *
    FROM     t1
    START WITH        col1  NOT IN ( SELECT  col2
                                               FROM        t1
                             WHERE   col2        IS NOT NULL
    CONNECT BY         col1  = PRIOR col2
    ORDER SIBLINGS BY  id               -- Optional
    ;It just so happens that the rows appear in order by id. It might have been better if you had chosen ids that did not show the correct order.
    The tricky part of the CONNECT BY query above is choosing the START WITH set. There's noting in each row by itself that tells if a row is a root; you have to do a sub-query to find all the children, and START WITH a row if it is not on that list.

  • Any other options for load balancing

    hello everyone,
    i have been unsuccessful to implement load balancing effectively. have you come across any such problems with load balancing not working as expected? are there any othner options to implement load balancing?
    thank you in advance

    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-priority:99;
    mso-style-qformat:yes;
    mso-style-parent:"";
    mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
    mso-para-margin-top:0cm;
    mso-para-margin-right:0cm;
    mso-para-margin-bottom:10.0pt;
    mso-para-margin-left:0cm;
    line-height:115%;
    mso-pagination:widow-orphan;
    font-size:11.0pt;
    font-family:"Calibri","sans-serif";
    mso-ascii-font-family:Calibri;
    mso-ascii-theme-font:minor-latin;
    mso-hansi-font-family:Calibri;
    mso-hansi-theme-font:minor-latin;
    mso-bidi-font-family:"Times New Roman";
    mso-bidi-theme-font:minor-bidi;}
    I do not see what you want to achieve or what you have tried to do. So please provide some more information.
    /André

  • Smartforms: Output Options for Field Contents not working within table

    Hello,
    to display an amount and its unit I am using &GS_MM_IT_GEN-MENGE(R)& &GS_MM_IT_GEN-MEINS& with a line of a table. Unfortunatly it seams that the output option "R" (right-justified) is not working with the table context. Has anyone an idea, what to do?
    Thanx,
    Peter

    Dear all,
    thank you for your suggestions. I have found out, that the output option work pretty well as described in the documentation. The are output options of a field and not of a column! To get a right justified column, I had to change the attribute of the parapraph assigned to the column.
    Regards
    Peter

  • Controlling separate, freestanding swfs (not loaded parent/child swfs)

    I have a flash file with buttons and actions and 2 flash files with animations. I want to control both animation files with the one 'controler' file, at the same time. 
    Note: these are separate swf/exe/app files and will run individually from the desktop, not be loaded into an swf and run online. 
    How can I access the timeline of these separate files to control them?
    Thanks

    http://kb2.adobe.com/community/publishing/918/cpsid_91887.html
    take a look at Q4

Maybe you are looking for

  • Please help undo damage done by bad software download

    How do I find out what settings a download changed to my MacBook Air?  How do I permanently expunge all related files? I downloaded what I thought was Flip4Mac and it was some piece of junk that polluted my computer; how extensively, I don't know, bu

  • Php Form Help

    I just developed a simple php form (my first time). I am trying to enable the information that is typed in the form by visitors, to be emailed directly to me. So far I can only get the person's email address and message left in information box to be

  • IPAD AIR SLOW TO OPEN APPS

    My iPad Air is slow and often hangs. It takes time for apps to open. I have spare memory of 22 GB. Let me know what to do?

  • Any way to print an SMS Text?

    I have an 8830. I need to print some SMS Text messages received and sent.  Is there any way to at least forward a text to an email for printing purposes?  Any help would be greatly appreciated.

  • Email addresses included with webBasic and video on associating domain with websites

    Do the five included (or for that matter any additional paid) web sites provide for email accounts?  Are there any videos on how to move a site to one of these and connect my URL to it?