Convert the Sql for Oracle script

Could someone help me convert the sql script in oracle below

-- EXEC SP_smpAGENCY_MYWS_LAPSE_GET_USP_AMSurrenderMngtReport '2005','2010','09048','IL'    
ALTER PROCEDURE SP_smpAGENCY_MYWS_LAPSE_GET_USP_AMSurrenderMngtReport    
--DECLARE     
@StartYY AS VARCHAR(4),    
@EndYY AS VARCHAR(4),    
@AgentCode AS VARCHAR(9),    
@CompanyCode AS VARCHAR(4)    
    
AS    
    
DECLARE @ProfileYYYYMM AS VARCHAR(6), @SQLStr1 AS VARCHAR(8000),@SQLStr2 AS VARCHAR(8000), @SQLStr3 AS VARCHAR(8000)    
    
SET @ProfileYYYYMM = '201005'    
    
SET @SQLStr1 = ''    
    
SET @SQLStr1 = @SQLStr1 + ' DECLARE @CompAvgCount AS  DECIMAL(38,2), @CompAvgAP AS  DECIMAL(38,2), @CompInforceAP AS DECIMAL(15,2), @CompSurrenderAP AS DECIMAL(15,2), '    
SET @SQLStr1 = @SQLStr1 + ' @CompInforceCount NUMERIC, @CompSurrenderCount NUMERIC,@ALCompInforceAP AS DECIMAL(15,2), @ALCompSurrenderAP AS DECIMAL(15,2), '    
SET @SQLStr1 = @SQLStr1 + ' @ALCompInforceCount NUMERIC, @ALCompSurrenderCount NUMERIC,@ILCompInforceAP AS DECIMAL(15,2), @ILCompSurrenderAP AS DECIMAL(15,2), '    
SET @SQLStr1 = @SQLStr1 + ' @ILCompInforceCount NUMERIC, @ILCompSurrenderCount NUMERIC '    
  
SET @SQLStr1 = @SQLStr1 + ' DECLARE @tblAgentNumber TABLE '    
SET @SQLStr1 = @SQLStr1 + ' ( '    
SET @SQLStr1 = @SQLStr1 + '  [AgentName] VARCHAR(255), '    
SET @SQLStr1 = @SQLStr1 + '  [AgentNumber] VARCHAR(9), '    
SET @SQLStr1 = @SQLStr1 + '  [AgentRank] VARCHAR(10) '    
SET @SQLStr1 = @SQLStr1 + ' ) '    
  
SET @SQLStr1 = @SQLStr1 + '  DECLARE @tblmineInForce TABLE '    
SET @SQLStr1 = @SQLStr1 + ' ( '    
SET @SQLStr1 = @SQLStr1 + '  [company_code] VARCHAR(50), '    
SET @SQLStr1 = @SQLStr1 + '  [mine_policy_no] VARCHAR(50), '    
SET @SQLStr1 = @SQLStr1 + '  [Annl_premium] NUMERIC(28, 2) '    
SET @SQLStr1 = @SQLStr1 + ' ) '    
    
SET @SQLStr1 = @SQLStr1 + ' DECLARE @tblmineSurrender TABLE '   
SET @SQLStr1 = @SQLStr1 + ' ( '    
SET @SQLStr1 = @SQLStr1 + '  [company_code] VARCHAR(50), '    
SET @SQLStr1 = @SQLStr1 + '  [mine_policy_no] VARCHAR(50), '     
SET @SQLStr1 = @SQLStr1 + '  [Annl_premium] NUMERIC(28, 2) '    
SET @SQLStr1 = @SQLStr1 + ' ) '    
    
