Decrypt the Encrpted Stored procedure and views

Hi,
      Anybody can help me, how to decrypt the encrypted stored procedure in SQL server.?

They are not encrypted. They are obfuscated. ApexSQL can show you the source code with the wink of an eye.
But before you do that - if this is a vendor application, check your license agreement.
Erland Sommarskog, SQL Server MVP, [email protected]

Similar Messages

  • How to handle Stored Procedure and Views

    Dear All
    While dealing with Oracle database related scenario. I came across Stored Procedures and Views. Which are complex in nature. Using SAP XI how we can handle them ?
    Is JDBC adaptor is capable of that.? Can you help me Data type structure for oracle.
    How max occur play important role in that. How to identify root and item level structure for oracle
    I am dealing with stored procedures while inserting data. and using views i need to get data from oracle database.
    What is the syntax of query we use to put while using JDBC adaptor?
    Please help and provide bit detail information over this so that i can execute scenario
    Thanks
    Gaurav

    1) jdbc:oracle:thin:@xxx.xxx.xxx.xxx:1521:sid
    2)Occurence==> o,1, >1 , Unbounded
    Occurrence=> ready to accept 0 / 1 / more than 1/ multiple record  (for source) and how it will be passed to target.
    http://help.sap.com/saphelp_erp2004/helpdata/en/b6/0b733cb7d61952e10000000a11405a/frameset.htm
    3)
    <StatementName5>
    <storedProcedureName action=” EXECUTE”>
        <table>realStoredProcedureeName</table>
    <param1 [isInput=”true”] [isOutput=true] type=SQLDatatype>val1</param1>
    </storedProcedureName >
      </StatementName5>
    refer
    http://help.sap.com/saphelp_nw04/helpdata/en/22/b4d13b633f7748b4d34f3191529946/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/frameset.htm

  • MySQL 5.1 Stored Procs and Views not showing, only tables.

    Hi,
    I'm having problems getting stored procedures and views to show up in the Data Source Explorer of CR4E 2.0.
    I've checked the properties of the connection and the Default Stored Procedure Filter is disabled, so things should show Tables are showing. The user within MySQL that I am using to connect also has rights to view sps and views.
    My question is, has any one got views or sps to show within the Data Source Explorer using MySQL 5.1? Am I missing a trick here? Do I need to add anything to the url string of the mysql jdbc driver for the sps and view schemas to show.
    Many thanks,
    Nick

    Hi,
    As a work around you can use the CR2008 to design your reports based on stored procedures and then import the reports in Crystal Report For Eclipse IDE. You will be able to view the fields/Data coming from the Stored Procedures.
    Thanks,
    Neeraj

  • JOB execution fails due to Access failure to procedures and views using certificates (encryption)

    Job execution fails using SQLServerAgent account but runs successfully under another windows personal account.
    Both have same security access on server and DB.
    The Windows account is mapped to dbo on the database .
    The package uses procedures and views which are using encryption by certificates.
    Please advice on how to provide security so that job runs from the agent

    Hi Prady26,
    If the SQL Server Agent Service account and the proxy account generated based on a Windows user account have the same permissions on both the SQL Server database and the File System of the server, it may be related to the protection level of the package.
    If the package is set to encrypt with UserKey, the job will fail unless it runs under the security context of the Windows user that designs the package in BIDS/SSDT. You can check the
    ProtectionLevel of the package in the BIDS/SSDT to see if it is EncryptSensitiveWithUserKey or EncryptAllWithUserKey, if it is, re-deploy/reinstall the package and set the package protection
    level to “Relay on server storage for encryption”.
    If the issue persists, post the error message in the job history for further analysis.
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • How to get a list of values used in the WHERE filter of stored procedures and functions in SQL Server

    How can I get a list of values (one or more) used in the WHERE filter of stored procedures and functions in SQL Server?
    How can get a list of values as shown (highlighted) in the sample stored procedure below?
    ALTER PROC [dbo].[sp_LoanInfo_Data_Extract] AS
    SELECT   [LOAN_ACCT].PROD_DT,
                  [LOAN_ACCT].ACCT_NBR, 
                  [LOAN_NOTE2].OFCR_CD, 
                  [LOAN_NOTE1].CURR_PRIN_BAL_AMT, 
                  [LOAN_NOTE2].BR_NBR,
    INTO #Table1
    FROM
                    dbo.[LOAN_NOTE1],
                    dbo.[LOAN_NOTE2],
                    dbo.[LOAN_ACCT]
    WHERE
                    [LOAN_ACCT].PROD_DT = [LOAN_NOTE1].PROD_DT
                    and
                    [LOAN_ACCT].ACCT_NBR = [LOAN_NOTE1].ACCT_NBR
                    and
                    [LOAN_NOTE1].PROD_DT = [LOAN_NOTE2].PROD_DT
                    and
                    [LOAN_NOTE1].MSTR_ACCT_NBR = [LOAN_NOTE2].MSTR_ACCT_NBR
                    and
                    [LOAN_ACCT].PROD_DT = '2015-03-10'
                    and
                    [LOAN_ACCT].ACCT_STAT_CD IN
    ('A','D')
                    and
                    [LOAN_NOTE2].LOAN_STAT_CD IN
    ('J','Z')
    Lenfinkel

    Hi LenFinkel,
    May I know what is purpose of this requirement, as olaf said,you may parse the T-SQL code (or the execution plan), which is not that easy.
    I have noticed that the condition values in your Stored Procedure(SP) are hard coded and among them there is a date values, I believe some day you may have to alter the SP when the date expires. So why not declare 3 parameters of the SP instead hard coding?
    For multiple values paramter you can use a
    table-valued parameter. Then there's no problem getting the values.
    If you could elaborate your purpose, we may help to find better workaround.
    Eric Zhang
    TechNet Community Support

  • Java stored procedures and triggers in lite

    Hi
    We are using java stored procedures and java triggers in our application for oracle lite database 5.1.
    We would like to know whether these procedures and triggers are uploaded or associated with tables or not because triggers are not being fired for the tables.
    The question is - how to find the uploaded procedures and triggers in system tables.
    We dont find any tables like (all_objects, user_objects) for this in oracle lite system catalogs given in the documentation.
    thanks in advance
    yugandhar

    I don't have much experience with Lite, but I'm running 9i Personal Edition. Any information about triggers can be found in the "ALL_TRIGGERS" view. You will want to filter out any rows where OWNER = 'SYS' unless you created your triggers as SYS. As for procedures and functions, you can see what you have created in the "ALL_OBJECTS" view where OBJECT_TYPE = 'PROCEDURE' or 'FUNCTION', once again filtering out rows where OWNER = 'SYS'. To see the code of any procedure or function, select substr(text,1,80) from ALL_SOURCE where NAME = 'function name' ORDER BY LINE.
    Hope this helps!

  • Oracle stored Procedure and Packages in CR4E

    Hi,
    I want to use Stored Procedure in CR4E. I don't know how to use Stored Procedures and packages in Crystal Reports for Eclipse. In the data source explorer I can only see the Tables, Views and Stored Procedures but not packages from my Schema and when I can only drag & drop the Tables and Views into the Field Explorer, I can't drag & Drop the Stored Procedures.
    I managed to attached the stored procedure from CR studio. I opened the report in CR4E and I can see the stored procedure and can preview the data. When I try to run the report and override the datasource, it throws oracle error saying "ORA-01008: Not all variables bound". When I tried to use the option
    DBOptions._doNotVerifyDB
    while replacing connection I get the this error
    java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean
         at java.lang.Boolean.compareTo(Boolean.java:26)
         at com.crystaldecisions.sdk.occa.report.lib.ClonableMap.hasContent(ClonableMap.java:112)
         at com.crystaldecisions.client.helper.CloneUtil.hasContent(CloneUtil.java:135)
         at com.crystaldecisions.sdk.occa.report.data.ConnectionInfo.hasContent(SourceFile:151)
         at com.crystaldecisions.client.helper.CloneUtil.hasContent(CloneUtil.java:135)
         at com.crystaldecisions.sdk.occa.report.data.Table.hasContent(SourceFile:286)
         at com.crystaldecisions.sdk.occa.report.data.Procedure.hasContent(SourceFile:212)
         at com.crystaldecisions.sdk.occa.report.lib.ArrayListMerger.haveMatchingContent(ArrayListMerger.java:232)
         at com.crystaldecisions.sdk.occa.report.lib.ArrayListMerger.mergePass(ArrayListMerger.java:138)
         at com.crystaldecisions.sdk.occa.report.lib.ArrayListMerger.merge(ArrayListMerger.java:86)
         at com.crystaldecisions.sdk.occa.report.lib.ControllableList.copyTo(ControllableList.java:68)
         at com.crystaldecisions.sdk.occa.report.data.Database.copyTo(SourceFile:105)
         at com.crystaldecisions.sdk.occa.report.lib.ControllableHelper.copyToPreservingReferences(ControllableHelper.java:153)
         at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.a(SourceFile:2556)
         at com.crystaldecisions.sdk.occa.report.application.b9.onDataSourceChanging(SourceFile:315)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(SourceFile:971)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(SourceFile:4078)
         at com.crystaldecisions.sdk.occa.report.application.bv.new(SourceFile:121)
         at com.crystaldecisions.sdk.occa.report.application.bv.int(SourceFile:91)
         at com.crystaldecisions.proxy.remoteagent.UndoUnitBase.performDo(SourceFile:151)
         at com.crystaldecisions.proxy.remoteagent.UndoUnitBase.a(SourceFile:106)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(SourceFile:2159)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.mapFields(SourceFile:4061)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(SourceFile:3914)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.replaceConnection(SourceFile:3880)
         at
    Please advice if Stored procedures and packages are supported in CR4E ?

    Hi, Jack76,
    According to the [CR4E Release Notes|http://help.sap.com/businessobject/product_guides/cr4E/en/cr4e_relnotes_en.pdf] (available from the [CR4E Download page|http://www.businessobjects.com/campaigns/forms/downloads/crystal/eclipse/datasave.asp]), stored procedures are supported, as long as they don't use parameters that need null values.
    I don't see any references to packages.
    Bryan

  • Diif between Stored procedure and function

    HI
    I want all the differences between Stored procedure and function.
    Even the basic diff is Procedure does not return any value and Function must be...
    Thansk In advance...

    1) Functions are used for computations where as procedures can be used for performing business logic That's an opinion on usage not an actual difference.
    3) You can have DML(insert,update, delete) statements in a function. But, you can not call such a function in a SQL query.Not true. As User defind functons limitations we can use a function that issues DML in a SELECT statement, if it uses the PRAGMA AUTONOMOUS_TRANSACTION.
    4) Function parameters are always IN, no OUT is possibleEasily refutable...
    SQL> CREATE OR REPLACE FUNCTION my_f (p OUT NUMBER) RETURN DATE
      2  AS
      3  BEGIN
      4     p := to_number(to_char(sysdate, 'DD'));
      5     RETURN sysdate;
      6  END;
      7  /
    Function created.
    SQL> var x number
    SQL> var d varchar2(18)
    SQL> exec :d := my_f(:x)
    PL/SQL procedure successfully completed.
    SQL> print d
    D
    18-NOV-05
    SQL> print x
             X
            18
    SQL>
    Stored Procedure :supports deffered name resoultion Example while writing a stored procedure that uses table named tabl1 and tabl2
    etc..but actually not exists in database is allowed only in during creationNot sure what this one is about...
    SQL> CREATE PROCEDURE my_p AS
      2      n NUMBER;
      3  BEGIN
      4     SELECT count(*) INTO n
      5     FROM tab1;
      6  END;
      7  /
    Warning: Procedure created with compilation errors.
    SQL> sho err
    Errors for PROCEDURE MY_P:
    LINE/COL ERROR
    4/4      PL/SQL: SQL Statement ignored
    5/9      PL/SQL: ORA-00942: table or view does not exist
    SQL>
    7) A procedure may modifiy an object where a function can only return a value.An ounce of test is worth sixteen tons of assertion...
    SQL> CREATE OR REPLACE FUNCTION my_f2 RETURN VARCHAR2
      2  AS
      3  BEGIN
      4       EXECUTE IMMEDIATE 'CREATE TABLE what_ever (col1 number)';
      5      RETURN 'OK!';
      6  END;
      7  /
    Function created.
    SQL> exec :d :=  my_f2
    PL/SQL procedure successfully completed.
    SQL> desc what_ever
    Name                                      Null?    Type
    COL1                                               NUMBER
    SQL> I think there are only two differences between a procedure and a function.
    (1) A function must return a value
    (2) because of (1) we can use functions in SQL statements.
    There are some minor difference in allowable syntax but they are to do withj RETURN values.
    Cheers, APC

  • Administering Stored Procedures and Packages

    I've read about WRAP utility but I don't know exactly what's it about. Here you are what ýI've read:ý
    The code used to create the procedure ,package ,or function is available in the dictionary ýviews DBA_Source ,All_Source,and user_source except when you create them with the ýWRAP utility .the WRAP utility generates encrypted code, which only the Oracle server ýcan interpret .ý
    does any one have any idea .
    Thanks in advance

    Generally, one uses the WRAP utility when
    - You are delivering code to a third party
    - You want to ensure that the third party isn't able to decompile your code.
    If you built a CRM application with stored procedures and packages and you started selling that commercially, for example, you would use the WRAP utility to ensure that competitors couldn't reverse engineer your code and see how you did things.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Stored Procedure vs Views, Please clearify.

    Hi Gents,
    I am working on client side as a crystal report developer, the client has several applications linked to each other by some means and each application has its own database. They have created a common database called Reporting Layer, the database consists of only stored procedures, that is the stored procedures are collecting data from all the databases and making up a dataset. Now I need to develop reports using these stored procedures. Consider these stored procedures as tables for now.
    If you have got the basics, here is my concern about using stored procedures for the reports.
    Example : Say I need to refer 3 stored procedures for my report to get the required data then I need to call or attach all the three stored procedures with crystal and link them properly to get the required data. The question here is, say I need only 2 columns from each stored procedure then I simply drag the columns needed and drop on the reports...!!!
    So if I had a view instead of a stored procedure then I could refer 3 views in the command object or might have written a stored procedure to return the results containing only the columns the report is ment for.
    Select v1.a, v1.b, v2.a, v2.b, v3.a, v3.b from v1,v2,v3 where v1.id = v2.id and v1.id = v3.id
    or
    Select v1.a, v1.b, v2.a, v2.b, v3.a, v3.b from v1 inner join v2 on v1.id = v2.id inner join v3 on v1.id = v3.id
    I want to explain this to my client and ask them to convert all the stored procedures to views, please suggest what can I tell them ? And if you think that the method my client has opted that is of stored procedures is better than views then please explain in this scenario.
    Thanks
    -Azhar

    Hi Azhar,
    Not sure if you are in the right place, you would likely get a better description if you post your question to the Forums for which ever DB server you are using. They likely have more detailed info on the efficiencies of each.
    For Crystal Reports one possble scenario with using multiple Stored Proceedures (SP) is that each SP would or should be in it's on subreport. Unless you can link them, this will cause the SP to run each time that section is hit. Worst Example is if you put the subreport in the detail section for every record returned the subreport would run. If in the group header for each Group header condition met the subreport would run.
    Using them in a Command Object would work but not that efficient and would be better if you used one SP to get the data or use a database to save all the data into as you suggested and report directly off of it.
    As for the amount of data the SP returns CR may only ask for the fields used, depends on a few conditions, or it may have to get all of the data and filter out just the fields used in the report. Could be a big delay waiting for the SP to run and/or client side data filtering.
    As for Views all the data collection is done server side, same as an SP, but only one view would be required. Or you may want to create specific SP's for use in the reports and not use Command Objects but simply drop the SP into the Database Wizard as the data source. This way all data collection is done server side which is much more efficient and CR at filtering data.
    CR does not care if you use Views or SP's, we are simply sending the SQL to the server and waiting for the results. Which one is more efficient is more for that DB forum to answer.
    Hope this helps
    Don

  • Crystal Reports 2008 Stored Procedure and Parameters from LOVs

    Quite simple report using stored procedure as data source. When editing some of the parameters we get this error when clicking OK to close "This stored procedure parameter can only accept multiple values. Please ensure that Allow Multiple Values is true."
    As we all know stored procedure parameters do not access multiple values at all, so this message is very hard to debug. The report does work if we set the 'Allow Multiple Values' to true, but only when using exactly one value for the parameter. We have tried verify database and other things, but cannot find any way around this issue.
    All ideas are appreciated as this is stopping us from utilizing the dynamic parameters.
    Thanks, Stig

    We managed to work around the issue by creating a new stored procedure. First we used the same parameter names and changed the data source to the new stored procedure. After renaming the parameter with the issue the problem then was resolved.
    Note that another parameter that was earlier affected by this issue in the way that it could not be edited and saved due to the same error message now also works fine. This even if this parameter has not changed names.
    Quite a complex situation to debug this. Maybe if the source of the error message is found in the code we could help testing.
    Stig

  • How to create a stored procedure and use it in Crystal reports

    Hi All,
    Can anyone explain me how to create a stored procedure and use that stored procedure in Crystal reports. As I have few doubts in this process, It would be great if you can explain me with a small stored proc example.
    Thanks in advance.

    If you are using MSSQL SERVER then try creating a stored procedure like this
    create proc Name
    select * from Table
    by executing this in sql query analyzer will create a stored procedure that returns all the data from Table
    here is the syntax to create SP
    Syntax
    CREATE PROC [ EDURE ] procedure_name [ ; number ]
        [ { @parameter data_type }
            [ VARYING ] [ = default ] [ OUTPUT ]
        ] [ ,...n ]
    [ WITH
        { RECOMPILE | ENCRYPTION | RECOMPILE , ENCRYPTION } ]
    [ FOR REPLICATION ]
    AS sql_statement [ ...n ]
    Now Create new report and create new connection to your database and select stored procedure and add it to the report that shows all the columns and you can place the required fields in the report and refresh the report.
    Regards,
    Raghavendra
    Edited by: Raghavendra Gadhamsetty on Jun 11, 2009 1:45 AM

  • Is it possible to trigger an error so that the running stored procedure is stopped?

    Hello all,
    I want to run an existing stored procedure and then I want to manually trigger an error/abort/interruption so see what happens and do some testing with that.
    Is it possible to manually trigger an error/abort/interruption on a running stored procedure so that it is stopped?
    If yes, how can I do that?
    I hope someone has an idea. For me it sounds not really difficult, but I just do not get the idea how to do it.
    Kind regards
    Peter

    Hello Visakh,
    I dont want to modify the existing procedure. I just want to run it and than stop it, but not with the button to stop it, but "kill" it somehow with an error (with not destroying the database).
    Nope you cant simulate an intermediate failure inside procedure code from outside. For that you have to modify the actual sp code itself
    Another way is by doing data manipulation in such a way which causes a error in procedure but for that you need to revisit the logic to ensure you do changes in such way as to cause an error
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • What happens to the report if the underlying stored procedure to execute the report take atleast 3 hrs to run

    Hi,
    I have a report which is calling a stored procedure..
    Stored procedure exceutes 4-5 stored procedure and then returns the count each procedure it ran using union all statement... The stored procedure takes around 3-4 hrs to run because it is looking at quarterly data and YTD data.
    So once the report is kicked off and the procedure behind it runs and runs how will communicate to the report to show the final data... the final data will just be 5 rows with counts.
    I think we are running into a issue where the stored procedure runs and runs and then the report goes into la la land and has no clue what to do...
    Can you please shed some light on this..
    Thanks
    Karen

    Hi Karen,
    When we render a report, the report would process the following procedures:
    Open connections to data source and reading data rows from data extensions for all datasets, means retrieve data. Then process the engine requests, including the tablix, grouping, sorting, filtering, aggregations and subreport processing, means process report.
    Finally, render the report, including the pagination modules and on-demand expression evaluations.
    So the report rending has to wait until the stored procedure is executed. To improve the performance, we can consider the three aspects:
    Improve the performance of the stored procedures. Such as index and join. For better support, I suggest you can post a new thread about this issue in Transact-SQL forum at:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?forum=transactsql. It is appropriate and more experts will assist you.
    Simplify the report. For example, avoid including a reference to [&TotalPages] or any complex expressions in the page header and page footer. For more details, please see the following document:
    http://technet.microsoft.com/en-us/library/bb522806(v=sql.105).aspx
    Using cashing if you have a long-running query that cannot be tuned further. For more details, please refer to the following article:
    http://msdn.microsoft.com/en-us/library/ms159241(v=sql.110).aspx
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Subreport using the same Stored Procedure

    I have a main report and a subreport that uses the same stored procedure. The stored procedure has 12 parameters and what I want to avoid is the user having to enter the same parameter values twice. When I created the subreport I put in the parameters + one field, the employee id field so that I could just test it on one employee.
    After I entered the subreport into the main report, when I got to refresh the data, it's asking for params for BOTH reports. Is there any way to get around this? Because of the way the stored procedure returns the data, I had to create a subreport instead of just fitting it into one of the footers. I've looked at the subreport link and added the employee id as the key. When I ran it the first time, it returned the wrong date range on the sub.
    Help! this thing is Way passed due!!

    Right click on the sub report and choose change sub report links
    Top left pane contains your main report parameters use > to add
    In the bottom left corner of that dialog then scroll down until you see the corresponding sub report parameter
    Repeat for each parameter
    This should then take the main report params and pass into the sub report

