SQL Table Lookup during WhilePrintingRecords phase

Post Author: BrHunt
CA Forum: Data Connectivity and SQL
Is it possible in Crystal XI to perform a "real-time" SQL table lookup while processing records for printing?  Possibly in a user defined function?
Thanks.
Bryan Hunt

Hi Jonathan,
Below is an extract from SAP Note 490095 - DB6: Additional information on upgrade
XIV/ Converting the table DBTABLOG
< d021078 >----
The table 'DBTABLOG' (among others) is converted for all source releases. Since this table may contain a lot of entries, this conversion may take a very long time.
When you use the upgrade strategy 'resource-minimized', the complete conversion takes place in downtime.
When you use the upgrade strategy 'downtime-minimized', the system proposes the table DBTABLOG for the incremental conversion with ICNV when it reaches a certain size.
The part of the data that is not yet converted (by ICNV) at the beginning of downtime is converted in the PARCONV_UPG phase in downtime.
Note that the maximum size of the log files on the database must at least be as large as the portion of data for the table 'DBTABLOG', which is converted in the PARCONV_UPG phase.
Before the upgrade, find out how large the table 'DBTABLOG' in your system is and check whether the existing entries are also still required after the upgrade. You can delete the entries no longer required in accordance with the instructions contained in Note 41300.
Also there is some information mentioned in SAP note 41300 which can be useful.
Regards,
Deepak Kori