SET @SQLStr1 = @SQLStr1 + ' INSERT INTO @tblAgentNumber '    
SET @SQLStr1 = @SQLStr1 + ' SELECT AgentName, AgentNumber, AgentRank '    
SET @SQLStr1 = @SQLStr1 + ' FROM [SUMYOLAP0001].aetnaildb.dbo.agentprofile'+ @ProfileYYYYMM +' AgtProfile '    
SET @SQLStr1 = @SQLStr1 + ' WHERE (LEN(agentnumber) = 5 and (left(agentnumber,1) between ''0'' and ''8'' or left(agentnumber,1) = ''A'')) '    
SET @SQLStr1 = @SQLStr1 + ' AND (Amname not like ''%COMPANY%'' OR Amname not like ''%DIRECT%'' OR Amname not like ''%MARKETsmp%'') '    
SET @SQLStr1 = @SQLStr1 + ' AND agencynumber not in (''ILS'',''PLS'',''99999'') '    
SET @SQLStr1 = @SQLStr1 + ' AND LEFT(agencynumber,2) not in (''CD'',''DR'') AND LEFT(agencynumber,3) <> ''DIR'' '    
SET @SQLStr1 = @SQLStr1 + ' AND RIGHT(RTRIM(agencynumber),2) not in (''CD'',''DR'') AND RIGHT(RTRIM(agencynumber),3) <> ''DIR'' '    
SET @SQLStr1 = @SQLStr1 + ' AND companycode = ''IL'' '    
    
SET @SQLStr1 = @SQLStr1 + ' INSERT INTO @tblmineSurrender '    
SET @SQLStr1 = @SQLStr1 + ' SELECT company_code, mine_policy_no, Annl_premium '    
SET @SQLStr1 = @SQLStr1 + ' FROM odsmine_policy '    
IF @CompanyCode = 'All'    
BEGIN    
 SET @SQLStr1 = @SQLStr1 + ' WHERE company_code IN (''IL'',''AL'') '    
