Capture PL/SQL Error Raised from API

I am trying to call a PL/SQL API (apps.ota_tdb_api_ins2.create_enrollment)
I use an OADBTransaction inside my AM and a CallableStatement to call the proc.
When the user passes in an invalid parameter, the procedure uses fnd_message.set_name, fnd_message.set_token and fnd_message.raise_error inside it's exception handler.
After doing research, it seems I am to use OAExceptionUtils.checkErrors method to raise a nicely formatted OAException.
However, CallableStatement.execute() call fails and raises a SQLException before I can use the fnd_message.raise_error method
When I throw OAException.wrapperException(SQLException) - It raises the error to the OA page, but the error message is not user friendly.
What am I doing wrong?

I am trying to call a PL/SQL API (apps.ota_tdb_api_ins2.create_enrollment)
I use an OADBTransaction inside my AM and a CallableStatement to call the proc.
When the user passes in an invalid parameter, the procedure uses fnd_message.set_name, fnd_message.set_token and fnd_message.raise_error inside it's exception handler.
After doing research, it seems I am to use OAExceptionUtils.checkErrors method to raise a nicely formatted OAException.
However, CallableStatement.execute() call fails and raises a SQLException before I can use the fnd_message.raise_error method
When I throw OAException.wrapperException(SQLException) - It raises the error to the OA page, but the error message is not user friendly.
What am I doing wrong?

