How to get all parameter names along with their values in stored procedure which is being executed

Im using sql server 2012, is there any possible way to get all the parameters of a stored procedure along with the values passed to it.
I need these things to build a xml. I mean this should happen in the procedure which being executed and it should be common for all the procedures.
For example, let us suppose we have to procedures,
uspSave, @name='test' @age=20
uspDelete @id=2
now in uspSave procedure, i need to get @name, @age and the values 'test', 20 and in uspDelete, i should get @id with value 2.
For getting the column names, i tried this,
select parameter_name from information_schema.PARAMETERS where specific_name=OBJECT_NAME(@@procid)
now is it possible to loop through the result of above query and can we get the values.

I think  you need running SQL Server Profiler to capture this info even in SQL Server 2012.
Best Regards,Uri Dimant SQL Server MVP,http://sqlblog.com/blogs/uri_dimant/
Blog : MS SQL Development and Optimization
Blog : Large
scale of database and cleansing

Similar Messages

  • How to retrieve all the users along with their password from LDAP

    Hello,
    Can anyone let me know how to retrieve and list all the user along with their password from LDAP.
    Thanks

    Hi Prashant,
    I have limited experience with Synchronization, but I agree with you - if you need to synchronize Passwords, you need to have the Password in clear Text.
    If you trying to build your own Synchronization Solution using any of the avaliable LDAP APIs, I don't think you can ever retrieve a user's Password in clear text.
    However, I did come across an interesting article & I hope you find it useful :-
    http://www.oracle.com/technology/obe/obe_as_10g/im/configssl/configssl.htm
    I am not sure if SSL is necessary - If you have a look at Metalink Note 277382.1 ( How to Configure OID External Authentication Plug-In for Authentication Via Microsoft Active Directory (MS AD) ), teh question asked by oidspadi.sh for the same is asnwered as "N".
    Regards,
    Sandeep

  • How to get string from jtextpane along with its attributes

    sir,
    How to get string from jtextpane along with its attributes
    i,e font,size,style,color etc.
    please help me out.
    my mail id is [email protected]

    JTextPane extends JTextComponent
    JTextComponent.getDocument()
    a Document is a set of Element, see Document.getRootElements(). Each Element has attributes, stored within an AttributSet object see Element.getAttributes()
    a Document can also be rendered as a String, see Document.getText( offest, length ), use it with 0 and Document.getLength() as parameters.

  • How to get the onhand quantity along with zero quantities in Inventory?

    How to get the onhand quantity along with zero quantities in Inventory...Plz reply me as son as possible?

    Hi Akshata,
    In processRequest you can use pageContext.getParameter
    String PartyName = pageContext.getParameter("PartyName");Regards,
    Sujoy

  • How to get all property names and values of an bean instance at runtime?

    How can I get all property names and values of an bean instance at runtime?
    (The class of the bean instance is dynamic and I can not know before I write the code .)

    Look at Class. It has a way to get at all public methods and attributes.
    If you need to get to private attributes you can do what the Introspector does and expect the methods to follow the Bean pattern and pull the attributes out based upon that. Privates are all hidden from direct access but through the Bean Pattern they can be figured out.

  • How to get the IDOC name attached with message type (IDoc at receiver end)

    Hello Friends,
    I have configured the Order Confirmation Idoc.And the port used is XML_HTTP. in this port generally the idocs are sent to a java servlet.
    So there the idocs are being created with name  :- Idoc_no.XML
    but i need to get the IDoc name prefixed or attached with the message type name, that the particular idoc uses.
    waiting for your replies .
    thanks,
    jeevan

    Hi Jeevan,
    I am sorry for the confusion, the solution i provided is used when we go for XML FILe port. But when we go for XML HTTP port, this option is not available in SAP. So we need to check with the target system, whether there is any option available to read the file contents before saving , so that we can save the idoc with the required file name .
    With my knowledge i assume why this option is not there for XML HTTP port is when we use XML HTTP port the idoc will be converted into XML and will be transported over HTTP protocol to an remote system which may be any type like XI, Java Servlet, Business connector, .Net etc. So in that case all the systems may not support the file name what we propose from the SAP. This is my assumption.
    Please go through the help provided by SAP for XML Port types
    http://help.sap.com/saphelp_nw04/helpdata/en/21/e9c975eb1911d6b2ea00508b6b8a93/frameset.htm
    Please check with the Java guys who are working at the target end, whehter they may help you to resolve.
    Thanks & Regards
    Vijayanand Poreddy

  • How to get all GroupSpaces name using Spaces API, irrespective of user logged in?

    Hi
    Can anyone please tell me, how to retrieve list of all group spaces using Spaces API. I have used this method getGroupSpaces(null) to retrieve all group spaces, however it returns only the logged in members groups.
    Is there any way to get all groupspaces details?
    Regards
    Raj

    i don't think so other than admin user can get all group spaces informaiton, is it possible in webcenter portal:spaces default deployment?

  • How to get all step names within a group or a sequence?

    Hi,
    I'd like to show all the names of the steps within a sequence or a group.
    I wonder if there is a simple function which can be used directly, such as RunState.PreviousStep.Name.
    I tried via a foolish way to append each step name, though it shows all the step names but I still think there is a simple function can access all the step names.
    Can anyone give me some suggestion, thanks a lot!!!
    Solved!
    Go to Solution.
    Attachments:
    ShowAllStepName.seq ‏8 KB

    I've doctored up your sequence a little.  But yes you have to loop.
    Also, what format do you want the names in?
    Hope this helps,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~
    Attachments:
    ShowAllStepName.seq ‏8 KB

  • How to use dynamic parameter when a report is created using Stored Procedures

    Hi all,
    any one have the idea of how to use dynamic parameter in crystal report XI R2
    when report is created using Stored Procedure.
    Regards
    shashi kant chauhan

    Hi
    You can create an SQL command in Database Expert > Expand your datasource > Add command
    Then enter the SQL query that will create the list of values to supply to the user
    eg select field1,field2 from table
    Then edit the parameter of the report.  These will be the SP parameters adn can be seen in field explorer.
    Change the parameter type to Dynamic
    Under the word Value click on Click here to add item
    Scroll down to your Command and select one of the values that you want to appear in the list
    e.g field1
    Then click on the Parameters field - this is essential to create the param
    You can edit other options as required
    That should do it for you.
    I must say that i use CR 2008 connected to Oracle 10g SP, but i reckon this will work for SQL DB and CR XI as well
    Best of luck

  • How to get the parameter name of a generic class?

    Is it possible to get the name of generic class parameter type without having an instance of that type?
    e.g.
    class MyClass<T> {
      public MyClass() {
      // get the name here
    }

    I need to get a string containing "Object" (or "java.lang.Object") if the class would be used like this:
    MyClass<Object> mc = new MyClass<Object>()

  • How to get unique Id's along with using a formula in Report

    Hi,
    I have data in the following format:
    PO no  Subfield Created date Changed date
    123              A               01/01/2011        20/01/2011
    123              B               01/01/2011        20/01/2011
    124              A               01/01/2011        25/01/2011
    124              B              01/01/2011        25/01/2011
    I want to get  unique number of PO's which has difference(changed date - created date)  greater thn 20days and less thn 20days.
    So I want to get in report:
    PO no >20    <20
    123             ____        1
    124            1       _____
    I know to get unique PO number and how to calculate two dates difference in days by using formula variable replacement path.
    But how to incorporate these two functions.
    Edited by: SAP Consultant on Aug 14, 2011 8:34 AM
    Edited by: SAP Consultant on Aug 14, 2011 8:35 AM

    Hi,
    This link will help you:----
    Calculate difference of days between two dates
    Regards,
    Suman

  • Getting the parenet id along with the child ids in hierarchy query results

    create table test_test2 (do_id_tp varchar2(32),do_id number ,do_up_tp varchar2(32),do_up_id number)
    insert into test_test2 values('A_S',100170,'A_S',100001);
    insert into test_test2 values('A_S',1001054,'A_S',100001);
    insert into test_test2 values('A_S',1001055,'A_S',100001);
    insert into test_test2 values('A_S',1001053,'A_S',100001);
    insert into test_test2 values('A_S',1001056,'A_S',100001);
    insert into test_test2 values('A_S',1001051,'A_S',100001);
    insert into test_test2 values('A_S',1001052,'A_S',100001);
    insert into test_test2 values('A_S',100358,'A_S',100170);
    insert into test_test2 values('A_S',100359,'A_S',100170);
    insert into test_test2 values('A_S',100441,'A_S',100170);
    insert into test_test2 values('A_S',1001047,'A_S',100441);
    9/code]
    Upon executing the following query , i'm getting the childs of 100001 and the childs of childs of 100001 etc..
    That if fine .But in the output i'm not getting the parent id i.e; 100001 (which is in the where condition)
    How to get the parenet id along with the childs id.( without writing the UNION select 100001 from dual)SELECT do_id
    FROM (
    SELECT d.do_id, d.do_up_id
    FROM test_test2 d
    WHERE d.do_up_tp = 'A_S' ) m
    CONNECT BY NOCYCLE PRIOR m.do_id = m.do_up_id
    START WITH m.do_up_id =100001
    Edited by: smile on Jan 12, 2012 6:50 PM

    If you wish the root parent as a column in your select, you can use CONNECT_BY_ROOT:
    SELECT
    connect_by_root(do_up_id) root,
    do_up_id parent,
    do_id
    FROM (
       SELECT  d.do_id, d.do_up_id
       FROM test_test2 d
       WHERE    d.do_up_tp = 'A_S'
    ) m
    CONNECT BY NOCYCLE PRIOR m.do_id = m.do_up_id
    START WITH m.do_up_id =100001;But if you really wish an extra row in your output with 100001, then your problem is that you do not have a record in your data with do_id = 100001.
    Then you either need such a record in your data, or you need to create such a row with for example union all - something like this:
    SELECT
    do_id
    FROM (
       SELECT  d.do_id, d.do_up_id
       FROM test_test2 d
       WHERE    d.do_up_tp = 'A_S'
       UNION ALL
       SELECT 100001 do_id, NULL do_up_id
       FROM DUAL
    ) m
    CONNECT BY NOCYCLE PRIOR m.do_id = m.do_up_id
    START WITH m.do_up_id IS NULL;

  • Get all JNDI names - EJBLocalHome

    Hello,
    I've tried to get all JNDI names that are deployed on the J2EE Server RI Version 1.3.1. It worked fine with the JNDI names of the EJBs with Remote Client view (EJBHome), but did not work with EJBs with local Client View (EJBLocalHome).
    Does anyone knows how could work? Or wether it isn't possible.
    Thanks
    Here's my code:
    InitialContext ct = new InitialContext();
    NamingEnumeration bindings = ct.listBindings("");
    while (bindings.hasMore() ) {
    Binding b = (Binding) bindings.next() ;
    Object object = b.getObject();
    if(object instanceof Context) {
    Context aCon = (Context)object;
    NamingEnumeration n = aCon.listBindings("");
    while (n.hasMore()) {
    Binding b2 = (Binding) n.next() ;
    if (b2.getClassName().equals("javax.naming.Reference")) {
    Object objRef = ct.lookup("ejb/"+ b2.getName());
    if (objRef instanceof EJBLocalHome) {
         System.out.println("localHome");
    //here I want to access the EJBLocalHome Interface
         else if (objRef instanceof EJBHome) {
         System.out.println("Home");
         else                              System.out.println("nothing");
                        

    I use the listBindings() method in order to get all References to a JNDI name. I do not know how to get all JNDI names that are local. How can I check them?

  • How to get all AD User accounts, associated with any application/MSA/Batch Job running in a Local or Remote machine using Script (PowerShell)

    Dear Scripting Guys,
    I am working in an AD migration project (Migration from old legacy AD domains to single AD domain) and in the transition phase. Our infrastructure contains lots
    of Users, Servers and Workstations. Authentication is being done through AD only. Many UNIX and LINUX based box are being authenticated through AD bridge to AD. 
    We have lot of applications in our environment. Many applications are configured to use Managed Service Accounts. Many Workstations and servers are running batch
    jobs with AD user credentials. Many applications are using AD user accounts to carry out their processes. 
    We need to find out all those AD Users, which are configured as MSA, Which are configured for batch jobs and which are being used for different applications on
    our network (Need to find out for every machine on network).
    These identified AD Users will be migrated to the new Domain with top priority. I get stuck with this requirement and your support will be deeply appreciated.
    I hope a well designed PS script can achieve this. 
    Thanks in advance...
    Thanks & Regards Bedanta S Mishra

    Hey Satyajit,
    Thank you for your valuable reply. It is really a great notion to enable account logon audit and collect those events for the analysis. But you know it is also a tedious job when thousand of Users come in to picture. You can imagine how complex it will be
    for this analysis, where more than 200000 users getting logged in through AD. It is the fact that when a batch / MS or an application uses a Domain Users credential with successful process, automatically a successful logon event will be triggered in associated
    DC. But there are also too many users which are not part of these accounts like MSA/Batch jobs or not linked to any application. In that case we have to get through unwanted events. 
    Recently jrv, provided me a beautiful script to find out all MSA from a machine or from a list of machines in an AD environment. (Covers MSA part.)
    $Report= 'Audit_Report.html'
    $Computers= Get-ADComputer -Filter 'Enabled -eq $True' | Select -Expand Name
    $head=@'
    <title>Non-Standard Service Accounts</title>
    <style>
    BODY{background-color :#FFFFF}
    TABLE{Border-width:thin;border-style: solid;border-color:Black;border-collapse: collapse;}
    TH{border-width: 1px;padding: 2px;border-style: solid;border-color: black;background-color: ThreeDShadow}
    TD{border-width: 1px;padding: 2px;border-style: solid;border-color: black;background-color: Transparent}
    </style>
    $sections=@()
    foreach($computer in $Computers){
    $sections+=Get-WmiObject -ComputerName $Computer -class Win32_Service -ErrorAction SilentlyContinue |
    Select-Object -Property StartName,Name,DisplayName |
    ConvertTo-Html -PreContent "<H2>Non-Standard Service Accounts on '$Computer'</H2>" -Fragment
    $body=$sections | out-string
    ConvertTo-Html -Body $body -Head $head | Out-File $report
    Invoke-Item $report
    A script can be designed to get all scheduled back ground batch jobs in a machine, from which the author / the Owner of that scheduled job can be extracted. like below one...
    Function Get-ScheduledTasks
    Param
    [Alias("Computer","ComputerName")]
    [Parameter(Position=1,ValuefromPipeline=$true,ValuefromPipelineByPropertyName=$true)]
    [string[]]$Name = $env:COMPUTERNAME
    [switch]$RootOnly = $false
    Begin
    $tasks = @()
    $schedule = New-Object -ComObject "Schedule.Service"
    Process
    Function Get-Tasks
    Param($path)
    $out = @()
    $schedule.GetFolder($path).GetTasks(0) | % {
    $xml = [xml]$_.xml
    $out += New-Object psobject -Property @{
    "ComputerName" = $Computer
    "Name" = $_.Name
    "Path" = $_.Path
    "LastRunTime" = $_.LastRunTime
    "NextRunTime" = $_.NextRunTime
    "Actions" = ($xml.Task.Actions.Exec | % { "$($_.Command) $($_.Arguments)" }) -join "`n"
    "Triggers" = $(If($xml.task.triggers){ForEach($task in ($xml.task.triggers | gm | Where{$_.membertype -eq "Property"})){$xml.task.triggers.$($task.name)}})
    "Enabled" = $xml.task.settings.enabled
    "Author" = $xml.task.principals.Principal.UserID
    "Description" = $xml.task.registrationInfo.Description
    "LastTaskResult" = $_.LastTaskResult
    "RunAs" = $xml.task.principals.principal.userid
    If(!$RootOnly)
    $schedule.GetFolder($path).GetFolders(0) | % {
    $out += get-Tasks($_.Path)
    $out
    ForEach($Computer in $Name)
    If(Test-Connection $computer -count 1 -quiet)
    $schedule.connect($Computer)
    $tasks += Get-Tasks "\"
    Else
    Write-Error "Cannot connect to $Computer. Please check it's network connectivity."
    Break
    $tasks
    End
    [System.Runtime.Interopservices.Marshal]::ReleaseComObject($schedule) | Out-Null
    Remove-Variable schedule
    Get-ScheduledTasks -RootOnly | Format-Table -Wrap -Autosize -Property RunAs,ComputerName,Actions
    So I think, can a PS script be designed to get the report of all running applications which use domain accounts for their authentication to carry out their process. So from that result we can filter out the AD accounts being used for those
    applications. After that these three individual modules can be compacted in to a single script to provide the desired output as per the requirement in a single report.
    Thanks & Regards Bedanta S Mishra

  • How to get all paragraphs style and their fonts of a  indesign file and write all info with para info into txt file with scripting

    how to get all how to get all paragraphs style and their fonts of a  indesign file and write all info with para info into txt file with scriptingstyle and their fonts of a  indesign file and write all info with para info into txt file with scripting

    I write the script this one works
              var par=doc.stories.everyItem().paragraphs.everyItem().getElements();
      for(var i=par.length-1;i>=0;i--)
           var font=par[i].appliedParagraphStyle.name;
            var font1=par[i].appliedFont.name;
             var size=par[i].pointSize;
            WriteToFile (par[i].contents  +   "\r" +  "Style  : " + font  + "\r" +  "FONT1  : " + font1  + "\r" +  "Size  : " + size  + "\r", reportFilePath);
                            function WriteToFile(text, reportFilePath) { 
        file = new File(reportFilePath); 
        file.encoding = "UTF-8"; 
        if (file.exists) { 
            file.open("e"); 
            file.seek(0, 2); 
        else { 
            file.open("w"); 
          file.writeln(text);  
        file.close(); 
    Thanks for all your support

Maybe you are looking for

  • Hooking up iPod to home stereo receiver?

    Hi, all. I just bought my first iPod, a classic. I wanted to hook it up to my home stereo receiver, an NAD made back in '88. It has inputs for phono, tape, CD and video. I went to my local Apple store and told the sales person I wanted to hook up my

  • Albums in Aperture 3 not showing upon IPhone/IPad "Photos" App

    Hello; Some of the Albums I have on file in Aperture 3 are not showing up on my IPhone nor IPad in the "Photos" App. Am I missing a setting? Thanks Mark

  • Photo continually is downloading for 3 months

    My iPhone 5s is has been downloading for 3months it appears that when I changed phones that it is stuck on downloading picture from the cloud

  • How do I transfer MP3 files on a CD to my Creative Z

    Someone has kindly given me a CD which contains 2hrs worth of MP3 files which contain tutors discussing course material. Unfortuantly I am having real problems transferring these onto my Creative Zen. I havae a PC - not a MAC. ) The Help guide in Cre

  • Getting particle z depth for color in Particular

    I'd like to grab the z position in trapcode particular, of a particle and then use that infomation to apply a value to the color attribute. The reason is to create a zdepth pass that will all me to use anamorphic iris shapes. AE camera options has ir