Categories
SQL Quiz Syndication

Database Mirroring Freak Show – SQL Quiz from Chris Shaw

Chris Shaw ( Blog | Twitter ) started another great web chainpost. He tagged Brent Ozar, Brent tagged Thomas LaRock and Tom tagged me. This particular quiz is a two-part question and here are my responses. Excuse my lack of wit and charm. It’s late, my caffeine supply is running low and my cat is eyeballing me in a most peculiar fashion.

Do you feel that you have a reliable SAN solution? If so, what’s the secret?

It’s hard for me to answer this one given that just a few weeks ago our data center (SAN included) came crashing down hard. Now given that the problem was a faulty generator test and not the SAN itself that was the problem I can’t really place blame there. Honestly I can’t say anything really bad about our SAN. Tons of disk space, tons of cache, it does what its supposed to do. We’re also in the middle of finding a replacement for a SAN administrator so what SAN solutions we have in place now could radically change in the coming months. As far as secrets go I’d say you just need to make sure you have an open line of communication with your SAN administrator. They have no idea what’s going on in your world and you have no idea what’s going in theirs. Clear communication of needs need to be there as a SAN admin worth his salt is going to know what they need to do on their end to make sure you get the best performance on your end (i.e. proper RAID levels for your LUNs depending on needs, I/O throughput, etc.).

Explain Database Mirroring in layman’s terms

Everyone else seems to be giving off-the-wall answers to this so I’ll give it a go as well. Not going to lie, took me a good portion of my drive to Melbourne last week to finally come up with an example.

Think of clustering as a conjoined twin. You’re talking to the same body. Both heads can hear the conversation but ultimately the two are stuck together because they have to share the same base trunk. Now if you were to punch one twin in the face and knock him out you’d still be able to talk to the other head but you’re still lugging around that base. Now, imagine a set of regular twins (non-conjoined). This is your database mirroring in that you have two separate entities. You knock one out but the other is still chugging along just fine. Only difference being that the location of the second one doesn’t really matter because he doesn’t have a shared trunk to deal with. I’m sorry if that explanation sucks, if you’re bored check out the whitepaper written by someone who doesn’t have a fascination for using genetic defects to compare feature sets. Ok time for me to tag a couple of unwilling victims fellow bloggers:

Kendal Van Dyke

Jack Corbett

K. Brian Kelley

Categories
Events PASS Review Syndication

SQL Saturday #16 – Recap

Last Saturday was the SQL Saturday event at Devry University in Miramar, Florida. First off I have to say it was a great event with over 400 attendees! It was also my very first SQL Saturday speaking event. The speaker evaluations haven’t come back yet but I have a feeling I’ll definitely should have some dings as my presentation started off well but towards the end the presentation Gods reared their ugly heads and it ended on a not-so-great note with my demo not going so well. The good news is that one attendee, Argenis Fernandez ( Twitter ), gave me some good feedback as well as told me that he got some good ideas from the presentation and was excited to go back to work and implement Policy Based Management in his environment. Honestly that kind of response makes the effort all worthwhile.

From my session I went to check out Kendal Van Dyke’s ( Blog | Twitter ) session on Configuring SQL Access for the Web Developer/Admin. Kendal and I interact pretty frequently on Twitter so I was glad to get a chance to finally meet him as well attend his sessions. This was a good intro level talk on how to configure web application authentication methods in both classic ASP and ASP.NET. Some nice tricks come out of this session including how to properly add a user to the IIS_WPG group (hint: the proper way ISN’T to just add them to the group in computer management!). I’m no developer but this was really useful to me, especially as a DBA tasked with implementing Sharepoint in to our environment. I say this because Sharepoint has its share of permission issues especially if you run the app pools or web apps under a different account such as a custom AD account.

My next session was Andy Warren’s ( Blog | Twitter | LinkedIN ) session on Social and Not so Social Networking for the DBA. I’ve attended other sessions with Andy and they’ve all been great. This one was no exception. Andy is an excellent presenter and makes it look so easy. One thing that was great about this, for me, is that this is the first weekend was the first time I’ve gotten a chance to really meet and talk to Andy. It was funny because at the speaker dinner he asked “Hey, aren’t you that SQLChicken guy?” which made me laugh. I guess my self-branding is working! Anyhow, this session was really interesting as it was more of an open discussion with the group rather than a straight forward presentation. Andy brings up important things to think about in terms of networking such as don’t start building your network only when you need something (aka job search). Networking is something that can benefit you far beyond simple job searches and opportunities. In the session some of us shared how simply being connected on social networks like Twitter have actually helped improve ourselves in our current jobs. If you ever get a chance to attend this session I highly recommend you do. In fact, if you’re attending the PASS Summit in Seattle in November, Don Gabor will be holding a Pre-Conference session called Networking to Build Business Contacts. Andy highly recommends anyone attending the summit to check this session out as it will help you not only build your network professionally but help you network in general at events like PASS and SQL Saturday.