Similar Messages

  • MS05 transaction throws "SQL error: error during INSERT (table: &)"

    Hi Team,
    I am a BASIS engineer on MM system. we have a strange problem from customers we see an error on the MS05 screen with "SQL error: error during INSERT (table: &)" and when the support team runs MS01 transaciton this error gets resolved.
    What I would like to know is what could be the likely cause of this error and how we can prevent it.
    When I check the SM21 logs i noticed one log with "Transaction cancellation 61 204 ( PLAF )"
    and under additional document section is the log I see the below information
    Usually, the reason for this error is that an entry already exists
    with the same key.
    This problem can occur if the client was copied with the movement data
    without adjusting the number range intervals.
    Please check if the number ranges for this table have been set
    correctly and, if necessary, correct the number range interval.
    I am from BASIS and I have no clue in how the MM transactions are linked can any MM gurus help in identifying the root cause for this problem.
    any help on this is highly appreciated
    thanks
    Vijay

    Hi
    Are MS05 & MS01 you're referring is a T-code?. if so, then they are associated with planning and a PP consultant can give a more clear picture on it. Try posting this to a PP forum.
    Based on the error log, i guess this may arise because of the number range problem, when the document is getting saved and record is being tried to inserted into a table.
    Thanks
    E.Avudaiappan

  • Diference b/w normal tables and pl/sql tables

    what is the diference b/w normal tables and pl/sql tables.
    already we have tables then what is the purpose of pl/sql tables.
    what are the advantages of pl/sql tables compare nor mal tables.

    user10447332 wrote:
    what is the diference b/w normal tables and pl/sql tables.As BluShadow pointed out "PL/SQL tbles" are now called collections. They are memory structures that store data and go away when your program stops running - essentially arrays or "tables" in other programming languages. "normal" ("heap") tables are stored on disk and are persistant - they store data permanently.
    already we have tables then what is the purpose of pl/sql tables.Collections are used to store data temporarily in memory, when it will be accessed shortly or repeatedly for fast access. This works best with smaller data sets because if you store too much data in a collection you can run out of memory to use
    what are the advantages of pl/sql tables compare nor mal tables.Collections give you faster access to data you need to read more than once during the same application. They work well for fast lookups and for smaller data sets can improve program performance slightly with the use of the bulk collect and forall PL/SQL operators under the right conditions.

  • Import SQL Table's Metadata Error for MySQL

    I am following this blog by William Li.
    SAP PI 7.1 Mapping Enhancements Series: Import SQL Table's Metadata - SAP PI 7.1 Mapping Enhancements Series: Import SQL Table's Metadata
    I am using MySQL database instead.
    Connection to the database is fine because we get to choose the tables in the schema.
    When I am importing the Table Definition in Enterprise Service Builder,
    I am getting this error
    Serialized cause: com.sap.aii.mapping.lookup.LookupException: Exception during processing the payload. Error when calling an adapter by using the communication channel CC_JDBCLookUp (Party: , Service: PT1_BC, Object ID: b088d4ef332833a89ee816faa88b5089) XI AF API call failed. Module exception: (No information available). Cause Exception: 'Error processing request in sax parser: Error when executing statement for table/stored proc. 'metadataRequest' (structure 'statement'): com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"lookuptable" WHERE 1 < 0' at line 1'.
    Any ideas for this error?

    HI,
         I have a problem trying to connect a MySQL Database, I'm using the mysql-connector-java-5.0.6-bin.jar library that I download from the MySQL Site.
         These are may connection parameters:
             JDBC Driver:  com.mysql.jdbc.Driver
             Connection:     jdbc:mysql://172.16.125.11:3306/gcctea
         If you have any idea...
    Regards,
    Luis E. Diego

  • Report from PL/SQL Table

    Thanks for answer to my first question. Now I have another problem.
    Is there any way to print a report based on virtual table, which is created during some Pl/SQL procedure and can't be easily decribed by Select statement

    SELECT FROM PL/SQL TABLE IN ORACLE REPORTS 6I
    The requirement is to populate a table and then select from that table in a report. The typical solution is to
    populate a database table, but for situations where that is undesirable there is a way to select from a PL/SQL
    table.
    For example - for each employee we want to populate a PL/SQL table and then select from that table.
    I used the following records in the emp table:
    INSERT INTO Emp VALUES(123,'Bob','Sales',555,'28-JAN-79',35000,12,30);
    INSERT INTO Emp VALUES(321,'Sue','Finance',555,'12-MAY-83',42000,12,10);
    INSERT INTO Emp VALUES(234,'Mary','Account',555,'14-AUG-82',33000,12,20);
    INSERT INTO Emp VALUES(623,'Joe','Sales',555,'28-JAN-79',35000,12,30);
    INSERT INTO Emp VALUES(621,'Jim','Finance',555,'12-MAY-83',42000,12,10);
    INSERT INTO Emp VALUES(634,'Jane','Account',555,'14-AUG-82',33000,12,20);
    INSERT INTO Emp VALUES(723,'Fred','Sales',555,'28-JAN-79',35000,12,30);
    INSERT INTO Emp VALUES(721,'Meg','Finance',555,'12-MAY-83',42000,12,10);
    INSERT INTO Emp VALUES(734,'Jill','Account',555,'14-AUG-82',33000,12,20);
    =============================================================================================
    Step 1: Create a package spec in the report:
    PACKAGE pkg_table IS
    TYPE t_rec IS RECORD (
    field1 NUMBER(6),
    field2 VARCHAR2(30));
    TYPE t_tab IS TABLE OF t_rec INDEX BY BINARY_INTEGER;
    gv_tab t_tab;
    FUNCTION populate (
    p_empno NUMBER) RETURN NUMBER;
    END;
    Step 2: Create the package body:
    PACKAGE BODY pkg_table IS
    FUNCTION populate (
    p_empno NUMBER) RETURN NUMBER IS
    BEGIN
         gv_tab.DELETE;
         -- populate table as required - for demo purposes put in anything
         FOR lv_ind IN 1..MOD(p_empno,20) LOOP
              gv_tab(lv_ind).field1 := lv_ind;
              gv_tab(lv_ind).field2 := 'row '||TO_CHAR(lv_ind)||' for emp '||TO_CHAR(p_empno);
         END LOOP;
         RETURN gv_tab.COUNT;
    END populate;
    END;
    Step 3: Create the master query:
    SELECT empno,
    ename
    FROM emp
    Step 4: Add a formula column CF_populate to the master query that does:
    function CF_populateFormula return Number is
    -- for each emp fetched this formula will repopulate the PL/SQL table
    -- and return the number of records in the table
    begin
    return pkg_table.populate(:empno);
    end;
    Step 5: Create the detail query:
    -- we need to join this to the master and then ensure that for each
    -- empno there are as many records fetched as there will be
    -- records in the PL/SQL table
    SELECT e1.empno,rownum
    FROM emp e1, emp e2, emp e3
    WHERE rownum <= :CF_populate
    Step 6: Add formula columns to the detail query for each of the fields in the
    PL/SQL table we want to display:
    CF_Field1:
    function CF_field1Formula return Number is
    begin
    return pkg_table.gv_tab(:rownum).field1;
    end;
    CF_Field2:
    function CF_field2Formula return Varchar2 is
    begin
    return pkg_table.gv_tab(:rownum).field2;
    end;
    Step 7: Create the repeating frame and layout items to display the formula columns.
    =============================================================================================
    The same technique can be used to populate a master query. In a report level formula column
    CF_Populate populate the PL/SQL table as required. In the master query we just need the rownum:
    SELECT rownum
    FROM emp, emp, emp
    WHERE rownum <= :CF_Populate
    Add the formula columns to display Field1 and Field2.
    =============================================================================================
    Hugh Nelson
    26/04/2005

  • Error while retrieving data from PL/SQL Table using SELECT st. (Urgent!!!)

    Hi Friends,
    I am using Oracle 8.1.6 Server, & facing problems while retrieving data from a PL/SQL Table:
    CREATE or REPLACE PROCEDURE test_proc IS
    TYPE tP2 is TABLE of varchar2(10); --declared a collection
    dt2 tP2 := tP2('a','b','c');
    i NUMBER(8);
    begin
    SELECT COUNT(*) INTO i FROM TABLE(CAST(dt2 as tP2));
    DBMS_OUTPUT.PUT_LINE('**'||i);
    end;
    While executing the above procedure, I encountered foll. error:
    ERROR at line 1:
    ORA-00600: internal error code, arguments: [15419], [severe error during PL/SQL execution], [], [],
    ORA-06544: PL/SQL: internal error, arguments: [pfrrun.c:pfrbnd1()], [], [], [], [], [], [], []
    ORA-06553: PLS-801: internal error [0]
    Can anyone please help me, where the problem is??
    Is it Possible to retrieve data from PL/SQL TABLE using SELECT statement? & How ?
    Thanks in advance.
    Best Regards,
    Jay Raval.

    Thanks Roger for the Update.
    It means that have to first CREATE TYPE .. TABLE in database then only I can fire a Select statement on that TYPE.
    Actually I wanted to fire a Select statement on the TABLE TYPE, defined & declared in PLSQL stored procedure using DECLARE TYPE .. TABLE & not using CREATE TYPE .. TABLE.
    I was eager to know this, because my organization is reluctant in using CREATE TYPE .. TABLE defined in the database, so I was looking out for another alternative to access PL/SQL TABLE using Select statement without defining it database. It would have been good if I could access a PLSQL TABLE using Select statement Declared locally in the stored procedure.
    Can I summarize that to access a PL/SQL TABLE using SELECT statement, I have to first CREATE TYPE .. TABLE?
    If someone have any other idea on this, please do let me know.
    Thanks a lot for all help.
    Best Regards,
    Jay Raval.
    You have to define a database type...
    create type tP2 is table of varchar2(10)
    CREATE OR REPLACE PROCEDURE TEST_PROC
    IS
    dt2 tP2 := tP2('a','b','c');
    i NUMBER(8);
    begin
    SELECT COUNT(*) INTO i FROM TABLE(CAST (dt2 AS tP2));
    DBMS_OUTPUT.PUT_LINE('**'||i);
    end;
    This will work.
    Roger

  • SQL server 2014 and VS 2013 - Dataflow task, read CSV file and insert data to SQL table

    Hello everyone,
    I was assigned a work item wherein, I've a dataflow task on For Each Loop container at control flow of SSIS package. This For Each Loop container reads the CSV files from the specified location one by one, and populates a variable with current
    file name. Note, the tables where I would like to push the data from each CSV file are also having the same names as CSV file names.
    On the dataflow task, I've Flat File component as a source, this component uses the above variable to read the data of a particular file. Now, here my question comes, how can I move the data to destination, SQL table, using the same variable name?
    I've tried to setup the OLE DB destination component dynamically but it executes well only for first time. It does not change the mappings as per the columns of the second CSV file. There're around 50 CSV files, each has different set off columns
    in it. These files needs to be migrated to SQL tables using the optimum way.
    Does anybody know which is the best way to setup the Dataflow task for this requirement?
    Also, I cannot use Bulk insert task here as we would like to keep a log of corrupted rows.
    Any help would be much appreciated. It's very urgent.
    Thanks, <b>Ankit Shah</b> <hr> Inkey Solutions, India. <hr> Microsoft Certified Business Management Solutions Professionals <hr> http://ankit.inkeysolutions.com

    The standard Data Flow Task supports only static metadata defined during design time. I would recommend you check the commercial COZYROC
    Data Flow Task Plus. It is an extension of the standard Data Flow Task and it supports dynamic metadata at runtime. You can process all your input CSV files using a single Data Flow Task
    Plus. No programming skills are required.
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

  • Inserting rows in PL/SQl table

    Hi,
    I have a PL/SQl table which i populated through bulk collect and now i am trying to loop through the table (actually quite a few nested loops) ... Now inside one of my loops i might need to insert a new row by splitting field in the existing row in the table. Can I insert the row in the pl/sql table within the loop without affecting the 'FOR i IN tab.first..tab.last' loop ??
    Also what would be the index of such a row inserted in the table. Can I access it with tab.last+1 (doesnt look like it can be done if i insert in the various levels of loops).
    OR
    If I insert the rows insde the nested loops , then I can access the new rows once I close all the loops and open a fresh loop ??. Will the new rows be at the last of the table.
    Any help will be appreciated ...

    user2309906 wrote:
    Hi,
    I have a PL/SQl table which i populated through bulk collect and now i am trying to loop through the table (actually quite a few nested loops) ... Now inside one of my loops i might need to insert a new row by splitting field in the existing row in the table. Can I insert the row in the pl/sql table within the loop without affecting the 'FOR i IN tab.first..tab.last' loop ??
    Also what would be the index of such a row inserted in the table. Can I access it with tab.last+1 (doesnt look like it can be done if i insert in the various levels of loops).
    OR
    If I insert the rows insde the nested loops , then I can access the new rows once I close all the loops and open a fresh loop ??. Will the new rows be at the last of the table.
    Any help will be appreciated ...With an associative array:
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2    type t_arr is table of varchar2(10) index by pls_integer;
      3    v_arr t_arr;
      4    v_cnt number := 0;
      5  begin
      6    -- populate the associative array
      7    for i in (select ename from emp)
      8    loop
      9      v_cnt := v_cnt + 1;
    10      dbms_output.put_line('Populating: '||i.ename);
    11      v_arr(v_cnt) := i.ename;
    12    end loop;
    13    -- now process the associative array
    14    for i in v_arr.first .. v_arr.last
    15    loop
    16      dbms_output.put_line('Processing: '||i||':'||v_arr(i));
    17      if v_arr(i) IN ('KING','TURNER','JAMES') then
    18        v_arr(v_arr.last+1) := v_arr(i)||to_char(i);
    19        dbms_output.put_line('Added: '||v_arr.last||':'||v_arr(i));
    20      end if;
    21    end loop;
    22    -- now what's in the associative array?
    23    for i in v_arr.first .. v_arr.last
    24    loop
    25      dbms_output.put_line('Result: '||i||':'||v_arr(i));
    26    end loop;
    27* end;
    SQL> /
    Populating: SMITH
    Populating: ALLEN
    Populating: WARD
    Populating: JONES
    Populating: MARTIN
    Populating: BLAKE
    Populating: CLARK
    Populating: SCOTT
    Populating: KING
    Populating: TURNER
    Populating: ADAMS
    Populating: JAMES
    Populating: FORD
    Populating: MILLER
    Processing: 1:SMITH
    Processing: 2:ALLEN
    Processing: 3:WARD
    Processing: 4:JONES
    Processing: 5:MARTIN
    Processing: 6:BLAKE
    Processing: 7:CLARK
    Processing: 8:SCOTT
    Processing: 9:KING
    Added: 15:KING
    Processing: 10:TURNER
    Added: 16:TURNER
    Processing: 11:ADAMS
    Processing: 12:JAMES
    Added: 17:JAMES
    Processing: 13:FORD
    Processing: 14:MILLER
    Processing: 15:KING9
    Processing: 16:TURNER10
    Processing: 17:JAMES12
    Result: 1:SMITH
    Result: 2:ALLEN
    Result: 3:WARD
    Result: 4:JONES
    Result: 5:MARTIN
    Result: 6:BLAKE
    Result: 7:CLARK
    Result: 8:SCOTT
    Result: 9:KING
    Result: 10:TURNER
    Result: 11:ADAMS
    Result: 12:JAMES
    Result: 13:FORD
    Result: 14:MILLER
    Result: 15:KING9
    Result: 16:TURNER10
    Result: 17:JAMES12
    PL/SQL procedure successfully completed.With standard array (PL/SQL table):
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2    type t_arr is table of varchar2(10);
      3    v_arr t_arr;
      4    v_cnt number := 0;
      5  begin
      6    -- populate the pl/sql table
      7    select ename bulk collect into v_arr from emp;
      8    -- now process the pl/sql table
      9    for i in v_arr.first .. v_arr.last
    10    loop
    11      dbms_output.put_line('Processing: '||i||':'||v_arr(i));
    12      if v_arr(i) = 'KING' then
    13        v_arr.extend;
    14        v_arr(v_arr.last) := 'PRESIDENT';
    15      end if;
    16    end loop;
    17    -- now what's in the pl/sql table?
    18    for i in v_arr.first .. v_arr.last
    19    loop
    20      dbms_output.put_line('Result: '||i||':'||v_arr(i));
    21    end loop;
    22* end;
    SQL> /
    Processing: 1:SMITH
    Processing: 2:ALLEN
    Processing: 3:WARD
    Processing: 4:JONES
    Processing: 5:MARTIN
    Processing: 6:BLAKE
    Processing: 7:CLARK
    Processing: 8:SCOTT
    Processing: 9:KING
    Processing: 10:TURNER
    Processing: 11:ADAMS
    Processing: 12:JAMES
    Processing: 13:FORD
    Processing: 14:MILLER
    Processing: 15:PRESIDENT
    Result: 1:SMITH
    Result: 2:ALLEN
    Result: 3:WARD
    Result: 4:JONES
    Result: 5:MARTIN
    Result: 6:BLAKE
    Result: 7:CLARK
    Result: 8:SCOTT
    Result: 9:KING
    Result: 10:TURNER
    Result: 11:ADAMS
    Result: 12:JAMES
    Result: 13:FORD
    Result: 14:MILLER
    Result: 15:PRESIDENT
    PL/SQL procedure successfully completed.
    SQL>So, in answer to your questions...
    Inserting additional rows in the array during the loop will effect the "last" value and alter the array. If you need to avoid this effect, store the "last" value in a variable and loop up to that value of the variable.
    New rows will generally be additional rows on the end of the array unless you are using associative arrays which will then depend on how you reference the rows in the array.

  • PL/SQL table type in Forms 4.5

    Hi
    I am trying to use a pl/sql table type variable in Oracle forms 4.5 . I am able to compile this and run it on the database that the application connects to but in forms , it gives me a compilation error.
    Is there some restriction on using this datatype in forms 4.5
    Following is the syntax I am using:
    TYPE block_list_type IS TABLE of VARCHAR2(200) INDEX BY BINARY_INTEGER;
    block_list block_list_type;
    I get fatal syntax error even though the syntax is correct(checked it on the database).
    please let me know if I am doing something wrong.
    thanks a lot

    That explains it!!
    Thanks. My company is on oracle 10.7 and is too reluctant to move to higher versions. They finally bought I2 and are developing their own custom java applications and will phase out 10.7 but are not willing to move to the next version of Oracle !!
    Seems like they are done with Oracle .
    thanks for the input anyways.

  • Is it possible to show data from two different sql tables?

    Is it possible to show data from two different sql tables? Either to show combined data by using a join on a foreign key or showing a typical master detail view?
    I have one table With data about a house, and another table With URL's to images in the blob. Could these two be combined in the same Gallery?
    Best regards Terje F - Norway

    Hi Terje,
    If you have a unique key, you could use one of the following functions for your scenarios:
    If you only have one image per house, you can use LookUp:
    http://siena.blob.core.windows.net/beta/ProjectSienaBetaFunctionReference.html#_Toc373745501
    If you have multiple images per house, you can use Filter:
    http://siena.blob.core.windows.net/beta/ProjectSienaBetaFunctionReference.html#_Toc373745487
    Thanks
    Robin

  • SSIS 2008 – Read roughly 50 CSV files from a folder, create SQL table from them dynamically, and dump data.

    Hello everyone,
    I’ve been assigned one requirement wherein I would like to read around 50 CSV files from a specified folder.
    In step 1 I would like to create schema for this files, meaning take the CSV file one by one and create SQL table for it, if it does not exist at destination.
    In step 2 I would like to append the data of these 50 CSV files into respective table.
    In step 3 I would like to purge data older than a given date.
    Please note, the data in these CSV files would be very bulky, I would like to know the best way to insert bulky data into SQL table.
    Also, in some of the CSV files, there will be 4 rows at the top of the file which have the header details/header rows.
    According to my knowledge I would be asked to implement this on SSIS 2008 but I’m not 100% sure for it.
    So, please feel free to provide multiple approaches if we can achieve these requirements elegantly in newer versions like SSIS 2012.
    Any help would be much appreciated.
    Thanks,
    Ankit
    Thanks, <b>Ankit Shah</b> <hr> Inkey Solutions, India. <hr> Microsoft Certified Business Management Solutions Professionals <hr> http://ankit.inkeysolutions.com

    Hello Harry and Aamir,
    Thank you for the responses.
    @Aamir, thank you for sharing the link, yes I'm going to use Script task to read header columns of CSV files, preparing one SSIS variable which will be having SQL script to create the required table with if exists condition inside script task itself.
    I will be having "Execute SQL task" following the script task. And this will create the actual table for a CSV.
    Both these components will be inside a for each loop container and execute all 50 CSV files one by one.
    Some points to be clarified,
    1. In the bunch of these 50 CSV files there will be some exception for which we first need to purge the tables and then insert the data. Meaning for 2 files out of 50, we need to first clean the tables and then perform data insert, while for the rest 48
    files, they should be appended on daily basis.
    Can you please advise what is the best way to achieve this requirement? Where should we configure such exceptional cases for the package?
    2. For some of the CSV files we would be having more than one file with the same name. Like out of 50 the 2nd file is divided into 10 different CSV files. so in total we're having 60 files wherein the 10 out of 60 have repeated file names. How can we manage
    this criteria within the same loop, do we need to do one more for each looping inside the parent one, what is the best way to achieve this requirement?
    3. There will be another package, which will be used to purge data for the SQL tables. Meaning unlike the above package, this package will not run on daily basis. At some point we would like these 50 tables to be purged with older than criteria, say remove
    data older than 1st Jan 2015. what is the best way to achieve this requirement?
    Please know, I'm very new in SSIS world and would like to develop these packages for client using best package development practices.
    Any help would be greatly appreciated.
    Thanks, <b>Ankit Shah</b> <hr> Inkey Solutions, India. <hr> Microsoft Certified Business Management Solutions Professionals <hr> http://ankit.inkeysolutions.com
    1. In the bunch of these 50 CSV files there will be some exception for which we first need to purge the tables and then insert the data. Meaning for 2 files out of 50, we need to first clean the tables and then perform
    data insert, while for the rest 48 files, they should be appended on daily basis.
    Can you please advise what is the best way to achieve this requirement? Where should we configure such exceptional cases for the package?
    How can you identify these files? Is it based on file name or are there some info in the file which indicates
    that it required a purge? If yes you can pick this information during file name or file data parsing step and set a boolean variable. Then in control flow have a conditional precedence constraint which will check the boolean variable and if set it will execute
    a execte sql task to do the purge (you can use TRUNCATE TABLE or DELETE FROM TableName statements)
    2. For some of the CSV files we would be having more than one file with the same name. Like out of 50 the 2nd file is divided into 10 different CSV files. so in total we're having 60 files wherein the 10 out of 60 have
    repeated file names. How can we manage this criteria within the same loop, do we need to do one more for each looping inside the parent one, what is the best way to achieve this requirement?
    The best way to achieve this is to append a sequential value to filename (may be timestamp) and then process
    them in sequence. This can be done prior to main loop so that you can use same loop to process these duplicate filenames also. The best thing would be to use file creation date attribute value so that it gets processed in the right sequence. You can use a
    script task to get this for each file as below
    http://microsoft-ssis.blogspot.com/2011/03/get-file-properties-with-ssis.html
    3. There will be another package, which will be used to purge data for the SQL tables. Meaning unlike the above package, this package will not run on daily basis. At some point we would like these 50 tables to be purged
    with older than criteria, say remove data older than 1st Jan 2015. what is the best way to achieve this requirement?
    You can use a SQL script for this. Just call a sql procedure
    with a single parameter called @Date and then write logic like below
    CREATE PROC PurgeTableData
    @CutOffDate datetime
    AS
    DELETE FROM Table1 WHERE DateField < @CutOffDate;
    DELETE FROM Table2 WHERE DateField < @CutOffDate;
    DELETE FROM Table3 WHERE DateField < @CutOffDate;
    GO
    @CutOffDate which denote date from which older data have to be purged
    You can then schedule this SP in a sql agent job to get executed based on your required frequency
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • The import was stopped, an error occurred during the phase DDIC_ACTIVATION

    Dear all,
    When I import the SAP_BASIS support package SAPKB70019 , it appears the error as below :
    The import was stopped, since an error occurred during the phase
    DDIC_ACTIVATION, which the Support Package Manager is unable to resolve
    without your input.
    After you have corrected the cause of the error, continue with the
    import by choosing Support Package -> Import queue from the initial
    screen of the Support Package Manager.
    The following details help you to analyze the problem:
         -   Error in phase: DDIC_ACTIVATION
         -   Reason for error: TP_STEP_FAILURE
         -   Return code: 0008
         -   Error message: OCS Package SAPKB70019, tp step A, return code
             0008
    Notes on phase DDIC_ACTIVATION
    In this phase the imported Dictionary objects are activated. This phase
    can terminate due to the following reasons:
    o   TP_INTERFACE_FAILURE: The tp interface could not be called.
    o   TP_FAILURE: The program tp could not be executed. For more
         information, see the SLOG or ALOG log file.
    o   TP_STEP_FAILURE: The tp step DDIC activation could not be performed
         successfully. To see the cause of the error in the activation log,
         choose  Goto -> Log -> Queue.
         If you import two or more Support Packages in one queue, and you do
         not activate them in the correct sequence, activation errors may
         occur. In this case, the activation errors disappear when you repeat
         the activation run. To do this, choose Support Package -> Import
         Support Package Queue.
        A prerequisite of the Support Package Manager is that the Change and
        Transport System (CTS) is configured correctly. For more detailed
        information, read the online documentation available from Help -> SAP
        Library -> mySAP Technology Components -> SAP Web Application Server ->
        Change and Transport System .
        A list of the most important SAP Notes for Online Correction Support
        (OCS) is available in SAP Note 97620, which is updated regularly.
    I have used se11 to avtive the domain SEFS_CRAWL_ALGORITHM , but the error still exist.
    Hope anyone can help. Thanks!
    B.R
    Michael

    P762713 wrote:>
    > Hi ,
    >
    >     This is general issue now a days occuring in Support Packs .The only solution for this issue is to delete structure ::
    >
    > these were the structure deleted from system afterwards patches were installed successfully.
    >
    > /1PYXXFO/SAP_PAYSLIP_____L0001
    > /1PYXXFO/SAP_PAYSLIP_____T0001
    > /1PYXXFO/SAP_PAYSLIP
    >
    > /1PYXXFO/SAP_PAYSLIP_____L0020
    > /1PYXXFO/SAP_PAYSLIP_____T0020
    >
    > You can do this via Tcode se11 .give these info in data type & in turn you have to delete 1PYXXFO/SAP_PAYSLIP also.This has solved my issue & after this support pack went fine.
    >
    > Thanks..
    > Mohit
    >
    > Edited by: mohit gupta on Sep 23, 2009 9:15 AM
    Hi, mohit
          I have tried to use the t-code se11 to delete the structures, but the system telled me that they are all not exist .
    A part of the queue log as below:
       Field name KEY is reserved (Do not use structure as include in DB table)
       Field name PRIOR is reserved (Do not use structure as include in DB table)
       Field KEY: Component type or domain used not active or does not exist
       Exactly one field SPRAS of type LANG: Selection as text language possible
      Nametab for table /1PYXXFO/SAP_PAYSLIP_____L0001 cannot be generated
       Enhancement category for table missing
       Enhancement category for include or subtype missing
       Field name KEY is reserved (Do not use structure as include in DB table)
       Field name PRIOR is reserved (Do not use structure as include in DB table)
       Field KEY: Component type or domain used not active or does not exist
       Nametab for table /1PYXXFO/SAP_PAYSLIP_____L0020 cannot be generated
       Enhancement category for table missing
       Enhancement category for include or subtype missing
       Field name KEY is reserved (Do not use structure as include in DB table)
       Field name PRIOR is reserved (Do not use structure as include in DB table)
       Exactly one field SPRAS of type LANG: Selection as text language possible
       Enhancement category for table missing
    who can help me ?
    thank you very much
    BR.
    Michael
    Edited by: Michael Hong on Sep 23, 2009 12:36 PM

  • Is there a custom function available which can be used for logging errors captured in a sp in a sql table

    Is there a custom function  available which can be used for logging errors captured in a sp during and after execution in a sql table?
    Basically we  would like to utilize such function  in every sp and log errors of each sp in a error log table
    Mudassar

    Thanks .
    I was able to write this however I am thinking I am missing something
    CREATE FUNCTION testfunction1()
    RETURNS @temp_error TABLE (
    id int identity(1,1),
    procedure_name varchar(255),
    line_number int,
    error_number int,
    error_message varchar(max),
    error_state int,
    error_severity int,
    occurence_datetime datetime default current_timestamp,
    user_name sysname default suser_name(),
    login_name sysname default suser_name()
    AS
    BEGIN
    insert @temp_error(procedure_name,line_number,error_number,error_message,error_state,error_severity)
    select error_procedure(),error_line(),error_number(),error_message(),error_state(),error_severity()
    RETURN;
    END;
    CREATE TYPE test_type AS TABLE(
    id int identity(1,1),
    procedure_name varchar(255),
    line_number int,
    error_number int,
    error_message varchar(max),
    error_state int,
    error_severity int,
    occurence_datetime datetime default current_timestamp,
    user_name sysname default suser_name(),
    login_name sysname default suser_name()
    GO
    create proc usp_error_test
    @test_type AS test_type READONLY
    as
    begin
    begin try
    select 1/0
    end try
    begin catch
    select * from testfunction1(@test_type)
    end catch
    end
    Mudassar

  • Sql exception occurred during pl/sql upload error in custom integrator

    Hi,
    I have modified custom integrator which was working fine. I have added one column in template and the lov is working fine.
    Issue is that when i upload the file to oracle it showing error as ''sql exception occurred during pl/sql upload".
    I have tried executing the same from back end but it was working fine from back end and inserting properly in interface table.
    Kindly suggest for the issue.
    Regards,
    Gk

    Hi,
    You can get the error message in excel sheet itself by using the following piece of code.
    FND_MESSAGE.CLEAR;
    FND_MESSAGE.SET_NAME ('APPLICATION', 'APPLICATION_MESSAGE_NAME');
    FND_MESSAGE.SET_TOKEN ('ERROR_TOKEN', ERROR MESSAGE);
    FND_MESSAGE.RAISE_ERROR;
    Create an excpetion block and include the above piece of code whilde catching the exception.
    APPLICATION- The applicatio in which you create message
    APPLICATION_MESSAGE_NAME-  The message Name
    ERROR_TOKEN- You must create a token in application message
    ERROR MESSAGE- You can see the  error using SQLERRM.
    Thanks,
    Vinoop

  • EBS 12.1.1 failed during autoconfig phase of upgradation

    Hi,
    I'm in process of upgradation of ebs 11.5.9 to r12.1.1 on solaris 9. database is 9.2.0.8.
    during the upgradation phase autoconfig is failed with errors.
    ADX Database Utility
    getConnectionUsingAppsJDBCConnector() -->
    APPS_JDBC_URL='jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=YES)(FAILOVER=YES)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=scciapps)(PORT=1571)))(CONNECT_DATA=(SID=test)))'
    Trying to connect using APPS_JDBC_URL
    Exception occurred: java.sql.SQLException: ORA-01017: invalid username/password; logon denied
    Trying to get connection using SID based connect descriptor
    getConnection() -->
    sDbHost : scciapps
    sDbDomain : sharjah.gov.ae
    sDbPort : 1571
    sDbSid : test
    sDbUser : APPS
    Trying to connect using SID...
    getConnectionUsingSID() -->
    JDBC URL: jdbc:oracle:thin:@scciapps.sharjah.gov.ae:1571:test
    Exception occurred: java.sql.SQLException: ORA-01017: invalid username/password; logon denied
    Trying to connect using SID as ServiceName
    getConnectionUsingServiceName() -->
    JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=scciapps.sharjah.gov.ae)(PORT=1571))(CONNECT_DATA=(SERVICE_NAME=test)))
    Exception occurred: java.sql.SQLException: ORA-01017: invalid username/password; logon denied
    Trying to connect using SID as ServiceName.DomainName
    getConnectionUsingServiceName() -->
    JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=scciapps.sharjah.gov.ae)(PORT=1571))(CONNECT_DATA=(SERVICE_NAME=test.sharjah.gov.ae)))
    Exception occurred: java.sql.SQLException: Listener refused the connection with the following error:
    ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
    Connection could not be obtained; returning null
    where i use the same username and password of apps of existing database/application.
    anyone have idea about that...?
    Thanks,

    yes, all the values are correct.
    As I've given existing database port number, sid and server info of 11.5.9.
    below are some information from installation log.
    Oracle Applications Rapid Install Wizard Install log
    >> Using Rapid Wizard Version : 12.1.1.9
    >> Install session started : Mon Jan 31 13:35:43 GST 2011
    >> Rapid Wizard source location : /oracle/StageR12/startCD/Disk1/rapidwiz
    >> Command Line arguments for this run :
    =================================================================
    Install Session Information
    Host Name : scciapps.sharjah.gov.ae
    Host Operating System : Solaris SPARC
    User running Install : appltest
    =================================================================
    InstUpgPanel
         User action : Upgrade Oracle Applications file System
         Install type : Upgrade
    PortPanel
              Selected port pool:
                   Database Port : 1571
    ADX Database Utility
    getConnectionUsingAppsJDBCConnector() -->
    APPS_JDBC_URL='null'
    Trying to get connection using SID based connect descriptor
    getConnection() -->
    sDbHost : scciapps
    sDbDomain : sharjah.gov.ae
    sDbPort : 1571
    sDbSid : test
    sDbUser : APPS
    Trying to connect using SID...
    getConnectionUsingSID() -->
    JDBC URL: jdbc:oracle:thin:@scciapps.sharjah.gov.ae:1571:test
    Connection obtained
    but it fails during autoconfig phase.
    Thanks,

Maybe you are looking for