Logging procedure parameters---

Hi All,
I wonder if there is a way to dynamically log the values of parameters passed to a procedure, function or package method.
I mean some thing like..
procedure my_proc(in_p1 in varchar2, in_p2 in number) is
Begin
  Log_Params();
End;Thanks

PROCEDURE output_table(string1 IN VARCHAR, string2 IN VARCHAR, tab_name IN VARCHAR)
IS
BEGIN
EXECUTE IMMEDIATE 'INSERT INTO :1 SELECT :2, :3 FROM DUAL' USING tab_name, string1, string2;
END output_table;
is this "dynamic" enough?

Similar Messages

  • Adding a Subreport to existing report and getting this error, "Unable to connect: incorrect log on parameters"

    I have taken on an existing vb.net project done in Visual Studio 2008 with crystal reports version Crystal Report XI.
    The reports on their own work very well. Problem is I need to add information to my report which is a 'many-to-one' situation where for each Project Id that I am displaying I need to display several attached documents and the report I am working on is for several Project Id's.
    I figured this would be a perfect situation for a SubReport. I created a separate report which calls a stored procedure to get all of the Attached Documents for a specific Project Id. I thought if I were to add this new SubReport to the Original Report and link the Project Id's, easy-peazy, I would be done.
    This is not the case. I have vb code that loads the Original Report with a stored procedure and when this code runs with the setup I described above it fails when it is creating the final report with the following error:
    Logon failed. Details: crdb_adoplus : Object reference not set to an instance of an object. Error in File C:\~\ProjectDescriptionReport {6BA19F79-2A12-4826-B1F6-456EF799963B}.rpt: Unable to connect: incorrect log on parameters.
    I have no specific connections in my vb code for the reports. If I do not add the subreport to the main report, it loads correctly, so I know the error is caused by the subreport.
    This is the code that creates the original report (sorry for dumping the code here, i just thought it would be easier to see all the code) :
    Public Function LoadReport(ByVal inProjectNum As Integer, ByVal strProjectName As String) As DataTable ', ByVal inFiscalYear As Integer, ByVal inCompany As String) As DataTable
            Dim cnn As SqlConnection = Nothing
            Dim cmd As Data.SqlClient.SqlCommand
            Dim obj As New clsDataClass
            Dim dataAdapter As SqlClient.SqlDataAdapter
            Try
                LoadReport = New DataTable("DescriptionReport")
                cmd = New SqlCommand()      
                cnn = obj.Create_Connection()
                With cmd
                    .CommandType = Data.CommandType.StoredProcedure
                    .Connection = cnn
                    .CommandTimeout = "60"
                    .CommandText = "usp_GetProjectGroupSpecsCR"              
                    .Parameters.AddWithValue("@ProjectNumber", inProjectNum)
                    .Parameters.AddWithValue("@ProjectName", strProjectName)
                End With
                dataAdapter = New System.Data.SqlClient.SqlDataAdapter
                dataAdapter.SelectCommand = cmd
                dataAdapter.Fill(LoadReport)
                Dim oRpt As New ReportDocument()
                oRpt.Load(Server.MapPath("ProjectDescriptionReport.rpt"))
                oRpt.Refresh()
                oRpt.SetDataSource(LoadReport)
                'oRpt.OpenSubreport("AttachmentsReport").SetDataSource(LAR)
                oRpt.SetParameterValue("inProjectNum", inProjectNum)
                oRpt.SetParameterValue("strProjectName", strProjectName)
                oRpt.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, True, "Projects_DescriptionReport") 'inCompany & "ProjectsReport_Description" & inFiscalYear) <-- Line where the error occures.
    What I need to know is what is the proper way to add a subreport to a vb.net application?
    From the ways I have tried it is clearly not working and I am out of ideas. I am fairly new to Crystal Reports and this way of coding it.
    Any help for this would be greatly appreciated, I've been stuck on this for a while and am finally reaching out to the Crystal Report Specialists.
    Thank you in advance,
    Bryan

    Hi Bryan,
    You may want to check the Connection properties also. I think the MS Data.SqlClient.SqlCommand is using the MDAC driver, or could be modified.
    If you are connecting to SQL Server 2008 or above you should be using the SQL Native 10 or 11 Client.
    As Dell suggests have a look at the samples and if you can use a DSN ( 32 bit or 64 bit ODBC Admin )
    Also search for "CRlogger", you'll find how to enable CR's database logging component and may help show you what part is failing.
    Don

  • Best way to log runtime parameters

    i have a log procedure that takes a varchar2 parameter with autonomous transaction. in my proc , just after begin statement, i want to log all parameter values given at runtime. but i dont want to use pipes to concat the param values for each procedure i want to log, is there an easier way to achieve this ?
    procedure log_my_proc (in_params in varchar2) is
    pragma autonomous transaction
    begin
    insert into proc_log_table values (in_params);
    end;
    procedure something (param1 in varchar2 ,param2 in number, param3 in varchar2,...) is
    begin
    log_my_proc('something is called ' || ' param1: ' || param1 || ' param2: ' || param2 ....);
    some other work....
    end ;

    It took me a few seconds to generate this:
    log_my_proc('something is called '||chr(13)||chr(10)
             || ' param1 : ' || param1  ||chr(13)||chr(10)
             || ' param2 : ' || param2  ||chr(13)||chr(10)
             || ' param3 : ' || param3  ||chr(13)||chr(10)
             || ' param4 : ' || param4  ||chr(13)||chr(10)
             || ' param5 : ' || param5  ||chr(13)||chr(10)
             || ' param6 : ' || param6  ||chr(13)||chr(10)
             || ' param7 : ' || param7  ||chr(13)||chr(10)
             || ' param8 : ' || param8  ||chr(13)||chr(10)
             || ' param9 : ' || param9  ||chr(13)||chr(10)
             || ' param10: ' || param10 ||chr(13)||chr(10)
             || ' param11: ' || param11 ||chr(13)||chr(10)
             || ' param12: ' || param12 ||chr(13)||chr(10)
             || ' param13: ' || param13 ||chr(13)||chr(10)
             || ' param14: ' || param14 ||chr(13)||chr(10)
             || ' param15: ' || param15 ||chr(13)||chr(10)
             || ' param16: ' || param16 ||chr(13)||chr(10)
             || ' param17: ' || param17 ||chr(13)||chr(10)
             || ' param18: ' || param18 ||chr(13)||chr(10)
             || ' param19: ' || param19 ||chr(13)||chr(10)
             || ' param20: ' || param20 ||chr(13)||chr(10)
             || ' param21: ' || param21 ||chr(13)||chr(10)
             || ' param22: ' || param22 ||chr(13)||chr(10)
             || ' param23: ' || param23 ||chr(13)||chr(10)
             || ' param24: ' || param24 ||chr(13)||chr(10)
             || ' param25: ' || param25 ||chr(13)||chr(10)
    Given that you will already have a (nicely formatted) list of the parameters in you procedure spec, shouldn't this be a simple copy and paste?

  • Scheduled report failing with "Incorrect log on parameters"

    I am having trouble with a report scheduled on our Crystal Enterprise Server.  I didn't design this report but am responsible for supporting the server, so I am trying to determine if this is a server issue or not. 
    The user who designs these reports has designed many others without issue.  She uses Crystal Reports XI and publishes them to the server. There is a group of similar reports that she has setup to run on a schedule and all run fine except for one.  This one gives the error:
    Error Message: Error in File C:\Program Files\Business Objects\BusinessObjects Enterprise 11.5\Data\procSched\REPORTS.reportjobserver\~tmpee06be03474eb18.rpt: Unable to connect: incorrect log on parameters. Details: [Database Vendor Code: 18456 ]
    Within CR XI, we have double and triple checked the username, password and database connection info.  The report is using OLE DB to connect to a SQL 2005 server.  I know the credentials are correct because several other reports use the same credentials and work fine. 
    One other interesting note, if I log into the Central Management Console, I can run the same report manually without errors. It only throws this error when it runs as scheduled. 
    Hope someone can offer some suggestions.  I'm no Crystal expert so please ask if I didn't provide enough information.

    Moved to BOE Admin Forums.
    In the Properties of the report in the CMC you can set the log on info as well as any parameters when scheduled.
    Check the Admin guide on how to
    Don

  • Unable to connect: incorrect log on parameters. Database Vendor Code: 18456

    I have imported a report into Info View (that has no parameters), I am able to run the report on Demand in InfoView, and I am also able to run the report within the CMC Preview.   I have tried scheduling using the admin account in CMC, through the publishing wizard and also with a authorized users in InfoView.  But anytime I try to schedule the report I get this error.
    Status: Failed 
    Printer: The instance is not printed. 
    External Destination: Mail the instance to " XXX@XXX .com " with a subject of " test ". 
    Data Refresh Settings:  Use the server defaults. 
    Start Time: 11/18/08 3:02:19 PM 
    End Time: 11/18/08 3:02:23 PM 
    Server Used: clr-combr.reportjobserver 
    Error Message: Error in File C:\Program Files\Business Objects\BusinessObjects Enterprise 11.5\Data\procSched\clr-combr.reportjobserver\~tmp1304574d76168ca.rpt: Unable to connect: incorrect log on parameters. Details: [Database Vendor Code: 18456 ] 
    I have made sure that the Reportjobobject is enabled and the server for SMTP email is enabled, and I am pretty sure I have the properties set up correctly within there, we created a email account specifically for crystal.  And that email account is also set up as a user.  I don't know where else to look.
    Please help.
    Thanks

    Hi Ashley
    I would like to suggest you following things with the Report:
    1) Please log in into CMC, go to Report which you want to schedule.
    2) Click on the report and go to Process
    3) Click on the tab Database.
    4) There will be two option to make the entries for database logon required for the Report.
    Please select the appropriate option. Are you able to Preview the report?
    What is the database in use? Please also check the odbc driver settings for that database.

  • Unable to connect: incorrect log on parameters [Database Vendor Code: 1005]

    We have a report that has been in production for some time and ran successfully with no trouble.  However, it now keeps failing with this error and the log on parameters are correct.  The whole error is:
    Error in
    File / usr/local/bobje/data/procSched/mrspas051.reportjobserver/~ tmp2f0ea56e4c88a08d6.rpt: Unable to connect: incorrect log on parameters, Details: [Database Vendor Code: 1005]. 
    Can you tell us why a report suddenly fails with this error?  Thank you.

    We've been having the same issue with scheduled Crystal reports (in BO 3.1).  After much testing, we found that even though reports are set to use the custom database logon credentials, if the name of the original data source changes, it causes the error (Error in File ~tmp1d06ed702daa30.rpt: Unable to connect: incorrect log on parameters. Details: [Database Vendor Code: 1005 ] ).  For example, I publish a report to a production environment.  It has an original data source called "test".  I set it to use the custom database logon.  A user then creates a recurring schedule and it runs successfully.  A developer opens the report in Crystal 2008 and changes the connection to something else, for ex "dev" (in Crystal, this is on the Database menu, select "Set Datasource Location" and pick a different option under My Connections or create a new one), then saves the report to BO.  We promote the report to prod and it overwrites the existing file.  We make sure it's still set to use the custom database connection to prod but the recurring schedules that were set up when the original data source was called "test" immediately begin to fail.  I tried working with support but they didn't really help much.  They had me install the Oracle 11G client on our servers since we were connecting to our 11G repository with the 10G client but that did nothing.  They finally claimed that since our repository database was Oracle 11G R2 (not just 11G), it wasn't supported and they wouldn't go any further.  If anyone's found a solution, I would really appreciate hearing how it was fixed.

  • Unused stored procedure parameters marked with a check mark in crystal reports

    Post Author: epowers0213
    CA Forum: General
    Hello,
    I have some Crystal Reports that currently use stored procedures as their datasources (I am in the process of modifying them to use datasets instead).  Some of the original reports have check marks next to stored procedure parameters which I cannot find as being used anywhere in the report.  Is this a legitimate possibility? (Some of them do not have check marks, however, so it is not consistent.)
    More Info:  I am using Crystal Reports within Visual Studio 2005.  I have looked through each report in every way I can think of to find if a parameter field is being used anywhere - I have checked all formula fields, the formatting formulas for sections and individual fields, the record and group selection formulas and the grouping and sorting experts, along with any subreports (although some of them have no subreports).
    (I have read on other forums that exporting a report definition file is another way to look for where fields or parameters are being used, but this does not appear possible within Visual Studio 2005.)
    In some cases, I have gone ahead and replaced the stored procedure datasource location with a dataset (generated based on the same stored procedure).  When I do this, Crystal automatically deletes the stored procedure parameters from the report, and I have still been able to run the modified report successfully - at least it looks ok and nothing is complaining.  So is it possible that these parameters were actually not being used anywhere on the report although they were marked with a check mark?
    Any help would be greatly appreciated!  I want to make sure I am not changing the function of these reports somehow without knowing it...
    Thank you!

    Are you referencing another database that Crystal can't see? Also, you can try and copy the SQL to a command object in Crystal to see if it behaves differently there.

  • How do I add PO line item to incomplete log procedure

    Hi SD Experts,
    How do I add PO line item to incomplete log procedure for VA02? Is that possible through configuration and/or code? if it is done by code, what userexit or BAdI I need to implement?
    Thanks,
    Duy

    Hi Duy,
    You need to go to SD > Basic functions > log of incomplete items > define incomplete procedure > select group A (sales header) > procedures > select 11 (Sales order) > fields tab and add PO number incompletion fields as below:
    table---field namedescriptionscreen--status--warning
    VBKD---BSTKDPO number-KBES     -
    0----
    X
    Finally, you should assign your incompletion procedures to your sales doc. typ.
    I hope these will work.
    Regards,

  • Change the database log on parameters in the run time with CR10 Delphi2007?

    Hi,
    I'm using crystal report 10 and Crystal VCL for Delphi. How can I change the database log on parameters in the run time?

    You have to use the ConnectBuffer. See [this|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do] note for details.
    Also, consider searching the notes database:
    https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_ossnotes&query=&adv=true
    The search; VCL database crystal, returns a number of notes that may be of use.
    Ludek

  • Crystal Reports Server :Unable to connect: incorrect log on parameters

    Hi there, I am getting the following error in Crystal Reports Server  when i try to preview or schedule a Crystal Report on an Access 2000 database.
    Unable to connect: incorrect log on parameters
    The Access database does not have has not username or password and I have left these blank when publishing it, and the Database properties in the Central Management Console also show the username and password as blank.
    All other reports are fine is it just reports on the Access 2000 database that give me this errror.
    Anyone any ideas.
    Thanks

    Hi,
    ok now you have to make ure that the user used to run the BOBJ services on your BO server (if you hvae windows then this is the local system account), has access to your AccessDB. Normally local users do not have access to network locations so it is advisable to create a domain user, who is allowed to access the directory with your database and is melber of the local administrators group on the BOBJ server. All you have to do then is to  configure your BOBJ services (Use the Central Configuration Management utility to do this) to run under the credentials (Log-on-as) of user you created.
    Regards,
    Stratos

  • ORA-30626: function/procedure parameters of remote object types not support

    Hello,
    I am trying to create a dynamic LOV.
    I have a table and package in a remote database, I am connecting to the database using dblink. When I access package I am getting error
    ORA-30626: function/procedure parameters of remote object types are not supported
    However I can access table with [email protected], not the package!
    How can I solve this problem?

    Did you ever get an answer/workaround to this? I'm having similar problems in 10g.

  • Unable to connect: incorrect log on parameters - In CMC / CR report

    I have a CR report that connects to an AS400 and an Excel file.  The Excel file is on a Network Drive, and I've made sure that the drive is mapped on my server that the Crystal Reports Server is on.  I can sucessfully run this report on this same server in CR XI.  However, when I try to Preview or Run Now from the CMC, it says "Unable to connect: Incorrect log on parameters".
    I do not have a password on the Excel file, but this is where the problem seems to be.  Any ideas?

    In case you use CR Server 2008 you won't find services for cache and page server. These services are integrated and controlled by the SIA (Server Intelligent Agent) service.
    Start you CCM (Central Configuration Manager), Select Server Intelligent Agent, Right click and choose properties, Untick System Account and provide a user (domain) account which has sufficient rights to access your folder.
    Regards,
    Tim

  • Is It Possible To define a size of the Procedure Parametere?

    In Oracle Is It Possible To define a size of the Procedure Parametere?
    If i have the procedure like
    Test_sp(no int,name varchar2)
    Is it possible to define a size
    Test_sp(no int(5),name varchar2(255))
    Thanks
    Rangan S

    As Anthony said - no, not in the parameter signature of a procedure or a function. Which could have unexpected run-time errors as one could wrongly assume that using a "derived" type will allow this.
    The following example illustrates:
    SQL> create table datatype(
    2 varchar2_5 varchar2(5),
    3 number1 number(1)
    4 );
    Table created.
    SQL>
    SQL>
    SQL> create or replace procedure fooProc( s datatype.varchar2_5%TYPE, n datatype.number1%TYPE ) is
    2 s1 datatype.varchar2_5%TYPE;
    3 n1 datatype.number1%TYPE;
    4 begin
    5 begin
    6 DBMS_OUTPUT.put_line( 'len='||length(s)||' value='||s );
    7 DBMS_OUTPUT.put_line( 'value='||to_char(n) );
    8 exception when OTHERS then
    9 DBMS_OUTPUT.put_line( 'parameter display failed with error '||SQLERRM(SQLCODE) );
    10 end;
    11
    12 begin
    13 s1 := s;
    14 DBMS_OUTPUT.put_line( 'string parameter assignment succeeded' );
    15 exception when OTHERS then
    16 DBMS_OUTPUT.put_line( 'string assignment failed with error '||SQLERRM(SQLCODE) );
    17 end;
    18
    19 begin
    20 n1 := n;
    21 DBMS_OUTPUT.put_line( 'number parameter assignment succeeded' );
    22 exception when OTHERS then
    23 DBMS_OUTPUT.put_line( 'number assighment failed with error '||SQLERRM(SQLCODE) );
    24 end;
    25 end;
    26 /
    Procedure created.
    SQL>
    SQL> exec fooProc( 'test1', 1 );
    len=5 value=test1
    value=1
    string parameter assignment succeeded
    number parameter assignment succeeded
    PL/SQL procedure successfully completed.
    SQL>
    SQL> exec fooProc( 'this should fail', 1 );
    len=16 value=this should fail
    value=1
    string assignment failed with error ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    number parameter assignment succeeded
    PL/SQL procedure successfully completed.
    SQL>
    SQL> exec fooProc( 'test', 1234 );
    len=4 value=test
    value=1234
    string parameter assignment succeeded
    number parameter assignment succeeded
    PL/SQL procedure successfully completed.
    SQL>
    Note that only the string assignment fails. The string parameter works fine. And there is no impact at all on the number side, despite seemingly constraining it to a single digit.

  • Change beasvc.exe default stdout log rotation parameters in WLS10.0

    Weblogic Server 10.0:
    I'm trying to change default log rotation parameters for weblogic server service as suggested here:
    http://edocs.bea.com/wls/docs100/server_start/winservice.html#wp1193277
    my installsvc.cmd contains:
    set ROTATION_TYPE = TIME
    set TIME_START_DATE = Jun 12 2008 15:07:00
    set TIME_INTERVAL_MINS = 3
    set STD_LOG=C:\logs\stdout.log
    beasvc.exe -install.... -log:"%STD_LOG%"
    This is the sniplet from the stdout.log:
    [Thu Jun 12 15:45:09 2008] [initLog] initializing logger
    [Thu Jun 12 15:45:09 2008] [E] [initLog] No 'ROTATION_TYPE' header found. 'TIME' based rotation will be used by default.
    [Thu Jun 12 15:45:09 2008] [E] [initLog] No 'TIME_START_DATE' header found or value is invalid. Rotation will take place every 24 hours beginning today at 23:59:59
    [Thu Jun 12 15:45:09 2008] [E] [initLog] No 'TIME_INTERVAL_MINS' header found. Using the default value of 24 hours.
    [Thu Jun 12 15:45:09 2008] [I] [initLog] TIME based log rotation is ON
    [Thu Jun 12 15:45:09 2008] [I] [trigger] First rotation due in 29690 secs
    [Thu Jun 12 15:45:09 2008] [I] [ServiceStart] console allocation successful. THREAD_DUMP redirection enabled
    [Thu Jun 12 15:45:09 2008] [I] [ServiceStart] About to execute CreateThread()
    the service then starts ok and works with default settings, but that's not what I'm looking for...
    any ideas are welcome ;)
    thanks!

    yes, the parameters are set when service is being installed. Also, I can see in the log when changes are made to the parameters and service reinstalled.

  • How to set store procedure parameters

    Hello,
    To summarize our problem, we are not able to set store procedure parameters using JRC and without using a Viewer.
    Inside an rpt document we use a call to a store procedure that requires some input parameters.
    We attempted to pass the required parameters to the report (please see below) but it seems that those parameters are somehow ignored.
    In fact null values are always received by the store procedure.
    For your information, if the document doesnu2019t contain a call to a store proc but SQL clause parameters instead, then that works.
    Does that mean that sp parameters have to be set in a specific way?
    Please can you advise?
    Tanks a lot,
    Joseph
    This is how we set parameter values:
    private void handleParameters(ReportClientDocument pm_document, List pm_parameters) throws Exception
         ParameterFieldController pfc = pm_document.getDataDefController().getParameterFieldController();
         pfc.setCurrentValue(reportName, parameterFieldName, parameterValue);
    Then we export in a pdf file:
    private InputStream createInputStream(ReportClientDocument pm_document, String pm_reportName) throws Exception
         return (ByteArrayInputStream)pm_document.getPrintOutputController().export(ReportExportFormat.PDF);

    First question:
    Do you set the parameters before the database logon?
    Sincerely,
    Ted Ueda