At lunch I got to sit down and have lunch with Andy Warren, Kendal Van Dyke and a few other attendees. I only mention this in the blog because I we got a chance to talk with some people who ranged from first-timers to the SQL world as well as others who’ve been doing it for awhile. Also it was interesting to get feedback on little things like how sometimes the session descriptions were a little too vague so it made it difficult to decide if the topic or level was the right one to attend. Based on this I know I’ll be tweaking my abstracts for future events. The other cool thing was getting a chance to sit and pick Andy’s brain a bit about the direction of PASS. Personally I’m excited to see what PASS has in store to continue bringing the community together. So far its been fantastic to be a part of it.

Next up was another session with Kendal with topic being Transactional Replication: Beyond the Basics.  Honestly I’m currently not using transaction replication in my shop but after attending this session I feel like I gleaned enough knowledge to be able to tackle that task if it were asked of me. Great overview of different topologies that were clearly and easily explained, as well as going over some possible pitfalls you might encounter. Very interesting topic and presented very well. Kendal will actually be doing this presentation this year at PASS (first time presenter, congrats to him!) so again if you’ll be at PASS Summit this year I suggest you check this session out.

After that I went over to Jeffrey Garbus’ ( Blog ) session on Indexing for Join Optimization which drew quite the crowd. Packed house with a bunch of people (myself included) taking a seat on the floor along the walls to check this topic out! I’ve attended Jeffrey’s session before at the last SQL Saturday in Tampa and he is a great speaker. This particular talk was actually kind of a part 2 to his earlier talk on Choosing Indexes for Performance . Even if you didn’t catch the first session this one alone is a treasure trove of great information. For instance do you know why join orders matters? Do you know the difference in performance between doing a join using the old ANSI syntax and the new? You’d be surprised. Again I highly recommend you check out any session by Jeffrey if given the opportunity.

Last, but most definitely not least, was Chad Miller’s ( Blog | Twitter ) session on Powershell and SQL Server Administration. Chad not only covers basic Powershell commands and tricks but he covers using a cool project he’s developed called SQL Server PowerShell Extensions. What PSX gives DBAs is a base set of functions that covers most common DBA tasks. One of the coolest demonstrations I saw during this presentation was the use of Powershell as an ETL tool. Chad shows you how you are able to copy data from table to another using only 3 lines of code! This presentation truly made me excited to really start learning Powershell and applying it at work.

Overall I thought it was a great event, as any SQL Saturday I’ve attended, and I had an absolute blast presenting and meeting a bunch of folks I’ve interacted with on Twitter. If you get a chance to make it to a SQL Saturday event I couldn’t recommend  it enough. You get top-notch education, great networking opportunities, awesome swag and all for free! If you don’t have a SQL Saturday event in a city near you, and you won’t be making it to the PASS Summit this year then don’t fret! The good folks at PASS have put together an exciting free training event called 24 Hours of SQL PASS. For more details on this great event check my previous post on it.

Categories
Events Policy Based Management Presentation Review Syndication

Spacecoast SQL User Group Meeting: Review

After writing up my review for my presentation at OPASS I realized I hadn’t done one for my visit to Melbourne for the Spacecoast SQL User Group! A thousand apologies Bonnie and crew!

I arrived early in Melbourne so I spent some quality time at Starbucks for a bit before the meeting which gave me the opportunity to test and retest some of the policy demos so I didn’t repeat my blunders from the previous weekend at SQL Saturday in South Florida. When the time came around I got over to the Spacecoast Federal Credit Union headquarters building where the meeting was held (which is a beautiful building btw). The group is small but very enthusiastic crowd in that they ask a LOT of good questions. The PBM presentation went without a hitch which was nice and the presentation actually took a positive unexpected turn when we started discussing virtualization. I wound up giving a mini presentation on VMware and virtualization and how it all worked which was pretty cool.

Afterwards a few of us went over to the questionably-named sports bar called The Rendezvous in the Holiday Inn to socialize and talk shop a bit. It was interesting to hear about how Bonnie got started in the SQL world and how she came about establishing the User Group. Want to hear the story yourself? Then get over to one of their meetings! They meet on the second Thursday of each month so if you’re in the Melbourne/Cocoa Beach/Titusville area go check them out!

