<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Cleveland DBA</title>
	
	<link>http://colleenmorrow.com</link>
	<description>SQL Server and Oracle database administration in sunny Cleveland, OH</description>
	<lastBuildDate>Thu, 18 Apr 2013 01:15:55 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/ClevelandDBA" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="clevelanddba" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Event Notifications 101 – Intro to Event Notifications</title>
		<link>http://colleenmorrow.com/2013/04/15/event-notifications-101-intro-to-event-notifications/</link>
		<comments>http://colleenmorrow.com/2013/04/15/event-notifications-101-intro-to-event-notifications/#comments</comments>
		<pubDate>Mon, 15 Apr 2013 13:30:23 +0000</pubDate>
		<dc:creator>Colleen M. Morrow</dc:creator>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[Auditing]]></category>
		<category><![CDATA[Event Notifications]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://colleenmorrow.com/?p=1684</guid>
		<description><![CDATA[Once upon a time, in a blog post far, far away, I started talking about auditing in SQL Server.  And I told you all about how to use SQL Audit to monitor what&#8217;s going on in your databases.  Remember that?  If you do, you might also recall that I mentioned there being more than one [...]]]></description>
				<content:encoded><![CDATA[<p>Once upon a time, in a <a title="SQL Server Auditing – Getting started" href="http://colleenmorrow.com/2012/07/03/sql-server-auditing-getting-started/">blog post far, far away</a>, I started talking about auditing in SQL Server.  And I told you all about how to use SQL Audit to monitor what&#8217;s going on in your databases.  Remember that?  If you do, you might also recall that I mentioned there being more than one way to audit SQL Server.  Well, it&#8217;s been a while, but I&#8217;m here to pick up that thread, and the next method I want to tell you about is what I consider to be the most under-appreciated features of SQL Server: Event Notifications.</p>
<p>Event Notifications were first introduced in SQL 2005, and, unlike some other features I could mention (I&#8217;m looking at you SQL Audit), it&#8217;s available in <em>all</em> editions.  So you don&#8217;t need to shell out beaucoup bucks to audit your instances.  You just need to do a little TSQL coding (nothing too scary, I promise).  I should mention here that Event Notifications are based on the SQL Trace architecture, and if you&#8217;ve been paying attention you&#8217;ll know that SQL Trace has been deprecated.  So the future of Event Notifications is a bit cloudy at the moment.  I really hope MS finds a way to keep it, because there&#8217;s no other feature that can take its place at this time.  So if you&#8217;re listening, Microsoft bigwigs, here&#8217;s my plea:  keep Event Notifications!!! Please?</p>
<h2>Why I like Event Notifications</h2>
<p>Why all the fuss?  Well, Event Notifications are kind of like SQL Trace and DDL/Logon Triggers had a baby and that kid got the best part of both parents.  Like SQL Trace, Event Notifications work asynchronously, meaning outside the scope of the transaction that caused the event.  This means that the event notification&#8217;s work doesn&#8217;t use the resources that transaction was using, and more importantly, it won&#8217;t impact that transaction if something goes horribly awry (think errors, blocking, etc.).  Unfortunately, this asynchronous-ness has its price.  Because it&#8217;s working outside the scope of the transaction, the event notification can&#8217;t be rolled back if the firing transaction rolls back.  And along those same lines, an event notification can&#8217;t roll back the firing event, like a trigger could.  (So if you&#8217;re looking for something that will prevent events from happening, Event Notifications aren&#8217;t the answer.)</p>
<p>Like triggers, however, Event Notifications can do more than just record an event, they can respond to it.  We&#8217;ll go more into this next time when I talk about how they work, but let&#8217;s just say that, since Event Notifications work hand in hand with Service Broker, they can be used to perform actions.  What kind of actions?  They can insert event information into a table, obviously, so no more messing with multiple trace files (whoohoo!).  But they can also do things like send an email.  Want to know the moment one of your developers modifies a stored procedure?  Event Notifications can do that.</p>
<p>Because they use the SQL Trace architecture, Event Notifications are very low impact.  They do incur some overhead due to their use of XML, but this is minimal and shouldn&#8217;t be noticeable.</p>
<h2>What can Event Notifications audit?</h2>
<p>It might be easier to ask that they can&#8217;t audit.  Really, what events you can audit will vary based on the scope of the event notification.  You can define it at the SERVER or DATABASE level, and obviously certain events only make sense at a certain scope, but other events are available at both scopes.</p>
<p>You can query the sys.event_notification_event_types DMV to see a full list of all events and event groups, but in a nutshell, you can use Event Notifications to audit:</p>
<ul>
<li>all DDL events &#8211; Things like CREATE TABLE, ALTER PROCEDURE, etc. are obvious candidates, but you can also audit CREATE STATISTICS to monitor SQL Server&#8217;s creation of auto stats, or what about linked server modifications using the ALTER_LINKED_SERVER event?</li>
<li>some trace events &#8211; How about monitoring when a query is missing a join predicate or missing column stats?  What about auditing data or log file auto growth?  That might be information worth knowing about.</li>
<li>security events &#8211; Monitor failed logins, or all logins, as needed.</li>
<li>DML events &#8211; Not too many people know this, but you can also use Event Notifications to monitor object access with the AUDIT_SCHEMA_OBJECT_ACCESS_EVENT.  Like SQL Audit, this event is monitored at the time of the permission check, so you can audit not only successful attempts at access, but unsuccessful attempts, too.  It&#8217;s worth noting that this event is only available at the SERVER scope.  Which means it will fire for <em>every</em> object access event in the instance.</li>
</ul>
<p>What can&#8217;t you audit with Event Notifications?  Temporary objects.  They won&#8217;t fire for local or global temporary tables or temporary stored procedures.  So no monitoring of TempDB usage here.</p>
<h2>So what&#8217;s next?</h2>
<p>That&#8217;s a basic overview of Event Notifications.  In the next post, I&#8217;ll go into how they work and creating a basic event notification. Stay tuned&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://colleenmorrow.com/2013/04/15/event-notifications-101-intro-to-event-notifications/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SQLSaturday #204, Detroit</title>
		<link>http://colleenmorrow.com/2013/04/14/sqlsaturday-204-detroit/</link>
		<comments>http://colleenmorrow.com/2013/04/14/sqlsaturday-204-detroit/#comments</comments>
		<pubDate>Sun, 14 Apr 2013 13:22:02 +0000</pubDate>
		<dc:creator>Colleen M. Morrow</dc:creator>
				<category><![CDATA[Events]]></category>

		<guid isPermaLink="false">http://colleenmorrow.com/?p=1679</guid>
		<description><![CDATA[Date: March 16, 2013 Session 1 Title: SQL Audit &#8211; Auditing doesn&#8217;t have to be boring Abstract: Let&#8217;s face it, auditing isn&#8217;t fun. But if you&#8217;re a DBA, you need to know what&#8217;s going on in your SQL Server instance. Fortunately, SQL Audit makes it easy. In this session, we&#8217;ll cover what you can and [...]]]></description>
				<content:encoded><![CDATA[<p><strong>Date:</strong> March 16, 2013</p>
<h2>Session 1</h2>
<p><strong>Title:</strong> SQL Audit &#8211; Auditing doesn&#8217;t have to be boring</p>
<p><strong>Abstract:</strong></p>
<p>Let&#8217;s face it, auditing isn&#8217;t fun. But if you&#8217;re a DBA, you need to know what&#8217;s going on in your SQL Server instance. Fortunately, SQL Audit makes it easy. In this session, we&#8217;ll cover what you can and can&#8217;t audit using SQL Audit, enhancements in 2012, configuring database and server audits, ways to process output, and ideas for how to implement SQL Audit on a larger scale. Auditing doesn&#8217;t have to be hard. And with the help of a little custom coding, it can even be fun.</p>
<p><strong>Level:</strong> Intermediate</p>
<h2>Session 2</h2>
<p><strong>Title:</strong> So I started this blog…now what?</p>
<p><strong>Abstract:</strong></p>
<p>Ever thought about trying your hand at blogging? Or maybe you’ve started a blog but struggle with what to write about. We’ll take a beginner’s look at blogging and examine what makes a great blog, finding topics, finding your voice, building authority and credibility, and setting you on the road to blogging stardom.</p>
<p><strong>Level:</strong> Beginner</p>
]]></content:encoded>
			<wfw:commentRss>http://colleenmorrow.com/2013/04/14/sqlsaturday-204-detroit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I’ve got mad SQLSkills</title>
		<link>http://colleenmorrow.com/2013/02/11/ive-got-mad-sqlskills/</link>
		<comments>http://colleenmorrow.com/2013/02/11/ive-got-mad-sqlskills/#comments</comments>
		<pubDate>Mon, 11 Feb 2013 14:30:06 +0000</pubDate>
		<dc:creator>Colleen M. Morrow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Professional Development]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[training]]></category>

		<guid isPermaLink="false">http://colleenmorrow.com/?p=1663</guid>
		<description><![CDATA[Last week I was fortunate enough to attend SQLSkills IE1 class in Tampa. Fortunate to have an employer willing to send me to that kind of training, but also because Tampa in February is way better than Cleveland in February. Not that I really got to enjoy the sunshine and warmth much, because let me tell [...]]]></description>
				<content:encoded><![CDATA[<div id="attachment_1664" class="wp-caption alignright" style="width: 280px"><a href="http://www.sqlskills.com/"><img class="size-full wp-image-1664" title="SQLSkills" src="http://colleenmorrow.com/wp-content/uploads/2013/02/SQLSkills.png" alt="SQLSkills" width="270" height="113" /></a><p class="wp-caption-text">Digging the new logo</p></div>
<p>Last week I was fortunate enough to attend <a title="SQLSkills IE1" href="http://www.sqlskills.com/t_immersioninternalsdesign.asp" target="_blank">SQLSkills IE1</a> class in Tampa. Fortunate to have an employer willing to send me to that kind of training, but also because Tampa in February is <em>way</em> better than Cleveland in February. Not that I really got to enjoy the sunshine and warmth much, because let me tell you, they call it an &#8220;immersion event&#8221; for a reason. 8+ hours of intense SQL server training, usually complemented with a couple more hours of SQL-related activities in the evening. It makes for 5 very long days, but it was so worth it.</p>
<h2>A week of SQL Server</h2>
<p>We started out the week with Paul (<a title="Paul Randal's blog" href="http://www.sqlskills.com/blogs/paul/" target="_blank">b</a> | <a title="@paulrandal" href="https://twitter.com/PaulRandal" target="_blank">t</a>) giving us a solid foundation of database structures and datafile internals. From the structure of a record, to how it&#8217;s placed on a page, allocation bitmaps, and compression, with demos using DBCC IND and DBCC PAGE. It&#8217;s very dense stuff, and to be honest, for me this isn&#8217;t the most exciting topic, but it&#8217;s important for truly understanding how SQL works. After that we moved on to datafile internals, talking about physical layout, storage considerations, file maintenance and tempdb. After that Kimberly (<a title="Kimberly Tripp's blog" href="http://www.sqlskills.com/blogs/kimberly/" target="_blank">b</a> | <a title="@kimberlyltripp" href="https://twitter.com/KimberlyLTripp" target="_blank">t</a>) closed out the day talking about locking and blocking, how data modifications work under the covers, transactions and savepoints.</p>
<p>That was just day 1. On day 2 Kimberly continued with more on locking, then went into a discussion on isolation, focusing on snapshot isolation and how that works internally. Paul then covered logging and recovery, VLFs, how transactions are logged and rolled back, and the internals of a checkpoint. Another intense day.</p>
<p>Day 3 focused primarily on indexing and data access. Kimberly started out by explaining table and index structures, making sure we understood the importance of a good clustering key and its impact on performance and maintenance. From there she segued into data access internals: the tipping point for index usage, the benefits of covering indexes and filtered indexes. Paul closed out the day discussing the ins and outs of index fragmentation.</p>
<p>Thursday&#8217;s topic du jour? Statistics. And let me tell you: Kimberly <em>loves</em> to talk about statistics. She promised us in the beginning of the week that even if we expected the stats module to be the driest of the class, we would change our minds by the time she finished. And she was right. Stats are pretty darn interesting, and having a good understanding of how they&#8217;re gathered and used, both by SQL and by <em>you</em>, is critical to good performance. That&#8217;s one module I&#8217;ll be reviewing soon.</p>
<p>We closed out the week learning about indexing strategies, table design, and partitioning. My only &#8220;complaint&#8221; about the whole week was that I wish we&#8217;d had more time on partitioning. Though, Kimberly did acknowledge that there wasn&#8217;t enough time in this class to do partitioning justice and they&#8217;re talking about an IE5 that covers it more in depth. What we did cover, however, gave me ideas on how both partitioned tables and partitioned views could be used on large tables.</p>
<h2>Brain overload</h2>
<p>It&#8217;s a lot of information being thrown at you in 5 days, and even though Paul and Kimberly do a great job of presenting it in a very easy to understand manner, you need to keep in mind that you&#8217;re not going to absorb it all in one week. While I would have loved to stay for IE2, which is more directly applicable to my current job, I&#8217;m actually glad to have a chance for everything from this week to firm up in my head. That way when I do take IE2, I go in with a solid foundation.</p>
<p>Some tips if you&#8217;re planning on attending:</p>
<ul>
<li>Throughout the week I kept a separate list of resources I wanted to check out further once the class was over. I didn&#8217;t want them buried amongst the other module notes.</li>
<li>Get plenty of sleep. This isn&#8217;t a conference! You&#8217;ll want to be rested to make the most of the class.</li>
<li>You won&#8217;t &#8220;get&#8221; everything they cover during the day, so you&#8217;ll want to review the materials before the next day. That way you can ask questions if something&#8217;s still not clear. Personally, I found it more effective to get up a little earlier and review in the morning when I was fresh.</li>
<li>Ask questions. There are no stupid questions. If something doesn&#8217;t make sense to you, ask!</li>
<li>Disconnect at much as you can.   I realize that you&#8217;ll probably need to keep in touch with your job, but try to limit it to breaks and off hours.</li>
</ul>
<h2>Is it worth it?</h2>
<p>Do you know what thought kept popping into my head throughout the week? &#8220;I wish I&#8217;d known that at my last job.&#8221; There were so my scenarios and problems that Paul and Kimberly talked about that I&#8217;d seen on a regular basis. And had I had this training then, I could have addressed them so much better.  That&#8217;s OK though, from here forward I&#8217;ll be able to work with SQL Server more effectively.</p>
<p>Is it expensive? Compared to other classes you could probably take locally, sure. Especially when you add in travel costs, since it&#8217;s not likely for the majority of us that these events will happen in our home town. But you&#8217;ll never get this level of training from one of those local classes. You just won&#8217;t.</p>
<p>We talk about training a lot, about whose responsibility it is: ours or our employer&#8217;s. I&#8217;m not going to debate that now, but I will say this: you don&#8217;t ask, you don&#8217;t get. Ask your manager. Make your argument as best you can. And if he/she still says no, find a way to send yourself. You won&#8217;t regret a single penny. And to you managers out there: absolutely send your DBAs, but send your developers, too. This isn&#8217;t a class just for admins. Developers will also benefit from a solid understanding of how SQL Server works.</p>
]]></content:encoded>
			<wfw:commentRss>http://colleenmorrow.com/2013/02/11/ive-got-mad-sqlskills/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>NEOOUG meeting – Oracle 12c</title>
		<link>http://colleenmorrow.com/2013/01/31/neooug-meeting-oracle-12c/</link>
		<comments>http://colleenmorrow.com/2013/01/31/neooug-meeting-oracle-12c/#comments</comments>
		<pubDate>Thu, 31 Jan 2013 14:30:57 +0000</pubDate>
		<dc:creator>Colleen M. Morrow</dc:creator>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://colleenmorrow.com/?p=1650</guid>
		<description><![CDATA[Last week I attended the Northeast Ohio Oracle Users Group&#8217;s (NEOOUG) first meeting of 2013.  The main topic of the day was the upcoming release of Oracle 12c.  The &#8220;c&#8221; stands for &#8220;cloud&#8221;, and the focus is on making private cloud environments easier to deploy and manage. Pluggable Databases Up til now in Oracle, every [...]]]></description>
				<content:encoded><![CDATA[<p>Last week I attended the Northeast Ohio Oracle Users Group&#8217;s (<a title="NEOOUG" href="https://www.neooug.org/" target="_blank">NEOOUG</a>) first meeting of 2013.  The main topic of the day was the upcoming release of Oracle 12c.  The &#8220;c&#8221; stands for &#8220;cloud&#8221;, and the focus is on making private cloud environments easier to deploy and manage.</p>
<h2>Pluggable Databases</h2>
<p>Up til now in Oracle, every database required its own memory structures and background processes.  You could have multiple schemas using the same database/instance, but if you wanted to have separate databases, you needed to spin up a new instance.  This meant managing memory, resources, patching, etc. between two separate environments.  Spin up a couple more, and you can see where the management nightmare begins.  Well, with version 12c, Oracle is introducing the concept of pluggable databases (PDBs).  The idea is that you install a single container database (CDB), which manages the memory and background processes, and then you &#8220;plug in&#8221; user databases (the PDBs) into the CDB.  All of the PDBs share the same pool of memory and processes.  So instead of multiple instances, each with a single database, you now have a single instance housing multiple databases.  Hmm, where have I heard that before&#8230;</p>
<p><a href="http://colleenmorrow.com/2013/01/31/neooug-meeting-oracle-12c/oracle_12c_database_architecture/" rel="attachment wp-att-1651"><img class="alignnone size-full wp-image-1651" title="oracle_12C_database_architecture" src="http://colleenmorrow.com/wp-content/uploads/2013/01/oracle_12C_database_architecture.png" alt="" width="505" height="175" /></a></p>
<p>Anyway, in addition to making resource management easier, it also makes patching easier, since you patch the container database and the patch is applied to all of the plugged in databases.  The obvious question then was:  what if you have an app that can&#8217;t be patched, like your ERP system?  In that case, you can spin up a new container database, unplug the ERP database from the first container and plug it into the new container.</p>
<p>There were still some unanswered questions surrounding the whole multitenancy concept.  Could you plug a PDB into a lower version CDB?  Does each PDB have its own redo logs, control files, UNDO and TEMP spaces, etc.  Details like that aren&#8217;t clear yet, or at least they weren&#8217;t clear at the meeting.  What <em>is</em> known is that you&#8217;ll get one CDB and one PDB out of the box.  Additional PDBs are a licensed feature ($).</p>
<h2>But wait, there&#8217;s more!</h2>
<p>While the pluggable database change was the big news of the afternoon, there are other new features in 12c that are also worth noting.</p>
<ul>
<li><strong>Data Guard Far Sync</strong> &#8211; introduces the ability to asynchronously replicate your database to another geographically separate datacenter through the use of a Far Sync database.  The Far Sync database is a stripped down database composed of only control files, redo logs, and enough data space to house the redo data being sent to the remote standby database.  The idea is that the primary database synchronously sends redo data to the Far Sync database.  The Far Sync compresses the redo data and sends it asynchronously to the standby database.</li>
<li><strong>Information Lifecycle Management</strong> &#8211; tracks extent or block-level statistics on read and update activity.  This information can then be used to create a heat map of how data is being utilized (or not utilized) to better plan how to treat that data when it comes to storage.  Business rules can also be put in place to automate partition compression or movement based on usage.  It&#8217;s also smart enough to exclude DDL, statistics maintenance, and reads that result from full table scans.</li>
<li><strong>Data Redaction</strong> &#8211; dynamic data masking for queries based on rules created in the database.  I thought this one was pretty neat, since previously you had to code the redaction of sensitive data at the application level.  But this obviously left you open to other query tools.  Now the database handles the redaction, based on business rules you create.</li>
</ul>
<p>And that&#8217;s all, folks.  If you&#8217;re interested in becoming more involved in the Oracle community here in the Cleveland area, check out the NEOOUG&#8217;s web site and consider becoming a member.</p>
]]></content:encoded>
			<wfw:commentRss>http://colleenmorrow.com/2013/01/31/neooug-meeting-oracle-12c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changes</title>
		<link>http://colleenmorrow.com/2013/01/28/changes/</link>
		<comments>http://colleenmorrow.com/2013/01/28/changes/#comments</comments>
		<pubDate>Mon, 28 Jan 2013 14:30:41 +0000</pubDate>
		<dc:creator>Colleen M. Morrow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Professional Development]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://colleenmorrow.com/?p=1646</guid>
		<description><![CDATA[Last month I mentioned that I&#8217;d like to start including Oracle stuff on this blog.  I&#8217;m getting back into that world again as part of the new job, and this blog has always been, first and foremost, a way for me to document and share what I&#8217;m learning.  Now I realize that a lot of [...]]]></description>
				<content:encoded><![CDATA[<p>Last month I mentioned that I&#8217;d like to start including Oracle stuff on this blog.  I&#8217;m getting back into that world again as part of the new job, and this blog has always been, first and foremost, a way for me to document and share what I&#8217;m learning.  Now I realize that a lot of you might not be too interested in the Oracle side of things, so I&#8217;m offering some new subscription options.  In addition to the main <a title="Subscribe to Cleveland DBA" href="http://feeds.feedburner.com/ClevelandDBA" target="_blank">Cleveland DBA</a> RSS feed, I now have</p>
<ul>
<li>the SQL Server feed:  <a title="Subscribe to Cleveland DBA - SQL Server" href="http://feeds.feedburner.com/ClevelandDBA/SqlServer" target="_blank">Cleveland DBA &#8211; SQL Server</a></li>
<li>the Oracle feed:  <a title="Subscribe to Cleveland DBA - Oracle" href="http://feeds.feedburner.com/ClevelandDBA/Oracle" target="_blank">Cleveland DBA &#8211; Oracle</a></li>
</ul>
<p>Of course, you can still stick with the main feed you&#8217;re using now and get it all.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://colleenmorrow.com/2013/01/28/changes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Long time no blog…</title>
		<link>http://colleenmorrow.com/2012/12/21/long-time-no-blog/</link>
		<comments>http://colleenmorrow.com/2012/12/21/long-time-no-blog/#comments</comments>
		<pubDate>Fri, 21 Dec 2012 14:30:39 +0000</pubDate>
		<dc:creator>Colleen M. Morrow</dc:creator>
				<category><![CDATA[Non-SQL Stuff]]></category>
		<category><![CDATA[Professional Development]]></category>
		<category><![CDATA[slacking off]]></category>

		<guid isPermaLink="false">http://colleenmorrow.com/?p=1596</guid>
		<description><![CDATA[So, you may have noticed that things have been a little quiet around here of late.  Sorry about that, I&#8217;ve kind of been dropping the ball when it comes to blogging. So where have I been?  Well, back in October I left my job of 12 years to move on to a new challenge.  Why [...]]]></description>
				<content:encoded><![CDATA[<p>So, you may have noticed that things have been a little quiet around here of late.  Sorry about that, I&#8217;ve kind of been dropping the ball when it comes to blogging.</p>
<p>So where have I been?  Well, back in October I left my job of 12 years to move on to a new challenge.  Why did I finally decide to leave after 12 years?  Well, when I started at that firm, I had no DBA experience.  I had done some tech support for Informix, mostly for their I4GL and New Era programming languages, and I&#8217;d done some development in I4GL, but I wanted to move into database administration.  The firm was looking for someone with DBA experience with Informix, as well as knowledge of the I4GL language.  They took a chance on me and it worked out well for both of us.  Informix was eventually phased out in favor of Oracle, and then SQL Server.  Each new phase gave me an opportunity to expand my skill set.  It kept me challenged.</p>
<p>The thing about working at one place for so long, especially a large shop, is that you really only get exposed to one way of doing things.  And while I appreciate everything I learned during my time there, I knew the only way to push my skillset to the next level was to move on.  So when this opportunity presented itself, I jumped on it.</p>
<p>I won&#8217;t go into details here regarding my new employer, but suffice it to say they&#8217;ve been keeping me busy.  I&#8217;ve already learned a lot of new stuff, and I&#8217;ve been brushing up on my somewhat rusty Oracle skills.  Since I use this blog in part as a way to record what I&#8217;ve learned for later reference, as well as to solidify it in my head, I&#8217;ve been thinking of how I can incorporate the Oracle stuff.  I know a lot of us out there support both Oracle and SQL Server, and there are quite a few reluctant &#8220;accidental Oracle DBAs&#8221; that may find the information useful, too.  And there just doesn&#8217;t seem to be the same number of good Oracle blogs out there like there is for SQL Server.  Maybe a separate blog is the way to go, or perhaps a separate page.  I&#8217;d prefer to keep it all on the same domain.  Perhaps I&#8217;m overthinking it, maybe it should all be mixed together and if you aren&#8217;t interested in the Oracle stuff, don&#8217;t read it.  I&#8217;d just need to update my syndication feeds.</p>
<p>And then there&#8217;s life.  My youngest brother got married and we had a fun trip up to Buffalo to celebrate with the family.  Two of my best friends moved across country, and there were numerous social activities in order to squeeze every last drop of fun out of them before they left.  Last week we spent an evening at the Severance Hall where they showed Charlie Chaplin&#8217;s Modern Times while the Cleveland Orchestra played the original score.  As much as I love old movies, I&#8217;d never seen any Charlie Chaplin films before.  It was so much fun.  We splurged on box seats, so now I&#8217;ll be spoiled for anything else.</p>
<p>The holiday season buys me some slack, I&#8217;m sure.  After all, I did bake 22 dozen cookies this weekend (8 dozen rugelach, 8 dozen pecan tassies, and 6 dozen sugar cookies, if you&#8217;re wondering).  Everyone is busy this time of year and I&#8217;m seeing a lot of blogs &#8220;go dark&#8221; until the new year.  So I&#8217;ll probably be quiet a bit longer, but hopefully you&#8217;ll still be here when I return in January.</p>
<p>Happy Holidays!</p>
<p>&nbsp;</p>
<div id="attachment_1598" class="wp-caption aligncenter" style="width: 330px"><a href="http://colleenmorrow.com/2012/12/21/long-time-no-blog/img_3804/" rel="attachment wp-att-1598"><img class="size-full wp-image-1598 " title="IMG_3804" src="http://colleenmorrow.com/wp-content/uploads/2012/12/IMG_3804.jpg" alt="" width="320" height="240" /></a><p class="wp-caption-text">Here, have a cookie.</p></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://colleenmorrow.com/2012/12/21/long-time-no-blog/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>WIT Wednesday</title>
		<link>http://colleenmorrow.com/2012/11/28/wit-wednesday-3/</link>
		<comments>http://colleenmorrow.com/2012/11/28/wit-wednesday-3/#comments</comments>
		<pubDate>Wed, 28 Nov 2012 14:30:11 +0000</pubDate>
		<dc:creator>Colleen M. Morrow</dc:creator>
				<category><![CDATA[Professional Development]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[WIT]]></category>
		<category><![CDATA[Women in Technology]]></category>

		<guid isPermaLink="false">http://colleenmorrow.com/?p=1562</guid>
		<description><![CDATA[On the fourth Wednesday of each month, the Women in Technology Virtual Chapter of PASS has its monthly conference call to discuss and plan upcoming WIT activities, be it SQL Saturday WIT panels or the WIT luncheon at the annual PASS Summit. To help promote women in technology, I&#8217;m declaring the fourth Wednesday of each [...]]]></description>
				<content:encoded><![CDATA[<p>On the fourth Wednesday of each month, the Women in Technology Virtual Chapter of PASS has its monthly conference call to discuss and plan upcoming WIT activities, be it SQL Saturday WIT panels or the WIT luncheon at the annual PASS Summit. To help promote women in technology, I&#8217;m declaring the fourth Wednesday of each month &#8220;WIT Wednesday&#8221; here at the Cleveland DBA.</p>
<h2>WIT Spotlight: Erin Stellato</h2>
<p><a href="http://colleenmorrow.com/2012/11/28/wit-wednesday-3/erin-stellato-487x500/" rel="attachment wp-att-1563"><img class="alignright size-full wp-image-1563" title="erin-stellato-487x500" src="http://colleenmorrow.com/wp-content/uploads/2012/11/erin-stellato-487x500.jpg" alt="" width="341" height="350" /></a>This month we&#8217;re talking to the newest member of SQLSkills.com: Erin Stellato (<a title="Erin Stellato at SQLSkills" href="http://www.sqlskills.com/blogs/erin/" target="_blank">b</a> | <a title="@erinstellato" href="https://twitter.com/erinstellato" target="_blank">t</a>).  Erin and I are members of the same local PASS chapter, and her advice and support has been invaluable as I&#8217;ve worked to establish myself in the SQL Community.  She&#8217;s a stellar example of what #sqlfamily means.</p>
<h4>There&#8217;s a lot of talk these days about getting girls and young women to enter &#8211; and stay &#8211; in technology careers.  As parents, what can we do to encourage more girls to enter STEM fields?</h4>
<p>This question generates two thoughts…  First, I think it’s incredibly important to encourage females to enter STEM fields, but I think it’s also important to recognize that not every female will be interested in said fields.  As someone who loves technology, it’s naïve of me to think that my daughter will as well, just because I do.  I don’t mean to say that we shouldn’t be supportive and encouraging, but realize that 100% of young women will not want a technology career.</p>
<p>That said, for those that are interested, or haven’t made up their mind, I think <strong>the</strong> most important thing adults can do is engage in technology <em>with</em> young girls.  It reminds me of what Kevin Kline said at the Women in Technology lunch at the PASS Summit earlier this month.  “Come in and sit next to me, for I have known goodness.”  If young women see what we are excited and passionate about, because we sit down and show them, and help them, it carries tremendous weight.  In those moments we are not just teaching girls about technology, we are also showing them what we think of it, how it inspires us, and how it’s not something of which to be ashamed.   It’s not enough to buy my daughter a LeapPad or an InnoTab, Legos or some Tinker Toys, I need to sit down with her and build and play.</p>
<h4>How has the transition been to working from home?  What advice can you share with someone looking to make that switch?</h4>
<p>It’s hard to separate out the transition to working from home from the transition to the new job because they’re so intertwined!  I gave working from home a lot of thought.  I knew that I would need a dedicated space, that I would need to be disciplined about my time, and that I would be spending a lot of time alone.  Initially I did not have dedicated space and that was a struggle.  But once I got my desk set up, it completely fell into place.  For anyone who works from home, you absolutely need your own area – ideally one where you can close a door.</p>
<p>I am still sorting out my work time.  When my kids are at school the hours fly by, and I am very focused during that time.  At first I would work after my kids got home from school, but then I realized that I wasn’t spending time with them.  Now when they’re home, they are my focus.  When they go to bed, then I can work again.  But it took a while for me to reconcile no longer working the “normal” hours of 9-5.  However, I think I’m a lot more effective working in smaller chunks of time.</p>
<p>As for so much time alone…I really like it.  It is nice to have time in my house, by myself, even if I’m working.  Some days I don’t turn on the radio, it’s just complete silence.  For anyone who is looking to switch to working from home, I recommend thinking about the phrase, “working remotely.”  It has a different meaning, to me, than working from home.</p>
<p>Working remotely means that I don’t go into an office (ever) and I rarely see my co-workers.  I thought about this a little bit beforehand, but I underestimated how important it was to me to <em>talk</em> to my colleagues on a regular basis.  It’s great to see people face-to-face, but the real value is the conversation and dialog.  Once I realized this, it was easy to remedy.  I set up regular calls and WebEx sessions with different people on the team, I know that I can call if I ever need to, and now I’m in a much better place.  I value my time working alone, and I feel like I am extremely productive, but I still need to interact with people over more than just email.</p>
<h4>So far, what&#8217;s been the best part of working at SQLSkills.com?  The toughest?<strong><br />
</strong></h4>
<p>Do I have to pick one best thing?  <img src='http://colleenmorrow.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />   I work with an amazing group of individuals.  That is the best thing about my job.  They are the best at what they do.  I appreciate that I can reach out to them as needed, asking for a review of an article or blog post, or an opinion on a client problem.  And they are people that I would like even if I didn’t work with them, which is even better.  Our team has a lot of fun, and I don’t take that for granted.  I think it’s a gift to work with people that you like as much as you much respect.</p>
<p>As for the toughest part…I would have to say it’s been the transition to working remotely, which I mentioned before and balancing my time.  When your office is in your house, it’s easy to spend many hours in front of a computer.  I’m still sorting out that balance.<br />
<strong></strong></p>
<h4><strong>You&#8217;ve come a long way since attending your first SQL Server conference in 2007. What do you hope to accomplish in the next 5 years?</strong></h4>
<p>I would like to present internationally.  I’ve presented at the PASS Summit the past two years and hope to present there again, but I would like to take it to the next level.</p>
<p>I’ve talked about getting my MCM before, and although that certification is changing slightly, it’s still a goal for me.</p>
<p>I haven’t defined any other goals yet, and I’m ok with that.  The last half of 2012 has brought great change for me, and I’m letting myself settle into where I am now before I decide what’s next.  I am very happy with where I am today.  It doesn’t mean I’m resting, or that I’m not always striving to improve, but deciding what’s next is big. I’m not quite there yet.<br />
<strong></strong></p>
<h4>In the movie of your life, who would be cast in the title role?</h4>
<p>This question makes me laugh <img src='http://colleenmorrow.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />   When I was in college I lived with seven friends in a huge house on Arbor street, and we often joked about “when they make a movie of our lives.”  So I’m sticking with who I picked back then, <em>many</em> years ago: Elizabeth Shue.</p>
<h2>Must-see WIT TV</h2>
<p>Some of you (hopefully <em>most</em> of you) just attended the PASS Summit and I&#8217;m sure you returned home inspired and full of ideas of how to do your job more effectively.  I know conferences have that effect on me; they recharge my battery and get me fired up again, like a SQL Server B-12 shot.  Hopefully the Summit inspired you to do something else, too: get up there and present.  There are some awesome speakers at the Summit, and they certainly know their stuff, don&#8217;t they?  But you know what?  They&#8217;re just like you.  Once upon a time they were brand new speakers and probably full of the same uncertainties you&#8217;re feeling.  It&#8217;s not easy to stand in front of a room of strangers and teach them.  They&#8217;ll ask questions you&#8217;re not prepared for.  They&#8217;ll challenge your knowledge of the topic.  That&#8217;s ok; it will help you learn.  And the next time you present, you&#8217;ll be better prepared.</p>
<p>So this month, in addition to a video, I&#8217;m featuring some sites to help you prospective speakers, you women especially, to get out there and start speaking.</p>
<ul>
<li><a href="http://geekfeminism.org/2012/05/21/how-i-got-50-women-speakers-at-my-tech-conference/" target="_blank">How I Got 50% Women Speakers at My Tech Conference</a></li>
<li><a href="http://weareallaweso.me/" target="_blank">We Are All Awesome!</a></li>
<li><a href="http://lynnlangit.wordpress.com/2012/01/04/technical-womenits-conference-submission-season/" target="_blank">Technical Women &#8211; It&#8217;s conference submission season!</a> (From Summit speaker Lynn Langit)</li>
<li><a href="http://liveyourtalk.com/" target="_blank">Live Your Talk </a>and the <a href="http://liveyourtalk.tumblr.com/" target="_blank">blog</a></li>
</ul>
<p>The video is from <a href="http://www.womenwhotech.com/" target="_blank">Women Who Tech</a>&#8216;s 2010 Telesummit (skip forward to about 2:30).</p>
<p><iframe src="http://player.vimeo.com/video/15603943" frameborder="0" width="400" height="300"></iframe></p>
<h2>Interested in supporting women in technology?</h2>
<ul>
<li>Go to the <a title="PASS Women in Technology Virtual Chapter" href="http://wit.sqlpass.org/" target="_blank">WIT website</a> and check out all the resources, blogs and coming events</li>
<li>Follow <a title="@PASS_WIT" href="https://twitter.com/PASS_WIT" target="_blank">@PASS_WIT</a> and #passwit on twitter</li>
<li>Email wit@sqlpass.org to be added to the WIT mailing list; you&#8217;ll also receive invitations to the monthly call</li>
<li>Participate in the monthly call</li>
<li>Attend WIT panels at <a title="SQLSaturday" href="http://www.sqlsaturday.com/" target="_blank">SQLSaturday</a> events</li>
<li>Attend the WIT luncheon at the PASS Summit</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://colleenmorrow.com/2012/11/28/wit-wednesday-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WIT Wednesday</title>
		<link>http://colleenmorrow.com/2012/10/24/wit-wednesday-2/</link>
		<comments>http://colleenmorrow.com/2012/10/24/wit-wednesday-2/#comments</comments>
		<pubDate>Wed, 24 Oct 2012 13:30:35 +0000</pubDate>
		<dc:creator>Colleen M. Morrow</dc:creator>
				<category><![CDATA[Professional Development]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[WIT]]></category>
		<category><![CDATA[Women in Technology]]></category>

		<guid isPermaLink="false">http://colleenmorrow.com/?p=1547</guid>
		<description><![CDATA[On the fourth Wednesday of each month, the Women in Technology Virtual Chapter of PASS has its monthly conference call to discuss and plan upcoming WIT activities, be it SQL Saturday WIT panels or the WIT luncheon at the annual PASS Summit. To help promote women in technology, I&#8217;m declaring the fourth Wednesday of each [...]]]></description>
				<content:encoded><![CDATA[<p>On the fourth Wednesday of each month, the Women in Technology Virtual Chapter of PASS has its monthly conference call to discuss and plan upcoming WIT activities, be it SQL Saturday WIT panels or the WIT luncheon at the annual PASS Summit. To help promote women in technology, I&#8217;m declaring the fourth Wednesday of each month &#8220;WIT Wednesday&#8221; here at the Cleveland DBA.</p>
<h2>WIT Spotlight: Christina Leo</h2>
<p><a href="http://colleenmorrow.com/2012/10/24/wit-wednesday-2/leo_headshot/" rel="attachment wp-att-1551"><img class="alignright size-full wp-image-1551" title="Leo_HeadShot" src="http://colleenmorrow.com/wp-content/uploads/2012/10/Leo_HeadShot.jpg" alt="" width="320" height="320" /></a>This month&#8217;s PASS woman in the spotlight is Idera Ace Christina Leo (<a title="Life is a Minestrone" href="http://christinaleo.net/" target="_blank">b</a> | <a title="@ChristinaLeo" href="https://twitter.com/christinaleo" target="_blank">t</a>).  Christina is a database developer/administrator, prolific speaker, intrepid traveler, fellow whisky-lover, and kettlebell-swinger from<span style="color: #000000;"> <del>Nashville, TN</del></span> Boston, MA.</p>
<h4>You work for a large company now, but you began at a small software start-up. What did you learn from that experience?</h4>
<p style="padding-left: 30px;">I think the most important lesson that I learned is that there is no such thing as &#8220;comfort zone&#8221;. When there are only a handful of you, you must be willing to wear whatever hat needs wearing to get the job done and move forward. Having the courage and drive to try things that seem uncomfortable at first will open a lot of doors. I&#8217;m often asked how a special education teacher ended up as a SQL Server developer. The short answer is that I kept trying on hats until I found the one that fit.</p>
<h4>How has being an Idera ACE impacted your career?</h4>
<p style="padding-left: 30px;">Community is the first word that comes to mind when considering how to answer this question. The ACE program was put together to help Idera connect with the SQL Server community, and I think that benefit goes both ways. Having the funds to speak at more events has allowed me to meet and connect with many more SQL folks. Having a bigger grapevine, so to speak, means I hear about job opportunities that others might not. Additionally, giving presentations is a bit like having a walking resume. It lets you get your foot a bit farther in the door when pursuing new challenges, simply because folks already know something about your skills. Want to move up to bigger and better things? Get out there and start connecting with the people who can make that happen. Start by volunteering with your local user group. Opportunities will abound from there.</p>
<h4>What&#8217;s your next challenge?</h4>
<p style="padding-left: 30px;">In late August, an opportunity presented itself to do some contract work for a large investment fund management group in Boston. I was ready for a change, so I jumped at the chance. I absolutely loved the area when I flew up for my final interviews, so I decided to pick up stakes and relocate altogether. I started my first week on October 15th, and I&#8217;m thrilled with the decision to go this route. I&#8217;m getting to work with some super sharp folks, and the development work is well beyond what I had been getting to do before. The database and its usage requirements are very specialized. All sorts of tricks have been implemented to make things work efficiently. I&#8217;ve got a whole new industry to learn, along with bringing my T-SQL ninja skills up to par. We often talk about &#8220;drinking from the fire hose&#8221; when we describe some of the 500-level sessions at the PASS Summit. Working at this new gig feels very much like that. The next several months will be spent absorbing every bit that I can as fast as I can.</p>
<h4>You travel quite a bit, can you share with us a memorable experience?</h4>
<p style="padding-left: 30px;">This is a tough one. I do love travelling to new places and have been blessed with the opportunity to go all over the U.S. as well as many places overseas. Two summers ago, I went on SQL Cruise Alaska. Besides getting to spend the week with some awfully smart SQL folks, I got to see some pretty amazing scenery. Glacier Bay was absolutely breathtaking; however, the highlight excursion for me was snorkeling in Ketchikan. While swimming through the middle of a kelp field, I suddenly remembered my teenage self, eagerly reading through dive magazines and hoping I would have a chance to visit some of the amazing places I was reading about. I instantly realized I was seeing a daydream come to life. That, combined with the sheer wealth of sea life to observe, then surfacing to see an enormous bald eagle sitting on a rock just feet away from me, definitely ranks high on the memorable experience list.</p>
<h4>Whisky of choice?</h4>
<p style="padding-left: 30px;">BenRiach Authenticus 21YO &#8211; I first had this particular whisky when several of us SQLFoodies got together for an amazing meal at WD-50 after SQL Saturday #158 NYC. After that first sip, I knew I&#8217;d found my favorite. I tend to gravitate toward heavily peated whiskies, and this one has enough smokiness to keep my attention, but what I think makes it amazing is its balance. Not too smoky, not too sweet . . . but just right. Goldilocks would most definitely approve.</p>
<h2>Must-see WIT TV</h2>
<p>This month&#8217;s featured video is from NASA&#8217;s <a title="Aspire to Inspire" href="http://women.nasa.gov/a2i/" target="_blank">Aspire To Inspire</a> program, aimed at encouraging and empowering young women and girls to enter STEM fields.</p>
<p><iframe src="http://www.youtube.com/embed/23UliVfrjXA" frameborder="0" width="560" height="315"></iframe></p>
<h2>Interested in supporting women in technology?</h2>
<ul>
<li>Go to the <a title="PASS Women in Technology Virtual Chapter" href="http://wit.sqlpass.org/" target="_blank">WIT website</a> and check out all the resources, blogs and coming events</li>
<li>Follow <a title="@PASS_WIT" href="https://twitter.com/PASS_WIT" target="_blank">@PASS_WIT</a> and #passwit on twitter</li>
<li>Email wit@sqlpass.org to be added to the WIT mailing list; you&#8217;ll also receive invitations to the monthly call</li>
<li>Participate in the monthly call</li>
<li>Attend WIT panels at <a title="SQLSaturday" href="http://www.sqlsaturday.com/" target="_blank">SQLSaturday</a> events</li>
<li>Attend the WIT luncheon at the PASS Summit</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://colleenmorrow.com/2012/10/24/wit-wednesday-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Audit – User-defined Audit Events</title>
		<link>http://colleenmorrow.com/2012/10/18/sql-audit-user-defined-audit-events/</link>
		<comments>http://colleenmorrow.com/2012/10/18/sql-audit-user-defined-audit-events/#comments</comments>
		<pubDate>Thu, 18 Oct 2012 13:30:05 +0000</pubDate>
		<dc:creator>Colleen M. Morrow</dc:creator>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[Auditing]]></category>
		<category><![CDATA[SQL Audit]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://colleenmorrow.com/?p=1530</guid>
		<description><![CDATA[One thing I failed to touch on during my series on SQL Audit was the use of user-defined events in audits. This was brought to my attention in a comment by one of my readers. He was trying to make use of user-defined events and was having a problem getting the output to actually write [...]]]></description>
				<content:encoded><![CDATA[<p>One thing I failed to touch on during my series on <a title="Toolbox" href="http://colleenmorrow.com/toolbox/" target="_blank">SQL Audit</a> was the use of user-defined events in audits. This was brought to my attention in a <a title="SQL Audit 201 – Creating an Audit Solution" href="http://colleenmorrow.com/2012/07/31/sql-audit-201-creating-an-audit-solution/">comment</a> by one of my readers. He was trying to make use of user-defined events and was having a problem getting the output to actually write to the audit file. Since I was writing some code to recreate the problem on my system anyway, I decided to post it here.</p>
<p>Why might you want to create a user-defined event audit in the first place? Well, we already know that we can use SQL Audit to audit access to certain objects. So let&#8217;s say we have a table with salary data. We can use the SCHEMA_OBJECT_ACCESS_GROUP to audit access to any object in that schema. We can also use SELECT, INSERT, UPDATE, and DELETE actions to audit those actions on specific objects. But let&#8217;s say even getting that granular will produce more audit output than we&#8217;d like. Suppose we only want to know when an employee&#8217;s salary is increased by more than 10%. We can&#8217;t do that with any of the canned actions. But we <em>can</em> do that with a custom event.</p>
<h2>Configure the audit</h2>
<p>The first step is to configure the audit object. Once we&#8217;ve got that configured we create the audit specification. This can be either a server audit spec or a database audit spec, depending on your needs. Just make sure to add the USER_DEFINED_AUDIT_GROUP action. And don&#8217;t forget to enable both the server audit and the audit spec.</p>
<pre class="brush: sql; title: ; notranslate"> USE [master]
GO

CREATE SERVER AUDIT [TestingUserDefinedEvents]
TO FILE
(	FILEPATH = N'D:\SQL2012\Audits'
	,MAXSIZE = 5 MB
	,MAX_ROLLOVER_FILES = 5
	,RESERVE_DISK_SPACE = OFF
)
WITH
(	QUEUE_DELAY = 1000
	,ON_FAILURE = CONTINUE
)
GO
ALTER SERVER AUDIT [TestingUserDefinedEvents] WITH (STATE = ON);
GO

USE [AdventureWorks2012]
GO

CREATE DATABASE AUDIT SPECIFICATION [UserDefinedEvents]
FOR SERVER AUDIT [TestingUserDefinedEvents]
ADD (USER_DEFINED_AUDIT_GROUP)
WITH (STATE = ON)
GO
 </pre>
<p>&nbsp;</p>
<h2>Writing to the audit</h2>
<p>To write to the audit log, we&#8217;ll use the sp_audit_write stored procedure. This built-in stored procedure accepts 3 parameters:</p>
<ul>
<li>@user_defined_event_id is a smallint used to identify the event</li>
<li>@succeeded is a binary flag used to specify whether the action was successful or not</li>
<li>@user_defined_information is an nvarchar string describing the event</li>
</ul>
<p>So, to test our audit, let&#8217;s run the following:</p>
<pre class="brush: sql; title: ; notranslate"> USE [AdventureWorks2012]
GO
EXEC sp_audit_write @user_defined_event_id =  27 ,
              @succeeded =  0
            , @user_defined_information = N'Testing a user defined event.' ;
 </pre>
<p>If we check the audit log, we should see the event.</p>
<p><a href="http://colleenmorrow.com/wp-content/uploads/2012/10/User-Defined-events.jpg"><img class="alignnone size-full wp-image-1531" title="User Defined events" src="http://colleenmorrow.com/wp-content/uploads/2012/10/User-Defined-events.jpg" alt="" width="820" height="437" /></a></p>
<p>&nbsp;</p>
<h2>Putting it into practice</h2>
<p>Back to our original purpose, we wanted to know whenever an employee&#8217;s salary was increased more than 10%. To do this, we can create a trigger. (As I&#8217;ve mentioned many times in the past, I&#8217;m not a developer, so no fair picking on my trigger code.)</p>
<pre class="brush: sql; title: ; notranslate"> USE AdventureWorks2012
GO

CREATE TRIGGER [humanresources].[SalaryMonitor] ON [humanresources].[employeepayhistory]
AFTER UPDATE
AS
declare   @oldrate money
		, @newrate money
		, @empid integer
		, @msg nvarchar(4000)

select	@oldrate = d.rate
from deleted d

select @newrate = i.rate, @empid = i.BusinessEntityID
from inserted i

IF @oldrate*1.10 &lt; @newrate
BEGIN
	SET @msg = 'Employee '+CAST(@empid as varchar(50))+' pay rate increased more than 10%'
	EXEC sp_audit_write @user_defined_event_id =  27 ,
              @succeeded =  1
            , @user_defined_information = @msg;
END
GO
 </pre>
<p>Now if we test the trigger by virtually doubling employee 4&#8242;s rate and only increasing employee 8&#8242;s rate by a small amount.</p>
<pre class="brush: sql; title: ; notranslate"> select * from HumanResources.EmployeePayHistory where BusinessEntityID= 4

Update HumanResources.EmployeePayHistory set rate = 59.8462
where BusinessEntityID=4 and RateChangeDate = '2006-01-15 00:00:00.000'

select * from HumanResources.EmployeePayHistory where BusinessEntityID= 8

Update HumanResources.EmployeePayHistory set rate = 41.8654
where BusinessEntityID=8 and RateChangeDate = '2003-01-30 00:00:00.000'
 </pre>
<p>We should see an audit record for employee 4 in the output, and we do.</p>
<p><a href="http://colleenmorrow.com/wp-content/uploads/2012/10/User-Defined-events-2.jpg"><img class="alignnone size-full wp-image-1532" title="User Defined events 2" src="http://colleenmorrow.com/wp-content/uploads/2012/10/User-Defined-events-2.jpg" alt="" width="820" height="437" /></a></p>
<p>&nbsp;</p>
<p>You might be wondering if you can configure an audit to only capture specific user-defined event IDs.  Great question, and you <em>can</em> by filtering on the user_defined_event_id field in the server audit.</p>
<p>So there you have it, another way to tailor SQL Audit a bit more to your specific needs. Happy auditing!</p>
]]></content:encoded>
			<wfw:commentRss>http://colleenmorrow.com/2012/10/18/sql-audit-user-defined-audit-events/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQLSaturday #171 Pittsburgh recap</title>
		<link>http://colleenmorrow.com/2012/10/09/sqlsaturday-171-pittsburgh-recap/</link>
		<comments>http://colleenmorrow.com/2012/10/09/sqlsaturday-171-pittsburgh-recap/#comments</comments>
		<pubDate>Tue, 09 Oct 2012 13:14:42 +0000</pubDate>
		<dc:creator>Colleen M. Morrow</dc:creator>
				<category><![CDATA[Professional Development]]></category>
		<category><![CDATA[presenting]]></category>
		<category><![CDATA[SQL Saturday]]></category>

		<guid isPermaLink="false">http://colleenmorrow.com/?p=1521</guid>
		<description><![CDATA[This past weekend I made the drive from Cleveland to Pittsburgh to attend SQLSaturday #171.  They picked the perfect time of year to host this event, the leaves changing color made for a really pretty drive. The Event The weekend started with the speaker dinner, held inside the Rivers Casino.  It was an evening of [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://colleenmorrow.com/2012/10/09/sqlsaturday-171-pittsburgh-recap/sqlsat171_web/" rel="attachment wp-att-1522"><img class="alignright size-full wp-image-1522" title="sqlsat171_web" src="http://colleenmorrow.com/wp-content/uploads/2012/10/sqlsat171_web.png" alt="SQLSaturday 171 " width="236" height="115" /></a>This past weekend I made the drive from Cleveland to Pittsburgh to attend SQLSaturday #171.  They picked the perfect time of year to host this event, the leaves changing color made for a really pretty drive.</p>
<h2>The Event</h2>
<p>The weekend started with the speaker dinner, held inside the Rivers Casino.  It was an evening of good food and good conversation.  I met some folks I&#8217;d previously only &#8220;met&#8221; online, and got to see some now familiar faces again.  The drive back to the hotel was quite interesting.  This was my first visit to Pittsburgh and, based on this experience, I can say it&#8217;s full of winding, hilly streets, one way roads, and divided roads.  There was a moment when I was sure my phone&#8217;s GPS was just messing with me.</p>
<p>The next morning it was off to the event itself, held at La Roche College.  Let me just say now that Gina, Madhu, Matt and everyone else involved in the hours of planning that went into this event did a fantastic job.  Truly.  You would never have guessed that this was Pittsburgh&#8217;s first SQLSaturday.  Everything was laid out very well for good traffic flow.  Volunteers were always on hand to ensure that attendees and speakers had everything they needed.  Room proctors handled the distribution and collection of session evaluations and there was an interesting twist on the whole eval/raffle thing. Rather than lug books for each session to each room for raffle prizes, the raffle winners were given a ticket to redeem for the book of their choice back in the main hall.  I thought this was a smart time saver.</p>
<p>As will happen, there were a few last-minute schedule changes due to speaker cancellations, but Gina and Matt handled it well, finding speakers, including me, who were willing to fill in with an extra session.</p>
<h2>My sessions</h2>
<p>Because it&#8217;s all about me, isn&#8217;t it?  (I keed, I keed.)  I had originally planned to just give my talk on DDL auditing, but due to a speaker cancellation, I also gave my talk on getting started in blogging.  I had a small group of attendees for the blogging session, but they were a interactive bunch, which I&#8217;ll take over a large stoney-faced group any day.  This session isn&#8217;t really technical at all, it&#8217;s about getting past your hangups and just doing it, so I like it to have some energy.  And it&#8217;s just better when the energy isn&#8217;t all coming from me.</p>
<p>Right after that, it was on to my DDL auditing session.  Can I just say that talking for 2 hours straight is hard.  I&#8217;m not used to talking that much at a stretch, I don&#8217;t know how other speakers do full-day precons.  But the session went well, with the exception of a ZoomIt malfunction (someone in the room said other speakers had had problems with ZoomIt also), and I know I got at least one person thinking about what she could implement at work.  So&#8230; yay!</p>
<h2>That&#8217;s all folks!</h2>
<p>This event was my last SQL Saturday of the year.  With the holidays looming and other changes happening, life is just going to be too hectic for a while.  So I plan to spend the next few months developing new sessions and revamping my blogging session to make it more advanced.  Next year I hope to have all new material to talk about.</p>
]]></content:encoded>
			<wfw:commentRss>http://colleenmorrow.com/2012/10/09/sqlsaturday-171-pittsburgh-recap/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss><!-- Dynamic page generated in 1.027 seconds. --><!-- Cached page generated by WP-Super-Cache on 2013-05-21 23:26:57 --><!-- Compression = gzip -->