Maybe you are looking for

  • Input Field disabled in Web Dynpro Application

    Hi, I created an application with three input fields and created the corresponding context. When I start the wd app the input fields are disabled and can not be edited. The property enabled if this fields is true! I compared the context with other wd

  • Best practice for application help for a custom screen?

    Hi, The system is Netweaver 7.0 SP 15 with e-recruiting . We have some custom SAP GUI transactions and have written Word documents with screen prints and explanations. I would like to make the procedure document accessible from the custom transaction

  • Why would flash only buffer for 5 seconds on espn following ads?

    I'm having an issue with flash video playback on espn.com. Ads will play and the the video will buffer and play for only 5 seconds exactly. Sound and video are fine in the ad. This happens for me on chrome, firefox and safari. I uninstalled and reins

  • Security filter verification failed

    Hi All, We are trying to create security filter which is combination of 4 sparse dimensions. The relationship between members in the filter is AND (so the filter will be created under one row). We encountered the below error in applying security filt

  • Oracle Support Involvement on This List

    Does Oracle Tech Support ever post to this discussion list??? Calvin Mitchell, IS Operations Mgr. Makoff R&D Laboratories, Inc. http://www.rndlabs.com mailto:[email protected] http://home.pacbell.net/cal_mitc mailto:[email protected] mailto:[email pr