Categories
PASS Presentation Syndication

Spacecoast SQL Server User Group Meeting Tonight!

I just wanted to send out a quick note to say that I’ll be presenting tonight at the Spacecoast SQL Server User Group. I’ll be doing my presentation on Policy Based Management. After SQL Saturday last weekend I’ve learned a few things and added a small demo of EPMF to the end of it so hopefully this goes well. If you’re in the Melbourne area tonight come check it out!

Categories
Events PASS Syndicated Syndication

24 Hours of SQL PASS

Call Chloe and the rest of the CTU gang, grab a giant pot of coffee and your 9mm and get ready for 24 hours of pure, free SQL hotness: 24 Hours of PASS! The good folks at PASS have put together another fabulous free training opportunity for us in 24 hours of webcasts from the world’s leading SQL Server experts!

Using the latest in advanced hacking technology I’ve managed to access the PASS mainframe and get you the session schedule. Uploading to your screen now…

Session 01 (Dev) – Start time: 00:00 GMT
10 Big Ideas in Database Design
Presenters: Louis Davidson and Paul Nielsen

Session 02 (DBA) – Start time: 01:00 GMT
Using Powershell to Get the Most Out of SQL Server
Presenter: Allen White

Session 03 (PD) – Start time: 02:00 GMT
Team Management Fundamentals
Presenter: Kevin Kline

Session 04 (BI) – Start time 03:00 GMT
Delivering Good Performance Consistently with SSIS
Presenter: John Welch

Session 05 (DBA) – Start time 04:00 GMT
Using SQLdiag to Troubleshoot SQL Server Problems
Presenter: Brad McGehee

Session 06 (DBA) – Start time 05:00 GMT
The SQL Server 2008 Vanishing Act
Presenter: Peter Ward

Session 07 (BI) – Start time 06:00 GMT
Text Mining
Presenter: Dejan Sarka

Session 08 (Dev) – Start time 07:00 GMT
Tips and Tricks for Writing SET Based Queries
Presenter: Jacob Sebastian

Session 09 (DBA) – Start time 08:00 GMT
Mirrored Databases
Presenter: Thomas Grohser

Session 10 (Dev) – Start time 09:00 GMT
Working with Spatial Data in SQL Server 2008
Presenter: Greg Low

Session 11 (DBA) – Start time 10:00 GMT
Effective Indexing
Presenter: Gail Shaw

Session 12 (BI) – Start time 11:00 GMT
Reporting Services inside out the things you should know
Presenter: Simon Sabin

Session 13 (DBA) – Start time 12:00 GMT
Query Performance Tuning 101
Presenter: Grant Fritchey

Session 14 (BI) – Start time 13:00 GMT
Reporting from Analysis Services Cubes Using Excel 2007
Presenter: Peter Myers

Session 15 (BI) – Start time 14:00 GMT
Data Warehousing: Laying the Foundation to Success
Presenter: Erik Veerman

Session 16 (DBA) – Start time 15:00 GMT
Database Compatibility Settings: What They Really Do… and Don’t Do
Presenter: Don Vilen

Session 17 (PD) – Start time 16:00 GMT
Building a Better Blog
Presenter: Steve Jones

Session 18 (Dev) – Start time 17:00 GMT
Building Flexible Data Services for the Web Using the ADO .NET Data Services Framework
Presenter: Artemakis Artemiou

Session 19 (Dev) – Start time 18:00 GMT
SQLCLR or T-SQL? A Brief Survey of Performance Options
Presenter: Adam Machanic

Session 20 (BI) – Start time 19:00 GMT
Loading a Data Warehouse in SSIS
Presenter: Brian Knight

Session 21 (DBA) – Start time 20:00 GMT
What’s Simple about Simple Recovery Model
Presenter: Kalen Delaney

Session 22 (Dev) – Start time 21:00 GMT
What’s New, Harder, and Easier in SQL Server 2008 Security
Presenter: Don Kiely

Session 23 (DBA) – Start time 22:00 GMT
Analyzing File and Wait Statistics
Presenter: Andrew Kelly

Session 24 (BI): Start time 23:00 GMT
Embed Reporting Services into your Applications
Presenter: Jessica Moss

*Depending on your location, sessions may also be broadcast on Sept. 1 and Sept. 3, 2009. Please be sure to check our time zone guide for exact times. When you register using our LiveMeeting interface, sessions will be sent to your Outlook calendar for the correct time in your region.