END    
ELSE    
BEGIN    
 SET @SQLStr1 = @SQLStr1 + ' WHERE company_code IN ('''+ @CompanyCode +''') '    
END    
SET @SQLStr1 = @SQLStr1 + ' AND cont_status = ''S'' '    
SET @SQLStr1 = @SQLStr1 + ' AND YEAR(effective_date) BETWEEN '+ @StartYY +' AND '+ @EndYY +' '    
    
SET @SQLStr1 = @SQLStr1 + ' SELECT @CompSurrenderCount = COUNT(1), @CompSurrenderAP = SUM(Annl_premium) '    
SET @SQLStr1 = @SQLStr1 + ' FROM @tblmineSurrender S '    
SET @SQLStr1 = @SQLStr1 + ' INNER JOIN odsagent_role R '    
SET @SQLStr1 = @SQLStr1 + ' ON S.company_code = R.company_code '    
SET @SQLStr1 = @SQLStr1 + ' AND S.mine_policy_no = R.mine_policy_no '    
SET @SQLStr1 = @SQLStr1 + ' INNER JOIN @tblAgentNumber A '    
SET @SQLStr1 = @SQLStr1 + ' ON R.servicsmpagent_code = A.AgentNumber '    
    
SET @SQLStr1 = @SQLStr1 + ' INSERT INTO @tblmineInforce '    
SET @SQLStr1 = @SQLStr1 + ' SELECT company_code, mine_policy_no, Annl_premium '    
SET @SQLStr1 = @SQLStr1 + ' FROM odsmine_policy '    
IF @CompanyCode = 'All'    
BEGIN    
 SET @SQLStr1 = @SQLStr1 + ' WHERE company_code IN (''IL'',''AL'') '    
END    
ELSE    
BEGIN    
 SET @SQLStr1 = @SQLStr1 + ' WHERE company_code IN (''' + @CompanyCode + ''') '    
END    
SET @SQLStr1 = @SQLStr1 + ' AND cont_status = ''I'' '    
SET @SQLStr1 = @SQLStr1 + ' AND YEAR(effective_date) BETWEEN '+ @StartYY +' AND '+ @EndYY +' '    
    
SET @SQLStr1 = @SQLStr1 + ' SELECT @CompInforceCount = COUNT(1), @CompInforceAP = SUM(Annl_premium) '    
SET @SQLStr1 = @SQLStr1 + ' FROM @tblmineInforce I '    
SET @SQLStr1 = @SQLStr1 + ' INNER JOIN odsagent_role R '    
SET @SQLStr1 = @SQLStr1 + ' ON I.company_code = R.company_code '    
SET @SQLStr1 = @SQLStr1 + ' AND I.mine_policy_no = R.mine_policy_no '    
SET @SQLStr1 = @SQLStr1 + ' INNER JOIN @tblAgentNumber A '    
SET @SQLStr1 = @SQLStr1 + ' ON R.servicsmpagent_code = A.AgentNumber '    
    
SET @SQLStr1 = @SQLStr1 + ' SET @CompAvgCount = ROUND(ISNULL(@CompSurrenderCount,0) * 100 / ( ISNULL(@CompSurrenderCount,0) + @CompInforceCount),2) '     
SET @SQLStr1 = @SQLStr1 + ' SET @CompAvgAP = ROUND(ISNULL(@CompSurrenderAP,0) * 100 / ( ISNULL(@CompSurrenderAP,0) + @CompInforceAP),2) '     
    
SET @SQLStr1 = @SQLStr1 + ' DECLARE @tblODSmine_Policy TABLE '    
SET @SQLStr1 = @SQLStr1 + ' ( '    
SET @SQLStr1 = @SQLStr1 + '  [AgentName] VARCHAR(255), '    
SET @SQLStr1 = @SQLStr1 + '  [AgentNumber] VARCHAR(9), '    
SET @SQLStr1 = @SQLStr1 + '  [AgentRank] VARCHAR(10), '    
SET @SQLStr1 = @SQLStr1 + '  [Company_Code] VARCHAR(4), '    
SET @SQLStr1 = @SQLStr1 + '  [mine_Policy_No] VARCHAR(10), '    
SET @SQLStr1 = @SQLStr1 + '  [Cont_Status] VARCHAR(1), '    
SET @SQLStr1 = @SQLStr1 + '  [Annl_Premium] DECIMAL(15,2), '    
SET @SQLStr1 = @SQLStr1 + '  [No_count] NUMERIC '    
SET @SQLStr1 = @SQLStr1 + ' ) '    
    
SET @SQLStr2 = 'INSERT INTO  @tblODSmine_Policy '    
SET @SQLStr2 = @SQLStr2 + ' SELECT DISTINCT AgtProfile.AgentName, AgtProfile.AgentNumber, '    
SET @SQLStr2 = @SQLStr2 + ' AgtProfile.AgentRank,mine.company_code, mine.mine_policy_no, mine.cont_status, mine.Annl_Premium, 1.0 as no_count '    
SET @SQLStr2 = @SQLStr2 + ' FROM @tblAgentNumber AgtProfile '    
SET @SQLStr2 = @SQLStr2 + ' INNER JOIN [SUMYOLAP0001].aetnaildb.dbo.COMAGH COMAGH '    
SET @SQLStr2 = @SQLStr2 + ' ON AgtProfile.AgentNumber = COMAGH.AHAGTN '    
SET @SQLStr2 = @SQLStr2 + ' AND (AHAMNO = ''' + @AgentCode + ''' OR AHUMNO = ''' + @AgentCode + ''' OR AHAGNO = ''' + @AgentCode + ''') '    
    
IF @CompanyCode = 'ALL'    
BEGIN    
 SET @SQLStr2 = @SQLStr2 + ' AND AHCO IN (''AL'',''IL'') '    
END    
ELSE    
BEGIN    
 SET @SQLStr2 = @SQLStr2 + ' AND AHCO = ''' + @CompanyCode + ''' '    
END    
    
SET @SQLStr2 = @SQLStr2 + ' INNER JOIN odsagent_role Role '    
SET @SQLStr2 = @SQLStr2 + ' ON AgtProfile.AgentNumber = Role.servicsmpagent_code '    
SET @SQLStr2 = @SQLStr2 + ' INNER JOIN odsmine_policy mine '    
SET @SQLStr2 = @SQLStr2 + ' ON Role.company_code = mine.company_code '    
SET @SQLStr2 = @SQLStr2 + ' AND Role.mine_policy_no = mine.mine_policy_no '    
SET @SQLStr2 = @SQLStr2 + ' AND mine.cont_status IN (''S'',''I'') '    
    
IF @CompanyCode = 'ALL'    
BEGIN    
 SET @SQLStr2 = @SQLStr2 + ' AND mine.company_code IN (''AL'',''IL'') '    
END    
ELSE     
BEGIN    
 SET @SQLStr2 = @SQLStr2 + ' AND mine.company_code = ''' + @CompanyCode + ''' '    
END    
    
SET @SQLStr2 = @SQLStr2 + ' AND YEAR(mine.effective_date) BETWEEN '+ @StartYY +'  AND  '+ @EndYY +' '    
    
SET @SQLStr3 = 'SELECT AgentName, AgentRank, AgentNumber, '    
SET @SQLStr3 = @SQLStr3 + ' CONVERT(INT,SUM(CASE WHEN cont_status = ''S'' THEN no_count ELSE 0 END)) AS Surrrender_Count, '    
SET @SQLStr3 = @SQLStr3 + ' CONVERT(INT,SUM(CASE WHEN cont_status = ''I'' THEN no_count ELSE 0 END)) AS InForce_Count, '    
SET @SQLStr3 = @SQLStr3 + ' SUM(CASE WHEN cont_status = ''S'' THEN Annl_premium ELSE 0 END) AS SurrenderAP, '    
SET @SQLStr3 = @SQLStr3 + ' SUM(CASE WHEN cont_status = ''I'' THEN Annl_premium ELSE 0 END) AS InForceAP, '    
SET @SQLStr3 = @SQLStr3 + ' CASE WHEN count(*) = 0 THEN 0 ELSE CONVERT(DECIMAL(38,2),(SUM(CASE WHEN cont_status = ''S'' THEN no_count ELSE 0 END) * 100 / count(*))) END AS AgtSurrenderCount, '    
SET @SQLStr3 = @SQLStr3 + ' CASE WHEN SUM(Annl_premium) = 0 THEN 0 ELSE CONVERT(DECIMAL(38,2),(SUM(CASE WHEN cont_status = ''S'' THEN Annl_premium ELSE 0 END) * 100 / SUM(Annl_premium))) END AS AgtSurrenderAP, '    
SET @SQLStr3 = @SQLStr3 + ' CONVERT(varchar(100),@CompAvgCount) AS CompAvgCount, '    
SET @SQLStr3 = @SQLStr3 + ' CONVERT(varchar(100), @CompAvgAP) AS CompAvgAP '    
SET @SQLStr3 = @SQLStr3 + ' FROM @tblODSmine_Policy '    
SET @SQLStr3 = @SQLStr3 + ' GROUP BY AgentName, AgentRank, AgentNumber '    
    
EXEC (@SQLStr1 + @SQLStr2 + @SQLStr3)    
--PRINT (@SQLStr1 + @SQLStr2 + @SQLStr3)    

Yes.

1. the scrap code.
2. get the specification of the requirements of business origin.
3. learn PL/SQL.
4. write the PL/SQL code to meet the requirements of the company.

Tags: Database

Similar Questions

  • Help me convert after the SQL Server Oracle script script

    could someone help me conversion following script in oracle script




    Create procedure Insert_profilebasicdetail
    (
    @isubprofileid as int,
    @Copyisubprofileid as int,
    @itranno as int,
    )
    As
    Begin

    Declare @IncKeyId as int
    Declare @tempkeyId as int
    Set @IncKeyId = (select isNull (Max (ikeyId), 0) as profilebasicdetail MaxKeyId)

    Declare TempInsert cursor for select ikeyId - iprofileid, iquestionid, vquestionans, cstatusindi, dmodifyon, imodifyby, iyear
    of profilebasicdetail where isubprofileid=@Copyisubprofileid and itranno=@itranno
    Open TempInsert
    the extraction of TempInsert in @tempkeyId
    While @fetch_Status = 0
    Begin

    Set @IncKeyId = @IncKeyId + 1

    Insert into profilebasicdetail
    (ikeyid, iprofileid, iquestionid, vquestionans, cstatusindi, dmodifyon, imodifyby, itranno, iyear, isubprofileid)
    values (select @IncKeyId, iprofileid, iquestionid, vquestionans, cstatusindi, dmodifyon, imodifyby, '1',
    profilebasicdetail iYear,@isubprofileid where ikeyId=@tempkeyId)

    extract the following TempInsert in @tempkeyId
    End

    End





    Kind regards
    Ajay

    You always seem to be missing the semicolon (;) in the end of your CURSOR, as Aman has pointed out in his last message.

    CURSOR TempInsert IS
      SELECT ikeyid, iprofileid,iquestionid,vquestionans,cstatusindi,dmodifyon,imodifyby,iyear
        FROM profilebasicdetail
       WHERE isubprofileid=723 and itranno=58*;*
    

    (Note that the * are simply to point out where the change needs to be done.) You don't want those in your actual code)

    Justin

  • transfer of data from the sql for oracle server

    Can we use the tools datapumps or oracle exp in oracle to transfer data from oracle to sql server database? Is it possible to do through the use of these tools expdp or exp in oracle. Create oracle dump files and import them to sql server?
    I know there are third-party tools for the same. but I'm just curious?

    No, these tools cannot be used for the transfer of data from oracle to sql server. The two write files in an oracle proprietary format, that they not fixed data or sql scripits files.

  • Convert or map Typedonnees decimal Transact-SQL for Oracle Number data type?

    MSSQL 2005
    Oracle 10.2 g

    In a MSSQL table, I have a column with the data type set on (decimal (1.0), null) with the values of line-1. (695 lines in total)

    In the Oracle table, the proposed mapped column is a number data type. When I import data, I received 695 errors with the message "invalid value for the field. How to properly convert or map Decimal (MSSQL) Transact-SQL for Oracle Number data type for a negative value?

    Thank you.

    How do you load data into Oracle? What tool or programming language you are using? Can you post something cause what you stated in your post should work, but there may be some ODBC, or other type of conversion factors to be taken into account.

     > create table t1 (field1  number(1,0));
    
    Table created.
    
     > insert into t1 values (-1);
    
    1 row created.
    
    UT1 > select * from t1;
    
        FIELD1
    ----------
            -1
    

    HTH - Mark D Powell.

  • Need name of the API to create the hierarchy of the Organization for Oracle HRMS

    Hi all



    (1) name of the API need to create the hierarchy of the Organization for Oracle HRMS

    (2) in the form of the Organization, we have added the Classification, 'HR'.
    When we press 'Costing Information' is displayed.
    We need to download this Information of costs in the body through the API.
    Which API should we used?

    This is urgent.
    Any help in that regard will be highly appreciated

    Thank you

    Hi, Ahmed.

    You can find all the APIs here-
    http://irep11i10.Oracle.com

    Hierarchy of org-
    http://irep11i10.oracle.com/OA_HTML/OA.jsp?page=/oracle/apps/fnd/rep/webui/InterfaceListPG&BusinessEntity=PER_ORGANIZATION_HIERARCHY&Title=Organization+Hierarchy&retainAM=Y&_ti=2010961940&oapc=7&selection=11_1_62_&oas=s6j2chTrx3F6QeAofgAR-Q..

    To check information of costs - create the organization information (information of costs goes into HR_Organization_Information table, just check for the correct contexts)
    http://irep11i10.Oracle.com/OA_HTML/OA.jsp?page=/Oracle/Apps/FND/Rep/WebUI/PLSQLInterfaceDetailsPG&CategoryValue=F&_tI=2010961940&retainAM=Y&addBreadCrumb=Y&OAPC=16&OAS=rEOv_-poEcBvZjTjyrCnXw...

    http://irep11i10.oracle.com/OA_HTML/OA.jsp?page=/oracle/apps/fnd/rep/webui/InterfaceListPG&BusinessEntity=HR_ORGANIZATION&Title=HRMS+Organization&retainAM=Y&_ti=2010961940&selection=11_1_49_&oapc=28&oas=Ns8RX2ZaTcv6y_BMwx0d7Q..

    Hope that helps.

    If the links above do not work. Try to copy - paste the full URL in a new window. It should work.

    See you soon,.
    Vigneswar ben ahmed

    PS: You can also try loading. The free version should suffice. And it is a wonderful tool.
    http://www.dataLoad.com/downloads/index.html

  • How to insert the HTML for Oracle Portal

    I want to insert the HTML for Oracle Portal to insert a gif, buttons, animations, flash content, how can I do?

    Thank you

    Many ways:
    -use html portlet or dynamic page on your pages

  • Can we remove a rdf model using the Jena for Oracle adapter?

    Hello

    I use the adapter for Oracle Jena API, using java. I want to remove the database model when ever needed. Is it possible to delete the database template.

    GOS GraphOracleSem = new GraphOracleSem (oracle, modelName);
    MOS ModelOracleSem = new ModelOracleSem (gos);
    mos.removeAll ();

    This code removes the model data do not remove the model. Can we delete all of the data model. Any help?

    Thank you
    KKS

    Hello

    In the latest version of the adapter of Jena, there is a dropSemanticModel API in the oracle.spatial.rdf.client.jena.OracleUtils class.
    It is a static method. The settings are simple.

    See you soon,.

    Zhe Wu

  • Covert SybaseIQ SQL for Oracle

    Hi all

    Can come a help me next secret SybaseIQ SQL for Oracle.

    Select
    t.Sales_rep_id as sales_rep_id
    CASE when
    length (if t.market_id is null then "endif) = 0 or t.market_id is null
    then 0 otherwise cast (t.market_id as integer) end UP as market_id
    "TENDER" as feature_category
    null as is_override_tax_exempt
    null as audit_entered_by_user of ODS. POS_ODS_TENDER t;

    Thank you

    user2281943 wrote:
    Hi all

    Can come a help me next secret SybaseIQ SQL for Oracle.

    Select
    t.Sales_rep_id as sales_rep_id
    CASE when
    length (if t.market_id is null then "endif) = 0 or t.market_id is null
    then 0 otherwise cast (t.market_id as integer) end UP as market_id
    "TENDER" as feature_category
    null as is_override_tax_exempt
    null as audit_entered_by_user of ODS. POS_ODS_TENDER t;

    Thank you

    Try this

    select t.Sales_rep_id as sales_rep_id
           , CASE when length(decode(t.market_id,null,'')) = 0 or t.market_id is null
                  then 0
                  else to_number(t.market_id)
             END as market_id
           , 'TENDER' as feature_category
           , null as is_override_tax_exempt
           , null as audit_entered_by_user
      from ODS.POS_ODS_TENDER t;
    
  • Where the SQL Scripts running after the installation of the ODAC for Oracle Client?

    I just installed ODAC for Oracle Client on a windows server that runs a database of sql server, allowing developers to connect to a web application to an Oracle/Unix database. The installation States to run SQL scripts, located in the $ORACLE_HOME\ASP.NET\SQL directory after installation. I don't know where to run them? On the ORACLE DB on the Unix server? If someone could let me know, I'd appreciate it. Thank you.

    You must run on the Oracle database server, but they are necessary only if you use Oracle for ASP.NET providers.

    If you just install the software, so you can use OLEDB with SQL Server linked server, for example, you don't need them. What do you need to run although if this is the case is the oramtsadmin.sql script that creates the objects used by the Oracle MTS Recovery Service (if you do not have these objects created on the database) that SQL Server uses a distributed transaction for Oracle connections I think.

    It will be useful,
    Greg

  • Convert the SQL query to Oracle

    Hi all

    I have two SQL queries to create the table.

    Query1.

    CREATE TABLE [dbo]. [DocumentType] (
    [DocType] [varchar] (20) GATHER SQL_Latin1_General_CP1_CI_AS NOT NULL,.
    [SubCat] [varchar] (20) GATHER SQL_Latin1_General_CP1_CI_AS NOT NULL
    ) ON [PRIMARY]
    GO
    ALTER TABLE [dbo]. [DocumentType] ADD
    CONSTRAINT [PK_DocumentType] PRIMARY KEY CLUSTER
    (
    [DocType],
    [SubCat]) ON [PRIMARY]


    Query2.

    CREATE TABLE [dbo]. [SBU] (
    [SBU] [varchar] (51) GATHER SQL_Latin1_General_CP1_CI_AS NOT NULL
    ) ON [PRIMARY]
    GO
    ALTER TABLE [dbo]. [SBU] ADD
    [PK_SBU] CLUSTERED PRIMARY KEY CONSTRAINT
    (
    [SBU]
    ) ON [PRIMARY]

    What will be the query in Oracle?

    Please suggest!
    Kind regards
    Shah

    Query1.

    CREATE TABLE dbo. DocumentType)
    DocType varchar2 (20) NOT NULL,
    SubCat varchar (20) NOT NULL,
    CONSTRAINT PK_DocumentType PRIMARY KEY (DocType, SubCat)
    )
    /

    Query2.

    CREATE TABLE dbo. SBU)
    SBU varchar2 (51),
    CONSTRAINT PK_SBU PRIMARY KEY (UDF)
    )
    /

    It is useful for you?

    Published by: insa on June 12, 2012 22:42

  • convert DB2008 SQL express oracle 12 c by sql developer

    Hi friends,

    I created a SQL 2008 declare for the prod database. I run OMWB_OFFLINE_CAPTURE and receive an ocp source file complete

    Transform ocp Oracle express12c sql developer (3.2.20.10) but failed with error DB

    oracle.dbtools.metadata.persistence.PersistenceException: ORA-06550: line 1, column 14: PLS-00201: identifier ' MIGRATION. GATHERCONNECTIONSTATS' must be declared ORA-06550: line 1, column 7: PL/SQL: statement ignored

    Research on the basis and the migrated tables revised, I found that I only migrated system SQL sql objects and does not see any user with dbo SQL prefix object

    OMWB_OFFLINE_CAPTURE test its backsql P@$$w0rd1234

    The SQL server database was generated by s a software vendor and we know not what user has application data.

    How can I get sql tables dbo server in ocp for the migration file.

    Thank you

    newdba

    Hello

    I ran a test on my system using SQL * 3.2 Developer and don't see the problem you have.

    Can I check what you have done and the steps to follow?

    1. you have generated the ocp in the menu - Tools - Migration file - Create Database capture Scripts

    2. after the execution of OMWB_OFFLINE_CAPTURE you see 2 directories under the directory chosen for migration?

    You should see - 2 directories - 'master' and 'backsql.

    3. in the migration wizard.

    Tools - Migration - migration

    for the 'Source' database, you chose "offline" and then the file .ocp is generated - sqlserver2008.ocp

    4. in the next screen "Capture" you shoud see the database "backsql" in the column "databases selected. If it of in "Databases" then move it across.

    If that's what you see migration should precede as planned.

    5. in the next screen - target database - choose "offline" and check the generated scripts.

    They should contain instructions create for all objects in the database 'backsql.

    If this isn't what you see then please detail the exact measurements you have taken.

    Kind regards

    Mike

  • Call the SQL of a script problem

    Hello
    I have a script for example query.sh:
    #! / bin/sh
    sqlplus-s ${ORACLE_USER} < < HIC
    set the position
    NewPage set to none

    SELECT 'ALTER TABLE' |' TEST_TABLE' | 'ADD PARTITION' |' P' | To_char (trunc (sysdate + 7), "IYYY"). » W'|| To_char (trunc (sysdate + 7), 'IW') | ' VALUES LESS (TO_DATE('''||) To_char (sysdate + 14, 'YYYYMMDD') | " ((', "YYYYMMDD")); "FROM DUAL;
    output
    HIC

    This will actually give me: ALTER TABLE TEST_TABLE add PARTITION P2010W46 VALUES LESS THAN (TO_DATE('20101122','yyyymmdd'));

    I'll do this output of the second script. for example create_part.sh

    #! / bin/sh

    SQL='/home/Bill/scripts/query.sh'

    sqlplus ${ORACLE_USER} < < EOF
    Set serveroutput size 1000000
    set the position

    $SQL

    output
    FO %


    When I run the 2nd script I get:

    SQL > SQL > SQL > SQL 2 > ALTER TABLE test_table add a SCORE from P2010W46 LESS THAN VALUES (TO_DATE ('20101122 ',' yyy))
    *
    ERROR on line 1:
    ORA-01861: literal does not match the format string

    I suspect that the output of the 1st script encapsulates a second line, and it defective runs correctly.

    East of Oracle 9i

    Please suggest a way to overcome this problem.

    Thank you in advance.

    In the first script, add the VALUE LINESIZE 1000

  • Path of the environments for Oracle EBS (Profile)

    I have a question about setting up my profile for Oracle EBS. I just installed Oracle EBS on 2 nodes. Now I have to run the commands manually instead of being able to type them on the command line. An example:

    Instead of typing adstpall.sh, I have to do $ADMIN_SCRIPTS_HOME/adstpall.sh.

    Also with the automatic configuration service. I have to go on the dbTier in $ORACLE_HOME/appsutil/bin and run adconfig.sh and I have to go on the appsTier in $INST_TOP/admin/scripts and run adautocfg.sh but I want to be able to type adautocfg.sh anywhere and it will work

    There are also things as adpatch and adadmin, etc., I want to be able to run

    I don't know that there are several environment files in Oracle EBS. Anyone can guide me please to put up my profile so that I can use one of these commands from anywhere in the file system. I've never had to do before. I know they have to be in my .bash_profile, but I don't know what should go and what should not go. Please help me in this regard.

    Thank you

    -Change the .bash_profile

    -Add the following entry to the file:

    source /APPS Nom_du_contexte > .env

    Or,

    . /Apps Nom_du_contexte > .env - there's a point before the script

    -Save the file

    -Connect again as the operating system

    -Issue "env | ranking"to check

    Thank you

    Hussein

  • ODI 12 - problem with LKM SQL for Oracle

    Hi again,

    Three days ago, that I asked about the problem with the data types of data warehouses in models that were missing. After you apply the ideas suggested by Rita (thank you very much ) I got from their work.

    But after that, we came across a new problem. When you run a mapping (Oracle for Oracle databases), it failed on the second stage - ' "work table create. "When we checked the generated code was something like this: '(" CREATE TABLE < work_table_name >). None of the names of columns or data types have been described in parentheses and as expected, the ODI execution error was "invalid identifier". It seems that API odiRef.getColList(params)%> does not work. I tried loading using LKM Oracle Oracle (DB LINK) but once again the columns are missing in the generated script.

    I have to mention the master and work repositories are different databases from Oracle and ODI Agent is not installed because of some problems.

    We are still beginners of ODI and would appreciate any help from more experienced guy (or other beginners).

    Thank you in advance.

    Just by chance, we found the soluton today!

    The reason of missing generated code was that the description of the types of data was not entirely cofigured.

    We found that the fields "create table syntax" and "'syntax of data accessible in writing' in each type of data in the topology definition were empty." After filling them, the generation of the script is running properly.

    Before that we had problems with missing data types in models and we realized the reverse engineering of the types of data, but obviously it is insufficient.

    Thanks to all those who participated in the discussion and tried to help us!

  • 1.5.4 - slow to expand the tables for oracle 9 connection

    Hello

    I have tried version 1.5.4 and have found that in developing the node tables in the Connections tab is extremely slow (about 3 min) for my oracle 9.2.0.6 connections.

    As with this [this bug: http://forums.oracle.com/forums/thread.jspa?threadID=867600 & tstart = 0] it's ok on a 10.2.0.3 connection.

    Expand the tables for the same connection in 1.5.3 is good too. I'm concerned that this latest version of the sql dev was not particularly well tested with oracle 9 abit.

    Oracle 9 is still a supported with sql developer version?

    Thank you
    Paul

    This issue is dealt with the last patch, ' check for update ' should take care of everything.

Maybe you are looking for

  • After the IOS update, get "itunes can not connet to."

    After IOS update, get "iTunes can not connect to the iPhone because of an invalid response by the device" help?

  • Finder in El Capitan

    Hello I've just upgraded to El Capitan. Previously in the Finder there is a folder on the left, under the blows of heart, for the photos. This has now disappeared and the only way to see my photos in Finder is under all my files, where they are scatt

  • Load status?

    How do you know when your SD Connect Wireless Stick is fully charged?  Fixed Orange indicates charge so that indicates the load? Thank you

  • Problems installing of printer 1022n w / Windows 7 Enterprise

    My workplace has climbed to Windows 7 Enterprise (64-bit), and I'm currently not able to use my HP 1022n printer. I found the site to download the driver 1022n, but to halfway through the installation process I get an error message that the driver is

  • I can't connect my hotmail account. I tried to contact hotmail but I ran across a loop hole

    I tried to contact hotmail months now but I'm running loop holes and fortunately I got this site. I can't go to my hotmail account, it says: I signed in too many times or I signed to use thanks to an organization. could you please help me. I changed