<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>default trace &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/default-trace/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Mon, 20 Nov 2017 05:58:48 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.6</generator>
	<item>
		<title>SQL Server Interview: What, How, Where, Which for Default Trace</title>
		<link>https://www.dbrnd.com/2017/04/sql-server-interview-what-how-where-which-for-default-trace/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sun, 23 Apr 2017 16:16:34 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Interview]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[default trace]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Error]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tuning]]></category>
		<category><![CDATA[SQL Server Programming]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[SQL Server trace file]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=5062</guid>

					<description><![CDATA[What is SQL Server Default Trace? The default trace is a system-defined trace which is used to record a large number of events. How to enable/disable it? Script to Enable and Disable the Default Trace in SQL Server Where is trace file located? [crayon-6ab4050fa6f75381848548/] Which type of events are captured by default trace? Database Events: [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F04%2Fsql-server-interview-what-how-where-which-for-default-trace%2F&amp;linkname=SQL%20Server%20Interview%3A%20What%2C%20How%2C%20Where%2C%20Which%20for%20Default%20Trace" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F04%2Fsql-server-interview-what-how-where-which-for-default-trace%2F&amp;linkname=SQL%20Server%20Interview%3A%20What%2C%20How%2C%20Where%2C%20Which%20for%20Default%20Trace" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F04%2Fsql-server-interview-what-how-where-which-for-default-trace%2F&amp;linkname=SQL%20Server%20Interview%3A%20What%2C%20How%2C%20Where%2C%20Which%20for%20Default%20Trace" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F04%2Fsql-server-interview-what-how-where-which-for-default-trace%2F&amp;linkname=SQL%20Server%20Interview%3A%20What%2C%20How%2C%20Where%2C%20Which%20for%20Default%20Trace" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F04%2Fsql-server-interview-what-how-where-which-for-default-trace%2F&amp;linkname=SQL%20Server%20Interview%3A%20What%2C%20How%2C%20Where%2C%20Which%20for%20Default%20Trace" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F04%2Fsql-server-interview-what-how-where-which-for-default-trace%2F&amp;linkname=SQL%20Server%20Interview%3A%20What%2C%20How%2C%20Where%2C%20Which%20for%20Default%20Trace" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F04%2Fsql-server-interview-what-how-where-which-for-default-trace%2F&#038;title=SQL%20Server%20Interview%3A%20What%2C%20How%2C%20Where%2C%20Which%20for%20Default%20Trace" data-a2a-url="https://www.dbrnd.com/2017/04/sql-server-interview-what-how-where-which-for-default-trace/" data-a2a-title="SQL Server Interview: What, How, Where, Which for Default Trace"></a></p><p><strong>What is SQL Server Default Trace?</strong></p>
<blockquote><p>The default trace is a system-defined trace which is used to record a large number of events.</p></blockquote>
<p><strong>How to enable/disable it?</strong></p>
<blockquote class="wp-embedded-content" data-secret="3GdHZlj6Vp"><p><a href="https://www.dbrnd.com/2015/05/script-to-enable-and-disable-default-trace-sql-server/">Script to Enable and Disable the Default Trace in SQL Server</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2015/05/script-to-enable-and-disable-default-trace-sql-server/embed/#?secret=3GdHZlj6Vp" data-secret="3GdHZlj6Vp" width="600" height="338" title="&#8220;Script to Enable and Disable the Default Trace in SQL Server&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe><br />
<strong>Where is trace file located?</strong></p><pre class="crayon-plain-tag">SELECT path AS trace_file_path	
FROM sys.traces
WHERE is_default=1
GO</pre><p>
<strong>Which type of events are captured by default trace?</strong></p>
<p><strong>Database Events:</strong></p>
<ul>
<li>Data file auto grow</li>
<li>Data file auto shrink</li>
<li>Database mirroring status change</li>
<li>Log file auto grow</li>
<li>Log file auto shrink</li>
</ul>
<p><strong>Objects Events:</strong></p>
<ul>
<li>Object Altered</li>
<li>Object Created</li>
<li>Object Deleted</li>
</ul>
<p><strong>Full-Text Events:</strong></p>
<ul>
<li>FT Crawl Aborted</li>
<li>FT Crawl Started</li>
<li>FT Crawl Stopped</li>
</ul>
<p><strong>Errors and Warnings:</strong></p>
<ul>
<li>Errorlog</li>
<li>Hash warning</li>
<li>Missing Column Statistics</li>
<li>Missing Join Predicate</li>
<li>Sort Warning</li>
</ul>
<p><strong>Security Audit Events:</strong></p>
<ul>
<li>Audit Add DB user event</li>
<li>Audit Add login to server role event</li>
<li>Audit Add Member to DB role event</li>
<li>Audit Add Role event</li>
<li>Audit Add login event</li>
<li>Audit Backup/Restore event</li>
<li>Audit Change Database owner</li>
<li>Audit DBCC event</li>
<li>Audit Database Scope GDR event (Grant, Deny, Revoke)</li>
<li>Audit Login Change Property event</li>
<li>Audit Login Failed</li>
<li>Audit Login GDR event</li>
<li>Audit Schema Object GDR event</li>
<li>Audit Schema Object Take Ownership</li>
<li>Audit Server Starts and Stops</li>
</ul>
<p><strong>Server Memory Change Events:</strong></p>
<ul>
<li>Server Memory Change Events</li>
</ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SQL Server: Database Lock, Deadlock, Block and Isolation Interview Questions and   Answers (Day-1)</title>
		<link>https://www.dbrnd.com/2016/06/sql-server-database-lock-deadlock-block-and-isolation-interview-questions-and-answers-day-1/</link>
					<comments>https://www.dbrnd.com/2016/06/sql-server-database-lock-deadlock-block-and-isolation-interview-questions-and-answers-day-1/#comments</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sat, 04 Jun 2016 17:52:40 +0000</pubDate>
				<category><![CDATA[SQL Server Interview]]></category>
		<category><![CDATA[acid]]></category>
		<category><![CDATA[answers]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[block]]></category>
		<category><![CDATA[Check Constraint]]></category>
		<category><![CDATA[concurrency]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[DeadLock]]></category>
		<category><![CDATA[default trace]]></category>
		<category><![CDATA[Dirty read]]></category>
		<category><![CDATA[interview]]></category>
		<category><![CDATA[locking]]></category>
		<category><![CDATA[phantom read]]></category>
		<category><![CDATA[questions]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=2916</guid>

					<description><![CDATA[What is the ACID Properties in the Database System? ACID Properties in Database System (Atomicity, Consistency, Isolation, Durability) What is a Phantom read? A phantom read occurs when, in the course of a transaction, two identical queries are executed, and the collection of rows returned by the second query is different from the first. This [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F06%2Fsql-server-database-lock-deadlock-block-and-isolation-interview-questions-and-answers-day-1%2F&amp;linkname=SQL%20Server%3A%20Database%20Lock%2C%20Deadlock%2C%20Block%20and%20Isolation%20Interview%20Questions%20and%20%20%20Answers%20%28Day-1%29" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F06%2Fsql-server-database-lock-deadlock-block-and-isolation-interview-questions-and-answers-day-1%2F&amp;linkname=SQL%20Server%3A%20Database%20Lock%2C%20Deadlock%2C%20Block%20and%20Isolation%20Interview%20Questions%20and%20%20%20Answers%20%28Day-1%29" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F06%2Fsql-server-database-lock-deadlock-block-and-isolation-interview-questions-and-answers-day-1%2F&amp;linkname=SQL%20Server%3A%20Database%20Lock%2C%20Deadlock%2C%20Block%20and%20Isolation%20Interview%20Questions%20and%20%20%20Answers%20%28Day-1%29" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F06%2Fsql-server-database-lock-deadlock-block-and-isolation-interview-questions-and-answers-day-1%2F&amp;linkname=SQL%20Server%3A%20Database%20Lock%2C%20Deadlock%2C%20Block%20and%20Isolation%20Interview%20Questions%20and%20%20%20Answers%20%28Day-1%29" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F06%2Fsql-server-database-lock-deadlock-block-and-isolation-interview-questions-and-answers-day-1%2F&amp;linkname=SQL%20Server%3A%20Database%20Lock%2C%20Deadlock%2C%20Block%20and%20Isolation%20Interview%20Questions%20and%20%20%20Answers%20%28Day-1%29" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F06%2Fsql-server-database-lock-deadlock-block-and-isolation-interview-questions-and-answers-day-1%2F&amp;linkname=SQL%20Server%3A%20Database%20Lock%2C%20Deadlock%2C%20Block%20and%20Isolation%20Interview%20Questions%20and%20%20%20Answers%20%28Day-1%29" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F06%2Fsql-server-database-lock-deadlock-block-and-isolation-interview-questions-and-answers-day-1%2F&#038;title=SQL%20Server%3A%20Database%20Lock%2C%20Deadlock%2C%20Block%20and%20Isolation%20Interview%20Questions%20and%20%20%20Answers%20%28Day-1%29" data-a2a-url="https://www.dbrnd.com/2016/06/sql-server-database-lock-deadlock-block-and-isolation-interview-questions-and-answers-day-1/" data-a2a-title="SQL Server: Database Lock, Deadlock, Block and Isolation Interview Questions and   Answers (Day-1)"></a></p><p><strong>What is the ACID Properties in the Database System?</strong></p>
<blockquote data-secret="GZz3hgbH8E" class="wp-embedded-content"><p><a href="https://www.dbrnd.com/2015/05/acid-properties-in-database-system/">ACID Properties in Database System (Atomicity, Consistency, Isolation, Durability)</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2015/05/acid-properties-in-database-system/embed/#?secret=GZz3hgbH8E" data-secret="GZz3hgbH8E" width="600" height="338" title="&#8220;ACID Properties in Database System (Atomicity, Consistency, Isolation, Durability)&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p><strong>What is a Phantom read?</strong></p>
<blockquote><p>A phantom read occurs when, in the course of a transaction, two identical queries are executed, and the collection of rows returned by the second query is different from the first.</p>
<p>This can occur when range locks are not acquired on performing a SELECT &#8230; WHERE operation.</p></blockquote>
<p><strong>What is a Dirty read?</strong></p>
<blockquote><p>Dirty read—Dirty reads occur when one transaction reads data that has been written but not yet committed by another transaction. If the changes are later rolled back, the data obtained by the first transaction will be invalid.</p></blockquote>
<p><strong>What is Nonrepeatable read?</strong></p>
<blockquote><p>Nonrepeatable reads happen when a transaction performs the same query two or more times and each time the data is different. This is usually due to another concurrent transaction updating the data between the queries.</p></blockquote>
<p><strong>What is a lost update problem?</strong></p>
<blockquote><p>Lost updates occur when two or more transactions select the same row and then update the row based on the value originally selected. Each transaction is unaware of other transactions. The last update overwrites updates made by the other transactions, which results in lost data.</p></blockquote>
<p><strong>What is Timeout?</strong></p>
<blockquote data-secret="mv0SEDiAHt" class="wp-embedded-content"><p><a href="https://www.dbrnd.com/2016/04/database-theory-what-is-timeout-lock-block-and-deadlock-in-a-database-system/">Database Theory: What is Timeout, Lock, Block, and Deadlock in a Database System?</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2016/04/database-theory-what-is-timeout-lock-block-and-deadlock-in-a-database-system/embed/#?secret=mv0SEDiAHt" data-secret="mv0SEDiAHt" width="600" height="338" title="&#8220;Database Theory: What is Timeout, Lock, Block, and Deadlock in a Database System?&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p><strong>What is a Lock?</strong></p>
<blockquote><p>When one process is accessing an object, it can request for a lock for that particular object so that other processes cannot perform read or update on that object.</p>
<p>There are different types of lock like: Exclusive Lock, Non-exclusive Lock.</p></blockquote>
<p><strong>What is Blocking?</strong></p>
<blockquote><p>If two processes are accessing same resource so at that time one process has to wait until the other process release the occupied resource.</p>
<p>This is called blocking because one transaction is blocked by another transaction and all blocked processes kept in the waiting queue.</p>
<p>If the blocked transaction is waiting for a long time, it may generate a Database Timeout. If the long running blocked transaction requires a lock, it may generate a Database Deadlock.</p></blockquote>
<p><strong>What is a Deadlock?</strong></p>
<blockquote><p>One X blocked process is waiting to complete the transaction of the Y process and the same time, Y process is blocked because it is also waiting to complete the transaction of the X process.</p>
<p>This is called as Deadlock situation.</p>
<p>Deadlock is a next stage of the blocking situation so if you want to avoid Deadlock situation, you should first find the blocked transaction and tried to remove internal dependency of the transactions.</p></blockquote>
<p><strong>What is a Live lock?</strong></p>
<blockquote><p>A livelock is one, where a request for an exclusive lock is repeatedly denied because a series of overlapping shared locks keeps interfering. SQL Server detects the situation after four denials and refuses further shared locks. A livelock also occurs when read transactions monopolize a table or page, forcing a write transaction to wait indefinitely.</p></blockquote>
<p><strong>What is Optimistic Locking and Pessimistic Locking?</strong></p>
<blockquote data-secret="i6i2DG1tfR" class="wp-embedded-content"><p><a href="https://www.dbrnd.com/2016/04/database-theory-what-is-optimistic-locking-and-pessimistic-locking/">Database Theory: What is Optimistic Locking and Pessimistic Locking?</a></p></blockquote>
<p><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2016/04/database-theory-what-is-optimistic-locking-and-pessimistic-locking/embed/#?secret=i6i2DG1tfR" data-secret="i6i2DG1tfR" width="600" height="338" title="&#8220;Database Theory: What is Optimistic Locking and Pessimistic Locking?&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p><strong>What are the different ways to detect a deadlock in the SQL Server?</strong></p>
<blockquote data-secret="vINK5fCe3u" class="wp-embedded-content"><p><a href="https://www.dbrnd.com/2016/04/sql-server-8-different-ways-to-detect-a-deadlock-in-a-database/">SQL Server: 8 different ways to Detect a DeadLock in a Database</a></p></blockquote>
<p><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2016/04/sql-server-8-different-ways-to-detect-a-deadlock-in-a-database/embed/#?secret=vINK5fCe3u" data-secret="vINK5fCe3u" width="600" height="338" title="&#8220;SQL Server: 8 different ways to Detect a DeadLock in a Database&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p><strong>What happens after the Deadlock arise in the SQL Server?</strong></p>
<blockquote data-secret="Hkr0ZTvzXa" class="wp-embedded-content"><p><a href="https://www.dbrnd.com/2016/04/sql-server-what-happens-after-the-deadlock-arise/">SQL Server: What happens after the Deadlock arise?</a></p></blockquote>
<p><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2016/04/sql-server-what-happens-after-the-deadlock-arise/embed/#?secret=Hkr0ZTvzXa" data-secret="Hkr0ZTvzXa" width="600" height="338" title="&#8220;SQL Server: What happens after the Deadlock arise?&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p><strong>What is your ultimate strategies to avoid a Deadlock?</strong></p>
<blockquote data-secret="xedNE0qwWw" class="wp-embedded-content"><p><a href="https://www.dbrnd.com/2016/04/database-design-the-ultimate-strategies-to-avoid-deadlock/">Database Design: The Ultimate Strategies to avoid Deadlock</a></p></blockquote>
<p><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2016/04/database-design-the-ultimate-strategies-to-avoid-deadlock/embed/#?secret=xedNE0qwWw" data-secret="xedNE0qwWw" width="600" height="338" title="&#8220;Database Design: The Ultimate Strategies to avoid Deadlock&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p><strong>What is the Database level Locking?</strong></p>
<blockquote><p>With database level locks, the entire database is locked – which means that only one database session can apply any updates to the database. This type of lock is not often used, because it obviously prevents all users except one from updating anything in the database.</p></blockquote>
<p><strong>What is the File level Locking?</strong></p>
<blockquote><p>With a file lock level, an entire database file is locked. What exactly is a file in a database? Well, a file can have a wide variety of data – inside a file there could be an entire table, a part of a table, or even parts of different tables. Because of the variety of data stored inside a file, this type of lock level is less favored.</p></blockquote>
<p><strong>What is the Column level Locking?</strong></p>
<blockquote><p>A column level lock just means that some columns within a given row in a given table are locked. This form of locking is not commonly used because it requires a lot of resources to enable and release locks at this level. Also, there is very little support for column level locking in most database vendors.</p></blockquote>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2016/06/sql-server-database-lock-deadlock-block-and-isolation-interview-questions-and-answers-day-1/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>SQL Server: Script to find the status of Trace is running or not</title>
		<link>https://www.dbrnd.com/2016/03/sql-server-script-to-find-the-status-of-trace-is-running-or-not/</link>
					<comments>https://www.dbrnd.com/2016/03/sql-server-script-to-find-the-status-of-trace-is-running-or-not/#comments</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Fri, 18 Mar 2016 19:13:24 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server DBA Script]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[default trace]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[sys.traces]]></category>
		<category><![CDATA[Trace]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=1945</guid>

					<description><![CDATA[In this post, I am sharing a TSQL script to find the status of SQL Server Trace. The SQL Server Trace is very important for tracing the different SQL Server events like errors, object changes information and others. Using this script you can find different information of the Trace like Trace is running or not, [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F03%2Fsql-server-script-to-find-the-status-of-trace-is-running-or-not%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20find%20the%20status%20of%20Trace%20is%20running%20or%20not" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F03%2Fsql-server-script-to-find-the-status-of-trace-is-running-or-not%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20find%20the%20status%20of%20Trace%20is%20running%20or%20not" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F03%2Fsql-server-script-to-find-the-status-of-trace-is-running-or-not%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20find%20the%20status%20of%20Trace%20is%20running%20or%20not" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F03%2Fsql-server-script-to-find-the-status-of-trace-is-running-or-not%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20find%20the%20status%20of%20Trace%20is%20running%20or%20not" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F03%2Fsql-server-script-to-find-the-status-of-trace-is-running-or-not%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20find%20the%20status%20of%20Trace%20is%20running%20or%20not" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F03%2Fsql-server-script-to-find-the-status-of-trace-is-running-or-not%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20find%20the%20status%20of%20Trace%20is%20running%20or%20not" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F03%2Fsql-server-script-to-find-the-status-of-trace-is-running-or-not%2F&#038;title=SQL%20Server%3A%20Script%20to%20find%20the%20status%20of%20Trace%20is%20running%20or%20not" data-a2a-url="https://www.dbrnd.com/2016/03/sql-server-script-to-find-the-status-of-trace-is-running-or-not/" data-a2a-title="SQL Server: Script to find the status of Trace is running or not"></a></p><p>In this post, I am sharing a TSQL script to find the status of SQL Server Trace. </p>
<p>The SQL Server Trace is very important for tracing the different SQL Server events like errors, object changes information and others. </p>
<p>Using this script you can find different information of the Trace like Trace is running or not, Type of the trace, File path of the trace. </p>
<p><a href="https://www.dbrnd.com/2015/05/script-to-enable-and-disable-default-trace-sql-server/" target="_blank"><strong>You can also visit this article to enable and disable SQL Server Default Trace. </strong></a></p>
<p>I am fetching require trace column using an sys.traces. </p>
<p><strong>Below is a script:</strong></p>
<pre class="crayon-plain-tag">SELECT 
	CASE T.is_default
		WHEN 1 THEN 'Default/System Trace'
		WHEN 0 THEN 'User Defined Trace'
	END AS TraceType
	,CASE T.status
		WHEN 1 THEN 'Running'
		WHEN 0 THEN 'Stopped'
	END AS TraceStrace
	,ES.session_id AS SessionID
	,ES.login_name AS LoginName
	,T.Path AS TraceFilePath
FROM sys.traces AS T
LEFT JOIN sys.dm_exec_sessions AS ES
	ON T.reader_spid = ES.session_id</pre> </p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2016/03/sql-server-script-to-find-the-status-of-trace-is-running-or-not/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Script to Enable and Disable the Default Trace in SQL Server</title>
		<link>https://www.dbrnd.com/2015/05/script-to-enable-and-disable-default-trace-sql-server/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sat, 30 May 2015 17:33:43 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[default trace]]></category>
		<category><![CDATA[profiler]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[SQL trace]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=212</guid>

					<description><![CDATA[In this post, I am sharing a script to enable and disable default trace in SQL Server. SQL Server 2005 introduces this default trace. Using default trace, we can capture different events of SQL Server like errors, objects changes etc. You can also run this trace file using SQL Server Profiler. The Default location of [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F05%2Fscript-to-enable-and-disable-default-trace-sql-server%2F&amp;linkname=Script%20to%20Enable%20and%20Disable%20the%20Default%20Trace%20in%20SQL%20Server" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F05%2Fscript-to-enable-and-disable-default-trace-sql-server%2F&amp;linkname=Script%20to%20Enable%20and%20Disable%20the%20Default%20Trace%20in%20SQL%20Server" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F05%2Fscript-to-enable-and-disable-default-trace-sql-server%2F&amp;linkname=Script%20to%20Enable%20and%20Disable%20the%20Default%20Trace%20in%20SQL%20Server" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F05%2Fscript-to-enable-and-disable-default-trace-sql-server%2F&amp;linkname=Script%20to%20Enable%20and%20Disable%20the%20Default%20Trace%20in%20SQL%20Server" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F05%2Fscript-to-enable-and-disable-default-trace-sql-server%2F&amp;linkname=Script%20to%20Enable%20and%20Disable%20the%20Default%20Trace%20in%20SQL%20Server" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F05%2Fscript-to-enable-and-disable-default-trace-sql-server%2F&amp;linkname=Script%20to%20Enable%20and%20Disable%20the%20Default%20Trace%20in%20SQL%20Server" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F05%2Fscript-to-enable-and-disable-default-trace-sql-server%2F&#038;title=Script%20to%20Enable%20and%20Disable%20the%20Default%20Trace%20in%20SQL%20Server" data-a2a-url="https://www.dbrnd.com/2015/05/script-to-enable-and-disable-default-trace-sql-server/" data-a2a-title="Script to Enable and Disable the Default Trace in SQL Server"></a></p><p>In this post, I am sharing a script to enable and disable default trace in SQL Server.</p>
<p>SQL Server 2005 introduces this default trace.<br />
Using default trace, we can capture different events of SQL Server like errors, objects changes etc.</p>
<p>You can also run this trace file using SQL Server Profiler.</p>
<p>The Default location of this trace file is C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\.</p>
<p>Default trace enabled by default, but as per the requirement, we can disable or enable it.</p>
<p><b>Below is a script to disable default trace : </b></p>
<pre class="crayon-plain-tag">EXEC sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
EXEC sp_configure 'default trace enabled', 0;
GO
RECONFIGURE;
GO
EXEC sp_configure 'show advanced options', 0;
GO
RECONFIGURE;
GO</pre>
<p><b>Below is a script to enable default trace : </b><br />
<pre class="crayon-plain-tag">EXEC sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
EXEC sp_configure 'default trace enabled', 1;
GO
RECONFIGURE;
GO
EXEC sp_configure 'show advanced options', 0;
GO
RECONFIGURE;
GO</pre>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