Excellent. So your priority should now to be to head over to the event site and register for this excellent opportunity. I highly suggest you hurry up and do so as Jack Bauer doesn’t take kindly to not taking advantage of such awesome opportunities. Here’s the last guy who didn’t take advantage…

Please, for your sake, don’t be that guy.

Categories
Documentation Rambling Syndicated Syndication

System Documentation: What’s Your Method?

As a system administrator it’s your job to know the ins and outs of the systems you manage. But are you the only cog keeping that particular wheel turning? If you were to leave your current position, or God forbid, something were to happen to you would your company be able to move forward without you without ill effect? This is where proper documentation becomes a crucial part of your job.

Now some would argue that if you document your responsibilities/job/systems/etc you become dispensable. While yes that could be true I dare to say that you really shouldn’t have to worry about that. In my opinion if you’re doing your job, and doing a good job at it, those who matter will notice and this becomes a non-issue. Properly documenting your system if anything then becomes an aid to you to help you do your job better. Yesterday Jonathan Kehayias (Blog | Twitter) wrote a great article on the importance of good documentation. If you get a chance I highly suggest you give that a read since it brings up some great points that include turnover, management, and compliance auditing.

Currently I’m trying to get a handle on the documentation of my systems at work. At the moment my current thought is to create a Word document template that simply has fill-in-the-blank type fields and for every new system that comes online I simply fill out a new form. These forms will be kept in our Sharepoint site and that way those who need access to them (i.e. on-call personnel, Help Desk staff, other system admins, etc.) know where to find them. Of course one could argue the problem with this method is that people who don’t necessarily NEED to see everything in that documentation have access to it. To that I say this, why not? I may take a little flack for saying this but here goes nothing. I believe the world of IT has drastically changed in the last few years (duh). Granted I’m still young but from what I’ve witnessed we are coming from shops where mainframes were king and jobs and knowledge were extremely siloed. Now before you start blasting me on silos, I know they still exist but go with me on this.

In today’s IT world there are simply so many things flying at us at all times. With the rate of new technologies coming out and with organizations trying to do more with less in this economy I think its more important than ever to make knowledge transparent across the enterprise. If someone wants to know what I do as a DBA why not let them know? That person could be interested in jumping in the administration world themselves and just need the basic knowledge and understanding to do so. Another example would be explaining to a project manager the technical pieces of the project they’re managing. How many times have you seen a project dumped in your lap and the necessary components are things that you either A) Don’t support B) Have no in-house knowledge of the necessary technologies.

From my experience knowledge dissemination becomes all the more vital as systems become more tightly integrated. Look at the Microsoft suite of products. Sharepoint is a collaborative portal designed to let people across teams and enterprises share and disseminate (damn I love this word) knowledge with ease. Well in order to stand this product up you’ll need someone who understands databases and their management/administration, someone who understands architectures and how best to implement them, maybe a trainer to let end users understand how this new technology works, desktop personnel to understand the technology and how to troubleshoot it, etc, etc.

As I’m writing I’m realizing I’m really digressing from my original point which is about documentation methodologies. I’ve laid out my general plan for documentation of systems but my original intention of this post (besides my slight soapbox rant up there) was to see how the rest of you guys/gals handle your documentation. Strict methodology and templates? Random documents thrown out on a shared drive or somewhere on your drive? None? Let me hear from you in the comments.

Categories
PASS Presentation Syndicated Syndication user group

Upcoming Speaking Engagements

Looks like August is definitely shaping up to be a busy one for me! First I’ll be presenting at SQL Saturday #16 in South Florida. That takes place on Saturday, August 8th. I’m really excited for this event since it’ll be the first SQL Saturday I’ve presented at.

Following that I’ll be heading over to Melbourne the following week on Thursday, August 13th for the Spacecoast SQL Server User Group meeting. At both locations I’ll be presenting my Policy Based Management 101 session. Then to finish off my month the following week I’m moving to a new place so August will definitely be an active one. Speaking of which, check out and participate in Active August! I’ll be writing up a series blog posts about my #activeaugust experience as well.

**UPDATE**
Sweet! Looks like I just confirmed with Jack Corbett (Blog | Twitter) that I’ll be presenting for the Orlando SQL Server User Group on September 15th!

Categories
PASS Presentation Review SQL Server Syndicated Syndication user group

Recap: Performance Tuning and Query Optimization

