Parameters of Azure SQL database monitoring stored procedures

Source: Internet
Author: User

Background implementation development colleagues find me, feedback that after you use Azure SQL database in your project, you cannot use Profiler to monitor the parameters of your stored procedures that you have developed. Indeed profiler these instance-level tools are not supported in Azure SQL database, so we have no way to implement monitoring parameters in disguise, a close-up blog record. Test environment Microsoft SQL Azure (RTM)-12.0.2000.8Mar 01:30:03Copyright (C) Microsoft Corporation. All rights reserved.Implementation process Create a new test-pass stored procedure
1 CREATE PROCEDUREtest_p_azure2     (3       @name NVARCHAR( -) ,4       @flag INT5     )6 /*7 test Stored procedure pass -through parameters8 */9  asTen     BEGIN  One         SETNOCOUNT on; A         SELECT  1; -         SETNOCOUNTOFF; -     END;

Execute the stored procedure first to view the stored procedure script by querying the sys.sysprocess spid
Executing monitoring statements
1     SELECT   a.spid,2             B.text3from         sys.sysprocesses A  4cross               APPLY sys.dm_exec_sql_text (a.sql_handle) b5     WHERE   >  - 6              and <> @ @SPID;
basically resolves the issue of monitoring viewing stored procedure parameters. If you encounter sys.sysprocess unable to query the stored procedures to be monitored, you can try to adjust the stored procedures to monitor the following: Then execute the above monitoring statements. Note that you need to have permission to execute the above monitoring statements.

Parameters of Azure SQL database monitoring stored procedures

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.