Similar Messages

  • Error Messages from API

    How can i get error Messages generated from API ?
    Or could anyone specify which is the table for Specific API errors ?
    API Runs successfully.
    l_return_status : U
    l_errorcode:
    l_msg_count: 11
    All 3 variables above are API's OUT variables.

    Hi Swapnesh,
    The status of 'U' indicates Unexpected Error; 'S' indicates Success, while 'E' indicates Error.
    A typical API returns the messages as a stack, which needs to be retrieved using calls to FND_MSG_PUB.GET(). If there are more than one messages on the stack, you need to loop around and retrieve each of them - to identify the root problem.
    You can use code snippet such as the following to retrieve the error messages, if any, returned by the API.
    FUNCTION fn_get_api_errors (v_api_name VARCHAR2, v_msg_count NUMBER) return VARCHAR2 is
    v_exit_msg     VARCHAR2(4000);
    v_count      NUMBER;
    v_msg          VARCHAR2(4000);
    BEGIN
    IF v_msg_count = 1 THEN
    v_exit_msg := fnd_msg_pub.get(p_msg_index => 1, p_encoded => fnd_api.g_false);
    ELSIF v_msg_count > 1 THEN
    v_count := 0;
    LOOP
    v_count := v_count + 1;
    v_msg := fnd_msg_pub.get(p_msg_index =>fnd_msg_pub.g_next,p_encoded => fnd_api.g_false);
    IF v_count = 1 THEN
    v_exit_msg := v_msg;
    ELSIF v_count > 1 THEN
    v_exit_msg := v_exit_msg || ', ' || v_msg;
    END IF;
    IF v_msg IS NULL THEN
    EXIT;
    END IF;
    END LOOP;
    END IF;
    RETURN v_exit_msg;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    v_exit_msg := 'Error in '|| v_api_name || SQLERRM ;
    RETURN v_exit_msg;
    WHEN OTHERS THEN
    v_exit_msg := 'Error in '|| v_api_name || SQLERRM ;
    RETURN v_exit_msg;
    END fn_get_api_errors ;
    Rgds,
    Rakesh

  • PL/SQL errors upgrading from 8i to 10g

    I have a number of packages and functions that were created before my time on oracle 8i that work great there, however I am trying to upgrade the database to Oracle 10G and most all of the packages and functions are now invalid.
    Here is an example
    Line # = 4 Column # = 1 Error Text = PL/SQL: SQL Statement ignored
    Line # = 22 Column # = 18 Error Text = PL/SQL: ORA-00942: table or view does not exist
    This is TBORGESON.STVM_PRESHIPTOPRESHIPTRANS
    (The_Date in date)
    AS
    Begin
    Insert Into Aswihart.PreshipTrans SELECT a.ID, a.WorkOrderType, a.WorkOrderBaseID,
    a.WorkOrderLotID , a.WorkOrderSplitID, a.WorkOrderSubID, a.CustomerID, a.MWPartNumber,
    a.CustomerPartNumber, a.CustomerOrderNumber, a.CustomerOrderLineNumber,
    a.PurchaseOrderNumber, a.CustomerName, a.CustomerAddr1, a.CustomerAddr2,
    a.CustomerAddr3, a.CustomerCity, a.CustomerState, a.CustomerZipCode,
    a.CustomerCountry, a.CustomerShowAddr1, a.CustomerShowAddr2, a.CustomerShowAddr3,
    a.CustomerShowAddr4, a.CustomerShowAddr5, a.BillToName, a.BillToAddr1, a.BillToAddr2,
    a.BillToAddr3, a.BillToCity, a.BillToState, a.BillToZipCode, a.BillToCountry,
    a.BillToShowAddr1, a.BillToShowAddr2, a.BillToShowAddr3, a.BillToShowAddr4, a.BillToShowAddr5,
    a.DesiredQuantity, a.WantDate, a.QuantityShipped, a.ShipDate, a.NetWeight, a.GrossWeight,
    a.AddWeight, a.CalcWeight, a.Territory, a.Unit, a.Price, a.OrderDate, a.RevisionNumber,
    a.ShipVia, a.Packages, a.PackingSlip, a.LotNumber, a.Description, a.BillOfLading,
    a.ShippingInstructions, a.ShippingInstructions2,
    a.ToBeBilled, a.IsInvoiced, a.UnitPrice, a.CurrentDate, a.Class, a.ProductCode,
    UPPER(NVL(StockLocation,'SHIPPING')) AS location, a.Salesman,
    a.Worksheet, a.Certification, a.Status, a.Initials, a.ProductQuantity, a.StockQuantity,
    a.Plant2, a.SCAC, a.NoCont, a.ContType, a.NoSP, a.QuantitySP, a.BarSerial, a.ASN,
    a.Tare, a.APW, a.Sample, a.ACT, a.ConsPt, a.UserName, a.CurrentTime, a.LocationCode, a.ProductInStock, a.SpecialPacking, a.SpecialPackingInstructions, a.BarCodeFormat, a.CarrierCode, a.DockNumber, a.SupplierCode, a.ModelYear, a.MaterialIssuer, a.PoolPoint, a.PoolPointAddress, a.EDIAccumShipQty, 'FG' AS Warehouse
    FROM aswihart.preship a WHERE (((a.QuantityShipped)>0) AND (a.ShipDate <= The_Date) AND (ltrim(rtrim(a.packingslip)) is not null) AND ((a.ToBeBilled)='Y') AND ((a.IsInvoiced)='N'));
    end;
    I’m not sure what needs changed to get this to work. The table aswihart.preship definitely does exist, in a different schema in the same database.
    Doug Hatfield
    Information Systems Manager
    Mathew-Warren Spring Division
    (574) 722-8397
    [email protected]

    Hi,
    you need to grant rights from the owner of the table to the user who ownes the package. In 10g some roles have less rights, so this lost the user rights on the table. So start to make a grant select and insert on the table:
    grant select,insert on preship to TBORGESON;See if this helps and get more compiled packages.
    Herald ten Dam
    htendam.wordpress.com

  • Error message from Application Server

    Hi All,
    Is it possible to capture a descriptive error message from the Application server when we try to transfer a file from SAP and it does not get written to the application server.
    I know it is possible to catch the standard catchable runtime exceptions, but I also would like to know if the file transfer fails in any other conditions which do not result in runtime dumps, nevertheless I should be able to get the error message.
    Thanks in advance,

    hi,
    it is not possible to find the run time errors in application server while writing the file.using sy-subrc only we can find out. where it is writing correctly like this.
    we can see all the application server files in this Tcode: AL11

  • How do you capture real detail of sql errors in crystal viewer of CR2008

    How do you captue the further details of an sql error when running a report in Crystal 2008 viewer (within a software application)? I get a 'failed to retrieve data from database. Details: Database Vendor Code: -nnnn' error where nnn is a number like 210074. If I run the same .rpt directly thru crystal I get a failed to retrive rowset. Then after choosing ok on that message  I get another message with more details and this time (in this particular case) it happens to be 'Column XXXXX cannot be found in database or is not specified for query. Other times it could be something about excedding max length/precison, etc..
    We recently switched from using the RDC CR10 to this new .net viewer way. With the RDC it gave us the 'meaningful" message so we could tell what was wrong. Using this new method it does not. Is there a setting for showing more detail or some coding that would give me the real message detail using cr2008?
    Don't know if it matters but in this case it is a Progress database.

    Hello,
    Back in the RDC days we manually added a lot of code to capture the exception info. When CR was re-written in 9 we removed all custom "fixes" and error handling, we basically said any ANSII 92 standards rule apply. We just pass what the client gives us.
    What this means is we dynamically pass the exception from the client to CR and interpret what we can or we simply pass the error code to the error UI.
    What you can do is to use a try/catch block and create your own error table according to Progress Error codes to pass on a more meaningful message to your users.
    We won't due to the vast amount of errors possible and the vast amount of DB clients we would have to maintain. If the client doesn't pass meaningful info onto CR then we just pass it's error onto the the end user.
    Thank you
    Don

  • Capturing Runtime Error Messages From ODI (Sunopsis) Operator

    Hi
    I have following question
    1) I want to capture error message of an activity that has failed during execution
    I have created a variable and used following query to capture it
    select T.TXT
    from <%=odiRef.getObjectName("L","SNP_EXP_TXT","D")%> T,
    <%=odiRef.getObjectName("L","SNP_STEP_LOG","D")%> S
    where S.SESS_NO = <%=odiRef.getSession("SESS_NO")%>
    and S.I_TXT_STEP_MESS = T.I_TXT
    order by T.TXT_ORD asc
    unfortunatly am not getting entire error message ,instead am getting first row of the error from SNP_EXP_TXT table.How to get entire error message in a variable.
    2) How can we know scenario name if we know session number?
    Please provide your inputs
    Thanks
    Baji

    Hi,
    Don't use this query, it won't work.
    Use the API GetPrevStepLog, it is simple and better...
    Take a look at:
    Use the http://www.oracle.com/technology/products/oracle-data-integrator/10.1.3/htdocs/documentation/oracledi_api_reference.pdf
    For the session name, just use getSession() Method ( too is at the pdf)
    I hope be helpful.
    Cezar
    Edited by: Cezar Santos on 21/11/2008 09:16

  • Capturing Application Error log from SXMB_Moni

    Hi,
    I wanted to capture the error information from Application error log from ECC sxmb_moni and forward that as email alert.
    We have already alert configuration in place with alert category using standard variables. Was wondering if I have to capture application error log from sxmb_moni what would be steps involved. Please let me know if anybody has worked on this and appreciate your help on this.
    Sample Error message from sxmb_moni of ECC system
    MT_Fault
    Error in Application System
    Detailed Information
    Process Order invalid
    Thanks
    Selvam
    Edited by: Selvam_muthu on Jun 23, 2011 5:40 PM

    Hi Selvam,
    As the exception is raised in ECC system, alert cannot be trigger, alert will get trigger when there is a error in PI system. To raise a email, write additional code in ECC to trigger the e-mail with proper error content

  • [Error] Microsoft SQL Server 2008 Setup. Error reading from file msdbdata.mdf

    Hi all
    I'm trying to install SQL 2008 Express on my Computer: Hp compact DX7300 Slim tower.
    and get this error:
    TITLE: Microsoft SQL Server 2008 Setup
    The following error has occurred:Error reading from file d:\8268cd7b247d294de359c9\x86\setup\sql_engine_core_inst_msi\PFiles\SqlServr\MSSQL.X\MSSQL\Binn\Template\msdbdata.mdf.  Verify that the file exists and that you can access it.
    Click 'Retry' to retry the failed action, or click 'Cancel' to cancel this action and continue setup.
    For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=10.0.1823.0&EvtType=0xF45F6601%25401201%25401
    Log file
    Overall summary:
      Final result:                  SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then rerun SQL Server Setup.
      Exit code (Decimal):           -2068643839
      Exit facility code:            1203
      Exit error code:               1
      Exit message:                  SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then rerun SQL Server Setup.
      Start time:                    2014-12-09 23:22:03
      End time:                      2014-12-09 23:40:28
      Requested action:              Install
      Log with failure:              C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20141209_232121\sql_engine_core_inst_Cpu32_1.log
      Exception help link:           http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=10.0.1823.0
    Machine Properties:
      Machine name:                  VISTA-PC
      Machine processor count:       2
      OS version:                    Windows Vista
      OS service pack:               Service Pack 1
      OS region:                     United States
      OS language:                   English (United States)
      OS architecture:               x86
      Process architecture:          32 Bit
      OS clustered:                  No
    Product features discovered:
      Product              Instance             Instance ID                    Feature                
                     Language             Edition              Version         Clustered 
    Package properties:
      Description:                   SQL Server Database Services 2008
      SQLProductFamilyCode:          {628F8F38-600E-493D-9946-F4178F20A8A9}
      ProductName:                   SQL2008
      Type:                          RTM
      Version:                       10
      SPLevel:                       0
      Installation location:         d:\8268cd7b247d294de359c9\x86\setup\
      Installation edition:          EXPRESS
    User Input Settings:
      ACTION:                        Install
      ADDCURRENTUSERASSQLADMIN:      False
      AGTSVCACCOUNT:                 NT AUTHORITY\NETWORK SERVICE
      AGTSVCPASSWORD:                *****
      AGTSVCSTARTUPTYPE:             Disabled
      ASBACKUPDIR:                   Backup
      ASCOLLATION:                   Latin1_General_CI_AS
      ASCONFIGDIR:                   Config
      ASDATADIR:                     Data
      ASDOMAINGROUP:                 <empty>
      ASLOGDIR:                      Log
      ASPROVIDERMSOLAP:              1
      ASSVCACCOUNT:                  <empty>
      ASSVCPASSWORD:                 *****
      ASSVCSTARTUPTYPE:              Automatic
      ASSYSADMINACCOUNTS:            <empty>
      ASTEMPDIR:                     Temp
      BROWSERSVCSTARTUPTYPE:         Disabled
      CONFIGURATIONFILE:             C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20141209_232121\ConfigurationFile.ini
      ENABLERANU:                    True
      ERRORREPORTING:                False
      FEATURES:                      SQLENGINE,REPLICATION
      FILESTREAMLEVEL:               0
      FILESTREAMSHARENAME:           <empty>
      FTSVCACCOUNT:                  <empty>
      FTSVCPASSWORD:                 *****
      HELP:                          False
      INDICATEPROGRESS:              False
      INSTALLSHAREDDIR:              C:\Program Files\Microsoft SQL Server\
      INSTALLSHAREDWOWDIR:           C:\Program Files\Microsoft SQL Server\
      INSTALLSQLDATADIR:             <empty>
      INSTANCEDIR:                   C:\Program Files\Microsoft SQL Server\
      INSTANCEID:                    SQLExpress
      INSTANCENAME:                  SQLEXPRESS
      ISSVCACCOUNT:                  NT AUTHORITY\NetworkService
      ISSVCPASSWORD:                 *****
      ISSVCSTARTUPTYPE:              Automatic
      MEDIASOURCE:                   d:\8268cd7b247d294de359c9\
      NPENABLED:                     0
      PID:                           *****
      QUIET:                         False
      QUIETSIMPLE:                   False
      RSINSTALLMODE:                 FilesOnlyMode
      RSSVCACCOUNT:                  <empty>
      RSSVCPASSWORD:                 *****
      RSSVCSTARTUPTYPE:              Automatic
      SAPWD:                         *****
      SECURITYMODE:                  <empty>
      SQLBACKUPDIR:                  <empty>
      SQLCOLLATION:                  SQL_Latin1_General_CP1_CI_AS
      SQLSVCACCOUNT:                 NT AUTHORITY\NETWORK SERVICE
      SQLSVCPASSWORD:                *****
      SQLSVCSTARTUPTYPE:             Automatic
      SQLSYSADMINACCOUNTS:           VISTA-PC\VISTA
      SQLTEMPDBDIR:                  <empty>
      SQLTEMPDBLOGDIR:               <empty>
      SQLUSERDBDIR:                  <empty>
      SQLUSERDBLOGDIR:               <empty>
      SQMREPORTING:                  False
      TCPENABLED:                    0
      X86:                           False
      Configuration file:            C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20141209_232121\ConfigurationFile.ini
    Detailed results:
      Feature:                       Database Engine Services
      Status:                        Failed: see logs for details
      MSI status:                    Passed
      Configuration status:          Passed
      Feature:                       SQL Server Replication
      Status:                        Failed: see logs for details
      MSI status:                    Passed
      Configuration status:          Passed
    Rules with failures:
    Global rules:
    Scenario specific rules:
    Rules report file:               C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20141209_232121\SystemConfigurationCheck_Report.htm
    I will very appriciate if someone can help me solve it. I was trying to set Full control for my account in Properties/Security of root folder and try again but error is still.
    Many thanks

    Hi Foreverduy,
    Before you run SQL Server 2008 express setup, make sure that you have installed Windows installer 4.5 and.NET Framework 3.5 SP1 manually. For more information about the process, please refer to the article:
    http://msdn.microsoft.com/en-us/library/ms143506(v=sql.100).aspx. Moreover, please turn off all the third-party softwares which could prohibit the installation process.
    According to your error message, the issue could be due to that your account has no rights to install SQL Server, or the corruption on the media.
    Firstly, please ensure that your account has admin rights. Also make sure that you right-click the setup.exe and choose “Run as administrator” to complete the installation.
    Secondly, please check if "msdbdata.mdf" file exists at d:\8268cd7b247d294de359c9\x86\setup\sql_engine_core_inst_msi\PFiles\SqlServr\MSSQL.X\MSSQL\Binn\Template. If it exists, please make sure that your account has read permission to the extracted
    folder.
    However, if the file doesn't exist in the extraction, the media could be corrupt. Please download the
    media
    again and check if the issue still occurs.
    Regards,
    Michelle Li

  • Msg 8631 Internal error: Server stack limit has been reached on SQL Server 2012 from T-SQL script that runs on SQL Server 2008 R2

    I have an Script mostly that is generated by SSMS which works with-out issue on SQL Server 2008, but when I attempt to run it on a new fresh install of SQL Server 2012 I get an Msg 8631. Internal error: Server stack limit has been reached. Please look for
    potentially deep nesting in your query, and try to simplify it.
    The script itself doesn't seem to be all that deep or nested.  The script is large 2600 lines and when I remove the bulk of the 2600 lines, it does run on SQL Server 2012.  I'm just really baffled why something that SQL Server generated with very
    few additions/changes AND that WORKS without issue in SQL Server 2008 R2 would suddenly be invalid in SQL Server 2012
    I need to know why my script which is working great on our current SQL Server 2008 R2 servers suddenly fails and won't run on an new SQL Server 2012 server.  This script is used to create 'bulk' Replications on a large number of DBs saving a tremendous
    amount of our time doing it the manual way.
    Below is an 'condensed' version of the script which fails.  I have removed around 2550 lines of specific sp_addarticle statements which are mostly just copy and pasted from what SQL Management Studio 'scripted' for me went I when through the Replication
    Wizard and told it to save to script.
    declare @dbname varchar(MAX), @SQL nvarchar(MAX)
    declare c_dblist cursor for
    select name from sys.databases WHERE name like 'dbone[_]%' order by name;
    open c_dblist
    fetch next from c_dblist into @dbname
    while @@fetch_status = 0
    begin
    print @dbname
    SET @SQL = 'DECLARE @dbname NVARCHAR(MAX); SET @dbname = ''' + @dbname + ''';
    use ['+@dbname+']
    exec sp_replicationdboption @dbname = N'''+@dbname+''', @optname = N''publish'', @value = N''true''
    use ['+@dbname+']
    exec ['+@dbname+'].sys.sp_addlogreader_agent @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1, @job_name = null
    -- Adding the transactional publication
    use ['+@dbname+']
    exec sp_addpublication @publication = N'''+@dbname+' Replication'', @description = N''Transactional publication of database
    '''''+@dbname+''''' from Publisher ''''MSSQLSRV\INSTANCE''''.'', @sync_method = N''concurrent'', @retention = 0, @allow_push = N''true'', @allow_pull = N''true'', @allow_anonymous = N''false'', @enabled_for_internet
    = N''false'', @snapshot_in_defaultfolder = N''true'', @compress_snapshot = N''false'', @ftp_port = 21, @allow_subscription_copy = N''false'', @add_to_active_directory = N''false'', @repl_freq = N''continuous'', @status = N''active'', @independent_agent = N''true'',
    @immediate_sync = N''true'', @allow_sync_tran = N''false'', @allow_queued_tran = N''false'', @allow_dts = N''false'', @replicate_ddl = 1, @allow_initialize_from_backup = N''true'', @enabled_for_p2p = N''false'', @enabled_for_het_sub = N''false''
    exec sp_addpublication_snapshot @publication = N'''+@dbname+' Replication'', @frequency_type = 1, @frequency_interval = 1, @frequency_relative_interval = 1, @frequency_recurrence_factor = 0, @frequency_subday = 8,
    @frequency_subday_interval = 1, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 0, @active_end_date = 0, @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1
    -- There are around 2400 lines roughly the same as this only difference is the tablename repeated below this one
    use ['+@dbname+']
    exec sp_addarticle @publication = N'''+@dbname+' Replication'', @article = N''TABLE_ONE'', @source_owner = N''dbo'', @source_object = N''TABLE_ONE'', @type = N''logbased'', @description = null, @creation_script =
    null, @pre_creation_cmd = N''drop'', @schema_option = 0x000000000803509F, @identityrangemanagementoption = N''manual'', @destination_table = N''TABLE_ONE'', @destination_owner = N''dbo'', @vertical_partition = N''false'', @ins_cmd = N''CALL sp_MSins_dboTABLE_ONE'',
    @del_cmd = N''CALL sp_MSdel_dboTABLE_ONE'', @upd_cmd = N''SCALL sp_MSupd_dboTABLE_ONE''
    EXEC sp_executesql @SQL
    SET @dbname = REPLACE(@dbname, 'dbone_', 'dbtwo_');
    print @dbname
    SET @SQL = 'DECLARE @dbname NVARCHAR(MAX); SET @dbname = ''' + @dbname + ''';
    use ['+@dbname+']
    exec sp_replicationdboption @dbname = N'''+@dbname+''', @optname = N''publish'', @value = N''true''
    use ['+@dbname+']
    exec ['+@dbname+'].sys.sp_addlogreader_agent @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1, @job_name = null
    -- Adding the transactional publication
    use ['+@dbname+']
    exec sp_addpublication @publication = N'''+@dbname+' Replication'', @description = N''Transactional publication of database
    '''''+@dbname+''''' from Publisher ''''MSSQLSRV\INSTANCE''''.'', @sync_method = N''concurrent'', @retention = 0, @allow_push = N''true'', @allow_pull = N''true'', @allow_anonymous = N''false'', @enabled_for_internet
    = N''false'', @snapshot_in_defaultfolder = N''true'', @compress_snapshot = N''false'', @ftp_port = 21, @allow_subscription_copy = N''false'', @add_to_active_directory = N''false'', @repl_freq = N''continuous'', @status = N''active'', @independent_agent = N''true'',
    @immediate_sync = N''true'', @allow_sync_tran = N''false'', @allow_queued_tran = N''false'', @allow_dts = N''false'', @replicate_ddl = 1, @allow_initialize_from_backup = N''true'', @enabled_for_p2p = N''false'', @enabled_for_het_sub = N''false''
    exec sp_addpublication_snapshot @publication = N'''+@dbname+' Replication'', @frequency_type = 1, @frequency_interval = 1, @frequency_relative_interval = 1, @frequency_recurrence_factor = 0, @frequency_subday = 8,
    @frequency_subday_interval = 1, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 0, @active_end_date = 0, @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1
    -- There are around 140 lines roughly the same as this only difference is the tablename repeated below this one
    use ['+@dbname+']
    exec sp_addarticle @publication = N'''+@dbname+' Replication'', @article = N''DB_TWO_TABLE_ONE'', @source_owner = N''dbo'', @source_object = N''DB_TWO_TABLE_ONE'', @type = N''logbased'', @description = null, @creation_script
    = null, @pre_creation_cmd = N''drop'', @schema_option = 0x000000000803509D, @identityrangemanagementoption = N''manual'', @destination_table = N''DB_TWO_TABLE_ONE'', @destination_owner = N''dbo'', @vertical_partition = N''false''
    EXEC sp_executesql @SQL
    fetch next from c_dblist into @dbname
    end
    close c_dblist
    deallocate c_dblist
    George P Botuwell, Programmer

    Hi George,
    Thank you for your question. 
    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated. 
    Thank you for your understanding and support.
    If you have any feedback on our support, please click
    here.
    Allen Li
    TechNet Community Support

  • How to raise error message from PAI of oops ALV report

    Hi All,
    I have a requirement to raise error message form editable oops alv . After entering the data and then press SAVE button .
    Please help.
    Thanks in Advance

    HI SK,
    Write a Local class (Event Handeler) to handel the events. In Editable ALV once the user enter a value, CL_GUI_ALV_GRID will raise an event called DATA_CHANGED.
    1. Define and Implement a local class to handle that event.
    In the implementation of this class you need to get data from imported object to an internal table, then compare the same with the ALV output table.
    * Local Class to handler the events raised from the ALV Grid
    CLASS LCL_EVENT_HANDLER DEFINITION.
    PUBLIC SECTION.
    * Method to handel EDIT event, DATA_CHANGED of CL_GUI_ALV_GRID
      METHODS : ON_DATA_CHANGE FOR EVENT DATA_CHANGED OF CL_GUI_ALV_GRID
                           IMPORTING ER_DATA_CHANGED.
    ENDCLASS.
    * Event handler class Implementation
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
      METHOD ON_DATA_CHANGE.
        DATA : LT_MODIFY TYPE LVC_T_MODI,
                   LS_MODIFY TYPE LVC_S_MODI.
    * Copying changed data into intenal table from Object
        LT_MODIFY = ER_DATA_CHANGED->MT_MOD_CELLS.
    * Modifying the ouptut table with the changed values
        IF LT_MODIFY[] IS NOT INITIAL.
              *Compare the ALV Output table with LT_MODIFY
        ENDIF.
      ENDMETHOD.
    ENDCLASS.
    Then raise  a message on required condition in the same method.
    Note: To trigger the above method, you need to set event handler before displaying ALV (before calling method SET_TABLE_FOR_FIRST_DISPLAY)
    * Creating object for the Local event handler class
      CREATE OBJECT GR_HANDLER.
    * Set handler (call method of Event_handler) to handler Edit event
      SET HANDLER GR_HANDLER->ON_DATA_CHANGE FOR  GR_GRID.
    Regards,
    Vijay

  • Unknown SQL Exception 208 occurred. Additional error information from SQL Server is included below.Invalid object name 'Webs'.

    SP 2013 Server + Dec 2013 CU. Upgrading from SharePoint 2010.
    We have a web application that is distributed over 7-8 content databases from SharePoint 2010. All but one database are upgradable. However, one database gives:
    Invalid object name 'Webs'.
    while running Test-SPContentDatabase or Mount-SPContentDatabase.
    EventViewer has the following reporting 5586 event Id:
    Unknown SQL Exception 208 occurred. Additional error information from SQL Server is included below.Invalid object name 'Webs'.
    After searching a bit, these links do not help:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/fd020a41-51e6-4a89-9d16-38bff9201241/invalid-object-name-webs?forum=sharepointadmin
    we are trying PowerShell only.
    http://blog.thefullcircle.com/2013/06/mount-spcontentdatabase-and-test-spcontentdatabase-fail-with-either-invalid-object-name-sites-or-webs/
    In our case, these are content databases. This is validated from Central Admin.
    http://sharepointjotter.blogspot.com/2012/08/sharepoint-2010-exception-invalid.html
    Our's is SharePoint 2013
    http://zimmergren.net/technical/findbestcontentdatabaseforsitecreation-problem-after-upgrading-to-sharepoint-2013-solution
    Does not seem like the same exact problem.
    Any additional input?
    Thanks, Soumya | MCITP, SharePoint 2010

    Hi,
    “All but one database are upgradable. However, one database gives:
    Invalid object name 'Webs'.”
    Did the sentence you mean only one database not upgrade to SharePoint 2013 and given the error?
    One or more of the following might be the cause:
    Insufficient SQL Server database permissions
    SQL Server database is full
    Incorrect MDAC version
    SQL Server database not found
    Incorrect version of SQL Server
    SQL Server collation is not supported
    Database is read-only
    To resolve the issue, you can refer to the following article which contains the causes and resolutions.
    http://technet.microsoft.com/en-us/library/ee513056(v=office.14).aspx
    Thanks,
    Jason
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jason Guo
    TechNet Community Support

  • Error while Viewing SQL Server data from Oracle

    Dear Friends,
    I am using Oracle10g XE.
    I have made a connection to view or insert data in SQL Server Database from Oracle.
    I  have done all the things with the help of below link.
    http://www.databasejournal.com/features/oracle/article.php/3442661/Making-a-Connection-from-Oracle-to-SQL-Server.htm
    Everything worked fine. but when i run below query
    select "EmployeeNo" from hrtattendance@mysqlserverdsn
    it gives an error which is mentioned below
    ERROR at line 1:
    ora-28545: error diagnosed by Net8 when connecting to an agent
    Unable to reteieve text of  NETWORK/NCR MESSAGE 65535
    ORA-02063: preceding 2 lines from MYSQLSERVERDSN
    Please help. I will be thankful.
    Regards,

    Dear Klaus,
    Here u go.
    C:\>C:\oraclexe\app\oracle\product\10.2.0\server\bin\hsodbc
    Oracle Corporation --- TUESDAY   JUN 24 2014 16:28:20.146
    Heterogeneous Agent Release 10.2.0.1.0 - Production  Built with
       Driver for ODBC
    C:\>C:\oraclexe\app\oracle\product\10.2.0\server\bin\tnsping MYSQLSERVERDSN
    TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 24-JUN-2
    014 16:28:33
    Copyright (c) 1997, 2005, Oracle.  All rights reserved.
    Used parameter files:
    C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT
    =1522)) (CONNECT_DATA=(SID=MYSQLSERVERDSN)) (HS=OK))
    TNS-12541: TNS:no listener
    C:\>C:\oraclexe\app\oracle\product\10.2.0\server\bin\lsnrctl status LISTENERMYSQLSERVERDSN
    LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 24-JUN-2014 16:28
    :48
    Copyright (c) 1991, 2005, Oracle.  All rights reserved.
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1522))
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
      TNS-00511: No listener
       32-bit Windows Error: 61: Unknown error
    Connecting to (ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY))
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
      TNS-00511: No listener
       32-bit Windows Error: 2: No such file or directory
    C:\>
    Regards,

  • Upgrade from 2005 express to 2008 r2 express - provisionsystemaccounts.sql error

    Hi,
    I’ve been upgrading several of my clients and ran into this problem for one of them.
    When doing the upgrade I got..
    Looking at the error logs indicated..
    2015-03-21 11:54:07.58 spid7s     
    Database 'master' is upgrading script 'provisionsystemaccounts.sql' from level 0 to level 2.
    2015-03-21 11:54:07.59 spid7s     
    2015-03-21 11:54:07.59 spid7s     
    Starting provisionsystemaccounts.sql ...
    2015-03-21 11:54:07.59 spid7s     
    2015-03-21 11:54:08.02 spid7s     
    Error: 15151, Severity: 16, State: 1.
    2015-03-21 11:54:08.02 spid7s     
    Cannot find the user 'FILESERVER01\SQLServer2005MSFTEUser$FILESERVER02$ORSQLEXP', because it does not exist or you do not have permission.
    2015-03-21 11:54:08.03 spid7s     
    Error: 912, Severity: 21, State: 2.
    2015-03-21 11:54:08.03 spid7s     
    Script level upgrade for database 'master' failed because upgrade step 'provisionsystemaccounts.sql' encountered error 15151, state 1, severity 16. This is a serious error condition which might interfere with regular operation and the database will be
    taken offline. If the error happened during upgrade of the 'master' database, it will prevent the entire SQL Server instance from starting. Examine the previous errorlog entries for errors, take the appropriate corrective actions and re-start the database
    so that the script upgrade steps run to completion.
    2015-03-21 11:54:08.03 spid7s     
    Error: 3417, Severity: 21, State: 3.
    2015-03-21 11:54:08.03 spid7s      Cannot recover the master database. SQL Server is unable to run. Restore master from a full backup, repair it, or rebuild it. For more information about how
    to rebuild the master database, see SQL Server Books Online.
    2015-03-21 11:54:08.03 spid7s   
      SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.Running the Repair from the Installation centre
     brings up the same error.
    I noticed that the instance appears to be upgraded but basically the service won’t run. I can start it but it just stops again.
    So I found this which seems the same as my problem..
    https://ilkirk.wordpress.com/2011/03/07/in-place-sql-upgrade-error-2005-to-2008/
    Even though I can start the SQL Services using point 1 from the link above I can’t connect to sql using DAC.
    The sqlcmd won’t work and trying to connect through SSMS.
    > SQLCMD –E –A. I’ve also tried >SQLCMD FILESERVER1\ORSQLEXP –E –A and get the same results
    HResult 0xFFFFFFFF, Level 16, State 1
    SQL Server Network Interfaces: An error occurred while obtaining the dedicated administrator connection (DAC) port.
    Make sure that SQL Browser is running, or check the error log for the port number [xFFFFFFFF].
    When I try to connect to DAC via SSMS I get ..
    So I seem to currently have 2 problems, one using sqlcmd/DAC and the other with provisionsystemaccounts.sql.
    The sqlbrowser is running but from 90 (not sure if that matters) and I have removed (following online research) the 80 and 90 binn settings from the PATH just leaving 100 but this hasn’t changed the errors.
    I’ve tried enabling DAC using this advice below but it hasn’t made any difference. The service keeps stopping and no SQLCMD action.
    http://www.mssqltips.com/sqlservertip/2538/enabling-dedicated-administrator-connection-in-sql-server-2008-express-edition/
    So after trying numerous options I currently stumped.

    An update to this. I can now DAC via sqlcmd.
    Following the advice on
    [url]https://ilkirk.wordpress.com/2011/03/07/in-place-sql-upgrade-error-2005-to-2008/[/url]
    I'm at point 3
    3.Issue a ‘create login’ command to create the user / group you’re missing, followed by the all important GO
    and I'm a bit unclear on what to do. The user according to the error log is 'FILESERVER01\SQLServer2005MSFTEUser$FILESERVER02$ORSQLEXP'
    and I tried
    >sp_addsrvrolemember 'FILESERVER01\SQLServer2005MSFTEUser$FILESERVER02$ORSQLEXP', 'sysadmin'
    >go
    adding this seemed to work without error but running the repair from the installation centre bought up the exact same error as before.
    So, bearing in mind using the advice from the above link
    Have I added the user to the correct group?
    If not how do I do that?
    In the advice he also mentions..
    Now – why did this happen?  Well, in my situation it seems to be related to the fact that I upgraded the default instance first which also upgraded the Full Text Engine.  That, in turn, removed the Full Text Engine user group from the local groups. 
    In particular, I was missing “<ServerName>\SQLServer2005MSFTEUser$<ServerName>$MSSQLSERVER”.  Note the fact that it mentions the default instance, not the named instance!
    The SQLServer2005MSFTEUser login refers to a local Windows group that is used for controlling access to the Full Text Engine.  I suspect that when I upgraded the default instance, the installer removed the group from Windows, but not necessarily
    from the named instance of SQL.  Once I recreated the group, granted my service account access to mirror the other similar groups, and added that login back into SQL via the DAC, everything went fine from there.
    thanks,

  • 3138 SQL error opening sqlite db file from Outlook 2010 as attachment

    Has anyone of you tried sending the sqlite db file thru e-mail and then open the file from Outlook 2010?
    I have an air app that can be opened by doubleclicking the sqlite database file (invoke event). The file is sent via e-mail from the app itself, so another user can run the app directly from their e-mail client once he receives the db. Now everything works fine unless you use Outlook 2010 - when I open it I get an sql error 3138 - do you know what can be the problem? Everything is fine when I'm using different e-mail client (the same e-mail account, just other client) like Outlook 2003 or Thunderbird or Opera. I'm guessing Outlook 2010 is using some kind of protection to attachments that is making the file not understandable by the app, but Microsoft seems to ignore my e-mails sent to them with the same question. The db file is not encrypted if that changes anything and saving the file from outlook to desktop and then running does not help. When I do the same using Outlook 2003 everything works as it should, but unfortunatelly my customer upgraded to 2010 :/ Any ideas would be much appreciated.

    This looks like a new behavior of Outlook 2010 and isn't specific to PDFs. You will need to "save as" the document. There is a thread at Microsoft forums about this with some possible workarounds:
    http://social.technet.microsoft.com/Forums/en-US/outlook/thread/927d678d-b55b-4732-93cb-f1 3ed1dacf96/

  • Capturing custom error message from alert category

    We are using XSLT mapping and We are raising custom error message based upon some conditions i.e if vendor number is invalid or blank.If it doesn't meet the requirement,mapping will fail and it will throw error message as" IDoc XXXXXXXXX is having invalid vendor number".
    My question is,we would like to send this custom error message to email receipients through RWB-AFW.
    How do we capture this custom error message is alert category or alert rule?

    You can not unless u use BPM.
    VJ

Maybe you are looking for

  • Update wierdness...

    When trying to update CC applications my updates fail and I get the following error codes (any thoughts will be appreciated): Adobe Premiere Pro CC 2014.0.1 Update There was an error installing this update. Please quit and try again later. Error Code

  • Set value of virtual channel

    Pardon the seemingly trivial question, but how do you set a DC value of a virtual channel. The way I have it set up right now, the channel's value is unpredictable and constantly changing

  • [Solved] Lost files

    Hi, I have just lost some really important files. What happened is the following: I have a partition in ntfs which I use to share files between arch and windows. I started working with some files in arch, and then hibernated. Later I continued editin

  • Problem creating list of data items from results of selectOne ListBox

    We are having problems with the following: Here's the JSF                  <td valign="top">                                  <h:selectOneListbox size="10" value="#{LanguageGroupsPage.selectedLanguageGroup}"                                           

  • Camera Issues BBZ10

    The camera isn't working, always saying "The camera can't be started" or that the camera is used by another app which is confusing because no other app is open. Definite solution please. Thank you!