Tonight was our monthly SQL Server User Group meeting and our featured presenter this evening was Plamen Ratchev (Blog) presenting on performance tuning and query optimization. First off, he has an awesome accent. I think he’s of Croatian descent from what he mentioned but he rolls his R’s something fierce. I should’ve had him say the phrase “reporting services” a bunch of times just to make me giggle. Anyways, I’m way off topic…

He opened with a quote from Donald Knuth that stated

We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil

This was a good point to open with in that if you try to focus on only performance in the development phase you’re more than likely going to perform an epic fail. He then went on to show the differences between being reactive and proactive in terms of performance tuning. His take was that in Europe their development processes focused more on being proactive and trying to take care of issues before they become major problems as opposed to trying to run around putting out fires all the time like many a DBA (myself included) is forced to do on a daily basis. In an interesting story he relayed to us he told us about how he had come to the U.S. and pitched a European software that allowed a major car manufacturer to improve their processes. The software would basically alert you if anything in production fell “out of the norm” and would advise actions on how to fix it. The American company had a different approach to their process. They basically hired a team of high-priced consultants to come in for a week, measure everything nuts to bolts about what’s wrong in the production process, produce a report and leave (whether or not problem got fixed). What surprised me most was that he told us the manager told him if there’s a problem they pretty much just build another assembly line somewhere else rather than fix current issue. If you’re wondering why they need Federal bail-out money, this story should give you a slight clue.

The presentation continued on with things such as common performance issues you’re likely to find such as inefficient queries, retrieving too much data, inefficient or missing indexes and a few other things. This was a nice list to see for both devs and DBA’s alike so everyone is aware of these common mistakes. This lead to topic of problematic designs such as the “one-true lookup” table issue. This is when rather than normalizing your data someone decides its easier to just throw everything in to one large table and add columns as needed later on. I can see some of you cringe when you read that since you’ve probably seen that in production somewhere at some point.The surprising thing that came out of this example though (to me anyways) was that sometimes this setup actually makes sense for very specific applications such as a simple survey or a medical application that is only storing straight facts (i.e. patient monitor). Another oldie but a goodie is mismatched data types on join columns or filters. While this may work without a problem, when you throw a heavy work load at something like this you’ll see performance tank because behind the scenes the data engine is having to do lots of implicit conversions to process that query for you. So remember that little tidbit next time you’re planning with your devs and database developers.

The next interesting thing I learned was regarding data type optimization. Do you know what the one of the fundamental differences is between VARCHAR and NVARCHAR besides one taking up twice as much space as the other? NVARCHAR handles multiple collations while VARCHAR is more for single so if your application is only going to be delivered via a single, default collation then stick with using VARCHAR.

I could go on and on but needless to say this was an extremely insightful and useful presentation. Another user group member, Ron Dameron (Twitter), noted in Twitter this evening

…seen this deck twice now. Learned new stuff both times. Thx Plamen

If you ever get a chance to attend one of Plamen’s presentations at a live event I highly encourage you to do so as he’s a brilliant guy and presents well. If he’s not coming anywhere near you, you can still check out his presentation stylings by watching his videos over at JumpstartTV. In closing here’s some book recommendations he threw out at the end of his slide deck. Basically this is just an excuse for me to use the cool Carousel feature from Amazon!

Categories
PASS Presentation SQL Server Syndicated Syndication user group

Policy Based Management with SQL 2008

A few weeks back I presented at the Tampa SSUG meeting on Policy Based Management with SQL 2008. Unfortunately due to sickness and apparently my own laziness, I never got around to doing a follow-up post or posting my slide deck. First the slide deck:

Powerpoint 2007 version

Powerpoint 97-2003 version

As a warning the deck itself is a bit sparse with how-to info as the meat of my presentation is in demo format. Given that fact, I will start a series of blog posts covering Policy Based Management and how/what you can do with it. Keep an eye out in the coming weeks for those! In the meantime a big thank you for everyone that attended the Tampa presentation, hopefully I’ll be giving this same presentation again at SQL Saturday South Florida in August.

Categories
SQL Server Syndicated Syndication Tips Tutorial

How to Create a Server-Side Trace with SQL Profiler

This morning on Twitter my friend (and as per request, “handsome moron”, but trust me he’s no moron) Jeremiah Peschka (Twitter) asked about scheduled traces. I suggested he do a server-side trace. Unfortunately when you Google how to do this it just tells you how to do this via T-SQL but to my dismay I didn’t see an article on how to create/set this up from SQL Server Profiler. So this will be a quick rundown on how to create your trace using the GUI of SQL Server Profiler and schedule your trace to run at a time of your choosing (so that way you don’t have to wake up at 4 am to kick off a trace).