Maybe you are looking for

  • FULL_SCREEN_INTERACTIVE not work under Ubuntu 8.1.0

    I have an AIR application which sets to FULL_SCREEN_INTERACTIVE in the constructor when the application launched. It works fine in XP environment, but fails in Ubuntu 8.1.0. My developing environment is Adobe Flash CS3. The code snippet as follow: pu

  • End of communication channel on creating Materialized view

    Dear All, I've Oracle Enterprise Edition(ver 9.0.1.1.1) running on Windows Xp Home Edition, When I run the following statement to create a materialized view I got the famous error ORA-03113: end-of-file on communication channel.And the strange thing

  • Zen Micro - two more problems...... oye

    So last week I received my replacement Zen Micro (the headphone jack was faulty in the old one..... etc etc). Since the new one arri'ved, I've had two problems: )There is a constant ringing coming out of the player when it is switched on, like a buzz

  • Updates are nothing to be afraid of

    I come in here quite frequently because I see people who are afraid of making updates because other people's experience here, and help out those who have made updates who have failed to take the proper precautions when one does update. I post this po

  • Z-5500 and CMMS 3d Surround probl

    Two days ago i bought Z-5500 5. Speaker system and X-Fi Fatalty. Yesterday everything worked fine but today when i went to thx setup console and started to test surround sound i found some big problems like i didn't hear anything from my right front