是否可以使用T-SQL在azure上捕获数据库跟踪

时间:2022-09-23 01:41:45

I know one can't run SQL Profiler against azure databases. I recently learned that SQL profiler is really just a front end for functionality that is implicit to SQL Server i.e. SQL profiler doesn't really do any capturing, it just starts and stops traces that are actually made by SQL server and that one can start, pause and stop traces using T-SQL statements.

我知道无法针对azure数据库运行SQL事件探查器。我最近了解到,SQL分析器实际上只是SQL Server隐含的功能的前端,即SQL分析器实际上没有进行任何捕获,它只是启动和停止实际由SQL服务器创建的跟踪,并且可以启动,使用T-SQL语句暂停和停止跟踪。

I don't think one has any sort of direct access to the filesystem an azure database lives in, so if one could start a trace one would need to find a way to put that trace somewhere. Is it possible to capture traces on windows azure databases using direct T-SQL, or is the trace functionality simply unusable altogether on SQL Databases in azure?

我不认为有任何类型的直接访问azure数据库所在的文件系统,所以如果可以开始跟踪,则需要找到一种方法将该跟踪放在某处。是否可以使用直接T-SQL捕获Windows Azure数据库上的跟踪,或者跟踪功能在azure中的SQL数据库上完全无法使用?

1 个解决方案

#1


3  

You can use the Dynamic Management Views to diagnose performance problems. http://msdn.microsoft.com/en-us/library/windowsazure/ff394114.aspx

您可以使用动态管理视图来诊断性能问题。 http://msdn.microsoft.com/en-us/library/windowsazure/ff394114.aspx

The T-SQL you are referring to on non-Azure is sp_trace_start, which isn't a stored procedure on Azure.

您在非Azure上引用的T-SQL是sp_trace_start,它不是Azure上的存储过程。

#1


3  

You can use the Dynamic Management Views to diagnose performance problems. http://msdn.microsoft.com/en-us/library/windowsazure/ff394114.aspx

您可以使用动态管理视图来诊断性能问题。 http://msdn.microsoft.com/en-us/library/windowsazure/ff394114.aspx

The T-SQL you are referring to on non-Azure is sp_trace_start, which isn't a stored procedure on Azure.

您在非Azure上引用的T-SQL是sp_trace_start,它不是Azure上的存储过程。