1. Cut a hole in the box…oh wait, wrong instruction set. Open up SQL Server Profiler and create a new trace. To open Profiler you can either launch it from within SSMS (SQL Server Management Studio) by going to the Tools menu and selecting SQL Server Profiler. The other way to launch it is by clicking on Start button, going to Programs, Microsoft SQL Server 2008 (or 2005), Performance Tools and you should see the shortcut for Profiler there.

clip_image002

2. Check your save to options. Since this will be running on the server itself you’ll have to make a decision here. If you save to table try to save to a database that is NOT the monitored server, preferably into a separate database/table you create for this purpose. You can create a separate database for this purpose and either keep the database for reporting purposes or drop it when you’re done with your analysis. If you don’t want to create a whole new database you can create a new table in an existing database. The advantages of saving to a table are that you can use native SQL tools to do your analysis or even Excel. Preferably you’ll want to save trace data to a file as its faster but for this demo the save to database method is the one we will use.

a. When you select this option you will be prompted to connect to a SQL instance of your choosing. Select the server you’ll be doing your trace on.

b. Here you can name your new table (creates table for you, assuming you have permission to do so).
clip_image004

c. Your other option is to save to file. This will create a series of .TRC files wherever you specify. The advantage to using this option is that your results become portable in that you can move and import those files wherever you need them to do your analysis (i.e. copy them to your local PC and do analysis locally).

3. Configure your trace’s stop time. This is important as you want to make sure you have a consistent slice of time measured. This can later be modified within the script if you’d like.
clip_image006

4. At this point we can customize our trace. Click on the Events Selection tab. Here you can select the events and filters you’d like to trace on. Be careful as to not choose too many options/filters as this can bog down the trace and cause performance problems on the server itself since you’re trying to log so many things at once. For purposes of this demo I’ve chosen the Standard (default) template and default settings.
clip_image008

5. Run your trace…and then stop it immediately. This sounds a little strange but keep in mind we’re not running our trace right now, we just want the script that makes up this trace. You start the trace by clicking the Run button at the previous screen. Once the trace starts you stop it by clicking on the Stop button or by going to the File Menu and selecting Stop Trace.
clip_image010

6. Collect your trace script. Once you’ve stopped your trace go to the File menu, Export, Script Trace Definition, select For SQL Server 2005-2008. Select a location to save your script (.SQL) file.

7. To see your script, open it up in SSMS. In the script you’ll see all the options you chose in the Profiler GUI. The @DateTime variable is the option for when to stop your trace so modify that as needed. Of note, check the number after @TraceID ouput (in screenshot it’s 0). If you leave it at 0 the trace file will fill up and not rollover. To avoid this, replace that with 2. You can read all the options on Books Online.

UPDATE: One of the unfortunate parts of this is that the scripted trace only supports writing trace to a flat file, so you can’t specify SQL table like in the GUI version. In this trace file make sure you specify location for your trace file location as well.
clip_image012

8. Now to schedule your newly created script. In SSMS connect to the server you want to trace on. Go to your SQL Server Agent and expand it so you can see the Jobs folder. Right-click the Jobs folder and select New Job.
clip_image014

9. In the New Job Step dialog, click on the Open button. Browse to where you saved your trace script file, select it and click Open. It might prompt you twice, just repeat. Once you’ve loaded it you should see the contents of your script file in the Command window. NOTE: At this point you can also choose what account to run this script as by selecting an account from the dropdown menu under Run as. Click OK when you’re done.
clip_image016

10. Next we need to schedule your trace. Click on the Schedules link on the side menu. You can pick an existing schedule or create a new one. Here you’ll want to create a New schedule. Give your schedule an easily identifiable name. Since we’re creating a custom schedule you can do a one-time job or you can choose to run this on a recurring schedule (i.e. once a month). The recurring schedule would be advantageous if you’re looking to monitor your SQL performance on a regular basis and want to make sure you trace the same actions every time. One thing to note is that you want to set your start time here under the ‘Occurs once at’ section. Remember, you’ve already scheduled your stop time for the trace within your script. Once you’re done customizing your schedule click OK when you’re ready to proceed.
clip_image018

11. Click OK to finish creating your new job. To see your newly created job look under the Jobs folder in SQL Server Agent. Congratulations, you’ve now created an automated server-side trace using SQL Server Profiler!