Showing posts with label SQL Server. Show all posts
Showing posts with label SQL Server. Show all posts

Tuesday, July 12, 2011

TSQL Tuesday #20: T-SQL Best Practices

It's T-SQL Tuesday again, and although I seldom write on Tuesday, I attempt to participate. The brainchild of Adam Machanic (Blog|Twitter), T-SQL Tuesday invites new and existing SQL Server bloggers to post about the same topic on the same day.  This time around, the topic is “T-SQL Best Practices”, hosted by Amit Banerjee (Blog|Twitter)

What is T-SQL, anyway?
T-SQL, or Transact-SQL, is Microsoft and Sybase’s proprietary extension to SQL.All applications that talk to a SQL instance use T-SQL statements to talk to the server, regardless of the user interface or the application.

T-SQL is a proprietary top-down procedural programming language. It was originally developed jointly by Microsoft and Sybase for Sybase SQL Server on UNIX until 1993. From that point forward, Microsoft SQL Server was developed for NT Server. T-SQL is not an object-oriented programming language with object or methods and it does not compile into binaries. It is, however, a Server Side processing code used to query data. When I develop T-SQL, I treat it as any other programming language.
For T-SQL best practices, I recommend using programming guidelines similar to those of C#, Java or VB.Net.

User Defined Functions
I have always been a fan of functions. To “bring out the Fun in Functions”, I learned that in any programming language, if you write it more than once, write a function; if you write it three times, stop programming and start a new career. In T-SQL, a UDF can return a single value (Scalar Function) or return a set of data (Table Value).

Use naming conventions
Use common naming conventions to name your variables. This standardization allows any programming to read your code and understand what is being processed. First, figure out the purpose of the variable, then give the variable a precise name, and finally, imply its Data Type. For instance, the date variable @BirthDate [datetime] is easy to understand. However, if you named it @BornColumn [datetime], somebody down the line would be thinking “Huh?”It would not be so interpretive.

Legible Code
Like most word processing programs, SSMS will automatically wrap your lines of code we all write lengthy blocks of code if you don’t press at certain points you could theoretically have only one long line of code the best thing to do is to turn off word wrap for better legibility to do this, select Tools, Options, Text Editor, Transact-SQL, under Settings Turn off Word Wrap for legibility.


Commenting Code
In T-SQL, make concise comments describing the stored procedure or trigger. Best practice for commenting code is to make it understandable when you revisit this code years later. Dates and initials on comments can also alleviate problems.
There are two ways to comment code in T-SQL:

-- Two hyphens create one line for commenting
GO
CREATE PROCEDURE sp_TSQL2sDay

/* This is a block of comments
The end delimiter of this comment
is an asterisk and front slash */
GO
ALTER PROCEDURE sp_TSQL2sDay

Version Control
SVN, Mercurial, Git, and SourceSafe are a few well-known version control systems to apply to source code. Although how do you source control T-SQL? It is not common to build the scripts in a programming IDE (Integrated Development Environment). Red-Gate has a product to source control schemas and data, but T-SQL saves in the database as a Server Side Script. I don’t use Red-Gate’s product, but I recommend that you save the scripts, whether stored procedures, triggers, or UDF, as a .sql file, and add them to your version control of choice.

If ifs and buts were candy and nuts, we’d all have a Merry Christmas. If pigs could fly, we’d all need stronger windshield wipers….As much as I wish this could be a feature rich post on how to create a UDF or implement version control on .sql files, it’s not. My sincere hope is that this will soon lead to that. In the meantime, these are just a few of my most recommended rules of thumb when developing T-SQL.


Tuesday, June 28, 2011

How I Overcame Epic Fail

FAIL STAMP
You can’t avoid mistakes.  It takes a seasoned programmer to admit they’ve had their share of epic fails. I think I do well, as my boss exclaimed “You’re at the Real McCoy now!” … meaning (I think) I’m not working for internal clients anymore.   This is my first job working for an ISV (Independent Software Vendor) since I began programming.

While the wounds are fresh, I’d like to share some of my greatest challenges and how I overcame them.

Being a Software Consultant
I never thought working for myself and making my own hours writing code, wearing pajamas in the room next to where my one and three year olds slept would be a problem. Truth was, although you can actually make great money working from home, you don’t get the experience from team building, code reviewing or even source control.

I had to struggle to get out of my independent coder cocoon. I did this, at least in the inception of .Net, by going to TechNet events and listening to a broad array of developing with .Net sessions.  I also joined an AITP chapter and a Linux User Group. At that time I also learned about the open source community, and how you could share your projects with other users.  I started to interact more and more with developers on Internet forums. It seemed like I had co-workers at my disposal.  With a few clicks, an email or instant message could help me when I got myself into a tight spot.  I learned advanced techniques only by sharing with other developers. The greatest benefit I got out of this was learning how to manage time, project and money. This allowed me to take a position in management for the first time.

Falling Behind
Being a manager was not all it was cracked up to be. I thought I could come in fashionably late and leave as I pleased. I could, but the truth was, there were tasks to be done and staff to oversee. As business grew, the responsibilities increased. Instead of working less and making more, the norm was making less and working more. Weekly travel, hours on Saturday, and on-call on Sunday left me no free time. My greatest challenge was keeping up with the ever changing technology. I wasn’t programming on a daily basis. Implementing new systems meant hiring a contractor to take on a project for three to six months. I was no longer involved and I was no longer happy.

I left the management position to pursue what is dear to me, writing code. It’s hard to do a comeback.  It’s not impossible. Take for instance, Robert Downey, Jr.  He was a wreck and now he’s Iron Man. I knew I could do the same but I had a lot of catching up to do.  I’d missed several versions of Visual Studio .Net and didn’t even realize they dropped the “.Net” from it. SQL Server was totally different from 2000. I had to move quickly as a company took a chance on me even though my knowledge was a little outdated. The company gave me six months to progress.  I had to redo some .Net 2003 and take it to the next level.  Rather than playing it safe with 2005, I chose 2008. I also had to convert from my comfort zone of Visual Basic to C#.   I challenged myself to do this in three months rather than six.

How To Catch Up
I looked long and hard at what was around me. I knew Visual Studio 2003, but not as well as I knew Visual Studio.Net. After playing some catch-up on Visual Studio 2008 and SQL Server 2008 for two months, I registered for an exam to be taken a month later so I could still meet my three month challenge. The most important thing I did was to schedule and register for the exam. I know people who want to certify and study to certify, but it’s when you’ve paid money and scheduled a date that you’ve created yourself a real deadline.  

Still cloudy on the subject, I created a study plan.  I also found much help and resources on Twitter. Social Media was evolving, and virtual user groups and #sqlhelp hashtags were mentioned regularly on Twitter.  I became family with Twitter, again, creating a network of go-to experts that could get me out of a jam.  I found free training and learned about branding myself.

Maybe the stint in management could count for something. I worked hard at my career and planned it as a project with goals, and certifications served as my benchmarks.  I became certified in 2009 as an MCTS and achieved MCPD status in 2010. 

Now I plan on staying on the certification track.   I won’t allow my certs to expire and I vow to upgrade to newer technologies one day at a time.

Monday, April 04, 2011

Meme Monday: 04042011

I saw on the twittersphere this morning that Thomas LaRock (blog | @SQLRockstar) began Meme Monday today, "Write a SQL blog post in 11 words or less". So I jumped in, answering a question I was asked at my last presentation on SQL  Security, can you change the SA user name:


"use master go alter login sa with name = notsausername" Nough Said!


Since most people are tagging others to participate, I challenge 
Bill Fellows | @billinkc
Meredith Ryan-Smith | @coffegrl
Kelly Martinez | @greeleygeek 
to follow

Friday, March 04, 2011

Denver Presentation at Rocky Mountain Tech Trifecta

I'm speaking this Saturday at the Rocky Mountain Tech Trifecta in Denver's Tech Center. It is the first talk I do outside my comfort zone of Colorado Springs, not to mention at a large event. Sold out with six hundred registered attendees and over 80 on reserve trying to get in and 47 talks. Below is my slide deck for my presentation "Securing your SQL Servers", and lastly, please rate this session if you attend.


I'd appreciate your honest evaluations, in hopes these critiques will assist me to deliver improved sessions as time goes by.

Wednesday, February 16, 2011

SQL Saturday #66, Colorado Springs

100_0659
Ted Malone presenting on Application Lifecycle
This weekend was my first time at a SQL Saturday. SQL Saturday is a free, one day - Saturday, training event put together by volunteers and sponsors. The event is for IT professionals that deal with Microsoft SQL Server and want to learn more on the topics presented by speakers. This weekend, the Colorado Springs SQL Server User Group, along with some friends from Denver and sponsors, put on the very unique event.

This event in Colorado was held at an indoor family fun center, fully equipped with an indoor Go Kart race track, mini-golf, laser tag, video games and more. Attendees were provided with game cards at which we used at breaks to, well, compete with each other in these realms. It was a great method to be social with otherwise complete strangers sharing an interest in SQL Server that Saturday. Oh, did I mention the sessions on SQL Server.

The morning began with networking, an interesting meet and greet session to break the ice. Then the sessions began. There were 15 sessions put into three tracks, enough to overwhelm anyone, beginner or experienced alike. I was fortunate to attend sessions by Chris Randall, Meredith Ryan-Smith, Randy Knight and Ted Malone. I was also very happy to meet in person and make some new friends:
100_0654
PASS Regional Mentor, TJay Belt
Bill Fellows | @billinkc
Chris Randall | @cfrandall
Meredith Ryan-Smith | @coffegrl
Randy Knight | @randy_knight
TJ Belt | @tjaybelt
Bill Pearson | @Bill_Pearson
Steve Jones | @way0utwest
Doug Lane | @douglane4
Kelly Martinez | @greeleygeek

Aside from this being my first SQL Saturday as an attendee, this was my first as a speaker as well. I took the liberty to present on the subject of SQL Server Security. I await to receive constructive criticism so I can improve as a speaker, and be able to present more on the subject. I also posted my slide deck on a previous post if interested. I can not compare to other SQL Saturdays as an attendee or speaker, but I will not forget the atmosphere, hockey theme, laser tag battles, mini-golf, new acquaintances and overall, fun.

Thank you to all the hard working organizers, volunteers and sponsors for putting on a great event.

Tuesday, February 15, 2011

Securing your SQL Server

Become aware of some commonly overlooked practices in securing you SQL Server databases. Learn about physical security, passwords, privileges and roles, restricting or disabling system stored procedures and preventative best practices. And most importantly, discuss the most commonly used security threat: SQL injection and learn how to prevent them.

Monday, January 10, 2011

T-SQL Tuesday: What are your SQL Resolutions


T-SQL Tuesday is the brain child of Adam Machanic (Blog|@AdamMachanic). Each month, a lucky blogger is selected to host this blog party. This month, the host is Midnight DBA’s, Jenn McCown (Blog|Twitter). This month’s million dollar question is: “What are your techie resolutions?”
I recently blogged regarding a few “techie” things I have lined up for this year, however, to stay in theme to T-SQL Tuesday, I will tell you all about my SQL Resolutions for 2011.
This month is already filled with several events, the one more SQL specific will be that of presenting at the Colorado Springs SQL User Group. I resolved to participate more with the tech community, and since I moved here in October, I have met some interesting professionals that have made me comfortable to present. This month, I will be presenting for the first time, and my topic of choice is “Fundamental T-SQL Development”. I feel pretty strong on the subject, and am very eager to speak. This attempt at speaking led me to another resolution I have made for SQL 2011, and that is participating in a SQL Saturday. I had submitted two sessions to speak, one being the “Fundamental T-SQL Development” the other is “Securing you SQL Server”.
I have been hearing about SQL Saturday's for over a year now over Twitter and such. It is finally becoming a reality for me to see one in person. Not only that, I resolve to speak at a SQL Saturday and will hope to be doing just that at SQl Saturday #66 in Colorado Springs, come Feb. 12, 2011.
Those who know me well, are aware that I've only been in Colorado for about 3 months now. Last year I became a MCPD in ASP.Net 2008, and the year prior that an MCTS in SQL Server 2008 Development. I wrote about becoming a DBA in 2010, but I left that task unfinished. This year, to conclude the SQL Resolutions, I intend to set this goal that I've yet to achieve: the MCITP level in DBA, or probably Development, and maybe MCTS Implementation and Maintenance (70-432), was that too vague?
I must say though, I came into 2011 wanting to speak, attend a SQLSaturday and get more certifications, so far, two out of three are right around the corner. And I will say this, I hope someone is clever enough to revisit this topic in the SQL Community at years end and recap the outcomes bloggers SQL Resolutions.

Thursday, January 06, 2011

Like a Fresh Cup of Coffee

It’s a new year and a fresh start. While I drink my latte, Seattle's Best Organic I might add (and recommend), I spill my thoughts for the year. As I’m writing, I’m finishing a site, a portal if you will, for the community my family and I now reside in. Just a few months back I relocated to Colorado Springs, CO., you might of read about my career move. It has been an interesting move, one that I took the tech community into consideration. Colorado Springs is very active in their .Net and SQL Server user groups, my forte. In the short time I’ve been here, I’ve met some interesting professional in the SQL and .Net arena, and inspired me to participate alongside with them.
This year, I have started new, like a fresh cup of coffee. January will be very intense for me, with the first ever Colorado Springs GiveCamp taking place, an event I been working hard over the last few months with help from other tech volunteers. This year, our give camp will develop a solution for a charity in need, at no cost, and over one weekend. So far, we have about 10 volunteers helping us make this happen. I'm very glad I was able to help organize this and has allowed me to meet some new people that are very similar to me. From these professionals that volunteer their technology skills, I been inspired to share my knowledge as well.

February will also be an interesting month this year and a first for me. Not only is the Colorado Springs SQL Server User Group putting on a SQL Saturday, but I have submitted two sessions to speak at the event. This year will debut my skills as a presenter. Not only that, I was asked to present in this month's User Group meeting, so my debut will come even earlier. As of right now, I know I will have one speaking engagement this month, the other will be confirmed I believe by the end of this week. Regardless, attending a SQL Saturday will be a great way for me to learn new skills I might not know, or polish some other skills.

On the same wave for events for the beginning of this year, Denver is holding it's 3rd Rocky Mountain Tech Trifecta in March. At this event, I intend to increase my .Net skills. Going back to Windows development from ASP, I lack the skills in WPF and want to also do more in LINQ. I also gave it a shot by submitting my SQL sessions there as well, since it will be a good experience to speak to larger audiences.

Somewhere along the way, I intend to organize what I call, EP Tech Lunches, via my new site www.eptech.info. El Paso County in Colorado consist or Colorado Springs and surrounding areas as in the 2nd most populated county in Colorado next to Denver. This new project is more of an information portal, a meta network, where individuals or groups can share their contact info, (IM, Twitter, Facebook, LinkedIn) and post tech announcements. Those participating member will also be invited to attend a monthly Tech Luncheon to meet in person. The reason behind lunches is that many professionals might be interested in attending User Group meetings but might be conflicted with personal obligations after work. Having a lunch meeting would resolve this since you intend to take a lunch anyways during your workday, might as well have it with people interested in networking and talking shop.

I invite you all look into the CodeCamp, SQL Saturday, EP Tech Info and Trifecta. I am looking forward to seeing you participate in these tech events.

Tuesday, August 17, 2010

Twitter and the SQL Server community

Let me share with you the power or Twitter and the SQL Server Community. In a post I wrote about a year ago, Social Networking for Dummies – nay, Beginners Part 2, I explain the uses for Twitter. When I joined a new firm last summer, I knew some of my new skills needed sharpening. To make matters worst, the firm’s applications were on .Net 2003 and SQL Server 2000. At the time, I had worked with only .Net 2005 and SQL Server 2005 but not on a production environments. So it became my goal, and my job, to migrate applications and databases to 2008 platforms accordingly. I’m the developer, that becomes the accidental DBA, and still program .Net applications. I had to do research on our current databases and do performance tuning, check the current disaster recover plan and not to mention develop BI. I was in dire need for help.
Enter the social media assistance. I don’t recall who I followed first, but it could of been @BrianKnight or @PatrickDba when I first found a Pragmatic Works webinar. From then on, my list grew, following DBA’s like @SQLChicken, @SQLVariant and alas, @BrentO, MVP, MCM. Yes, there is a form of DBA Rock stardom in the SQL Community, and in that class, there are only 3 major Rock Star DBA’s. Any DBA that wants to know the best resources, or what a Rock Star DBA has for lunch, reference Tom LaRock’s SQL Rockstar hierarchy page.
I created a Twitter list of Database Experts I follow on a day to day basis. Via these tweeps (Twitter Peeps), it made my learning a lot easier. A lot of these experts have been published by RedGate and Wrox books, just to name a few, so their microblogs are not dull. I don’t care to follow people telling me they “ate a sandwich”, or they had to “visit the dentist”, unless you’re Brent, Paul or Kim. I follow technologist that have a career like mine, and follow the #1 community rule, “share”.
Many of these tweeps have turned me on to books I read and webinars I took. On a daily basis, you see articles they recommend, or blog posts they shared, all of which hold valuable SQL Server information, tips, techniques and news. I must say, this past year has been an experience, that I have been to a TechFest in Dallas and am planning a few more visits to Dallas if SQLSaturday #56 BI Edition opens the waitlist again, all thanks to tweets from my DBA Twitter List. Lastly, there is a hash on Twitter, the #sqlhelp hash, it is like the Batman beacon, you use it when you are in need of an answer to a particular question, use it wisely, “with great power comes great responsibility”. Wow, two superhero comic referenced in one sentence. I have to say, the SQL Server community is very helpful and resourceful, if this is not your cup of tea, this works well with any technology or trade you might want to follow.
I can’t seem to thank ever DBA I follow for I’m sure I have referenced a link or a blog post to help me at one point, but those I remember I’d like to put it out there for others to hopefully follow as well.
Jorge, thanks for SQL University, and great resource.
Patrick, keep those SQL Luncheons going, hopefully audio won’t be a problem on my end soon.
Jen and Sean, I’m still watching those Midnight DBA Videos.
And finally, If you want to start on Twitter properly, I suggest this free PDF, The Simple Twitter Book by @BrentO.





Tuesday, July 13, 2010

T-SQL Tuesday #008: Gettin’ Schooled

T-SQL Tuesday is the brain child of Adam Machanic (Blog|@AdamMachanic). Adam bestows the honor of hosting T-SQL Tuesday upon one lucky blogger each month, this month, the host is SQLServerCentral author and MCM, Robert Davis (Blog|Twitter).
Learning to program isn’t easy, and like the old saying goes, “you never stop learning”. I don’t know if I’m the first to mention, but I never had an intention to “learn” SQL. When I first dove into programming, I remember I created applications that would calculate risk factors and call shell commands or print a batch of documents according to risk priority numbers. It wasn’t until I had to SAVE records that, like many beginners, I created a few tables on MS Access 98 and used DAO to connect via Visual Basic. But up until then, I only had C++ and Visual Basic courses under my belt, not to mention QBASIC. The architecture began to get more complicated, and I was suppose to stop using DAO and VB and use ASP, ADO and a database called, SQL Server 7.0. This was the “Hard Knocks” call, realized I didn’t learn any of this in school. So I ran to Barnes and Nobel one night and figured, with this book, I’ll be ready by morning.

Of course, that was not the case. I did however, learn to create a database and tables with this book. When it was time to code views and stored procedures, there was nothing better than actual test and debug. I will have to admit, and to this day, the reference site that taught me the most was www.w3schools.com. I used that reference at that time I had to learn ASP, ADO and SQL. And to this day I use it for CSS, HTML5, JavaScript and PHP.
Books are good learning tools, and I have a large collection of them, from Distributed Programming in VB 6, Programming C# and Linux Cookbook to Oracle DBA and ADO.Net.
A more modern day method of learning is in the way of the Internet via crowd sourcing. When one crowd sources, they use Twitter or Facebook for instance and reach out to a network for help. I been doing my recent learning from Tweeps (Twitter Peeps) I follow, via #sqlhelp hash tags just to name a few. When you crowd source, you usually get a response from a friend or follower or a link to a site that will answer your questions. This is where you get recommendations to blogs. When you connect with friends on social networks, you find an array of resources to continue your learning, such as webinars and user groups of the subjects you are trying to learn.
I now do most of my recent learning via the web. I will add that formal education is in fact the social norm of learning. When I first went to college, I got a degree in Mass Communications. I decided to return to school to enhance my enthusiasm with computers and took programming classes at a community college. All in all, Books, web sites, webinars, Crowd Sourcing, social networking and formal education make for a good combination of learning.
What am I currently learning and how
I am learning BI (Business Intelligence) for SQL Server 2008 now, I reference the online community and crowd source for knowledge. Although, I did buy Microsoft’s Smart Business Intelligence Solutions with SQL Server 2008 by Langit, Goff, Mauri, Malik and Welch, I do plenty of online learning. I’m don’t negate that books are not as effective, did I mention, a few of the Tweeps I follow are very successful book authors in SQL Server. I recommend the Learn Microsoft BI site and Pragmatic Works webinars. And connect with some of the experts via Twitter or Facebook, ask and learn.

Friday, April 30, 2010

The Road to MCITP: DBA

It’s about that time to focus on a few things, one being Microsoft Certification. I passed the 70-433 Database Developer certification last year. My intention is to become a Microsoft Certified IT Pro Database Developer and DBA.
Microsoft has three Technology Specialist (MCTS) certification and three IT Professional certifications for SQL Server 2008. The MCTS include Implementation and Maintenance (70-432), Database Development (70-433) and Business Intelligence Development and Maintenance (70-448). Each of these are the prerequisite to the IT Professional certifications (MCITP) . For instance if you take 70-432 and 70-450, Designing, Optimizing and Maintaining a Database Server Infrastructure using Microsoft SQL Server 2008, you obtained MCITP Database Administrator. Exam 70-433 along with 70-451, Designing Database Solutions and Data Access Using Microsoft SQL Server 2008, makes you an MCITP Database Developer. Lastly, 70-448 and 70-452, Designing a Business Intelligence Infrastructure Using Microsoft SQL Server 2008, make you an MCITP Business Intelligence Developer.
I plan to log my voyage to obtaining my goals on this blog. I anticipate that discussing any details will boost my confidence, and perhaps will encourage others to shoot for Microsoft certification. You can get more details about SQL Server certification of other products from the Microsoft Learning site.
A few tips that I know of. First and foremost, set a date to test. I noticed I prep more for the exams when I schedule and actually register for the test. Registration fee’s for most MS exams are $125 USD. You can register for an exam at www.prometric.com. Currently, they have an offer, from now until June. I’ve known of the free retake voucher for any Microsoft Exam from Prometric for some time now. I been a very bad geek and have been putting if off for some time.  Also, thanks to Rob Boek, I have obtained a 50% off voucher for the 70-432, the first requirement for Certified DBA. Step one, register, secondly, log into Microsoft Learning Plan with a MS Live account and take advantage of the free Microsoft material which include readings, tutorials and recommended books.
Lot into it. If you’re about to take a test, Good Luck and I Hope this information helped.

Wednesday, April 28, 2010

SQL Server R2 Countdown


The time upon us is near. MSDN subscribers will be able to download the full second release of SQL Server 2008. I’m looking forward to it. At the organization that I work for, we have been sitting on SQL 2000 for a while. Although we have implemented SQL Server Report Services, it is now time to focus on the new. Our plan of attack includes migration of DTS to SSIS and a full performance tuning routine to include reviewing of index, clusters, bottlenecks, etc. Moreover, our existing Disaster Recovery will be updated, and luckily, R2 should make it easier.
All in all, it’s a very exciting time, with that said, I killed some time creating this simple R2 countdown in JavaScript. If you’re interested, simply copy the code below and add it to your site.

<script language="JavaScript" src="http://gvilla.co.cc/sql_rs_cntdwn.js"></script>

I plan to write more on this as we go along, perhaps I can get some thoughts from others.

Best regards.

Wednesday, April 21, 2010

SQL Server 2008 R2 announcement

Twenty months after SQL 2008 was released, Microsoft announced this morning SQL Server 2008 R2 has been released to manufacturing in a conference call with Sr. Vice President Ted Kummert. After several “Launch Goofs” and speculated dates, the definite dates are May 3rd, 2010 for MSDN and TechNet subscribers and the public will have the R2 available to them on May 13th, 2010. Although, a trial version and a light weight Free SQL Server 2008 R2 Express is already available for download.
Although I cursed Pivot tables at a previous job where we lived by them on a day to day basis, a highly talked about feature of R2 is PowerPivot. PowerPivot is a self serviced data tool for user access using Excel 2010 and SharePoint 2010. A feature I look forward to is the Report Builder 3.0. Coming from Crystal Reports development and just recently began using SSRS, the new release will provide enhanced wizards, visualizations and authoring.
Other features include a Master Data Services to centrally manage critical data assets companywide and across diverse systems. In addition, Master Data Services will enable more people to securely manage master data directly. Also featuring StreamInsight a latency complex event processing platform to help monitor, analyze and act on the data in motion to make more informed business decisions in near real-time.
And even though PBM was only slightly mentioned in the Q&A, R2 will be capable to manage applications and instanced by policy. To learn more about PBM, pick this book up, Pro SQL Server 2008 Policy-Based Management.
To conclude, the most important detail of conference call in Redmond was SQL Server 2008 R2 availability dates, May 3rd for MSDN and TechNet subscribers and May 13th available for public download. There’s no Launch party as of yet, however you can get more details on the R2 Digital Tour.

Tuesday, April 13, 2010

T-SQL Tuesday #005 SQL Server Report Services Basic Parameter Tips

Today is my first attempt to participate in T-SQL Tuesday. T-SQL Tuesday is an idea by Adam Machanic, inviting new and existing SQL Server bloggers to post about the same topic on the same day. I decided to take a look at this Tuesday’s topic, Reporting, and give it a go.
I come from developing Visual Studio applications with SQL Server databases, and Crystal Reports have been my reporting tool of choice. Until now of course, I utilize SQL Server Reporting Services. This has been a recent change, and the hardest thing for me was to find basic help or online resources. Aside from sources writings on how to install and configure SSRS, therefore I share with you basic parameter tricks. The first thing one need to know is they must have SQL Server Business Intelligence Development Studio or Visual Studio installed.
SSRS allows you to set parameters on your report on the SQL syntax. For instance, you want to show a report pertaining to specific date range, your SQL would be something like this:
SELECT ProductID, Description, ModelNo, WarrantyExp FROM Products WHERE WarrantyExp  BETWEEN (@DateFrom and @DateTo)
When you browse to this report, you will see on the toolbar two input boxes, DateFrom and DateTo. Open the “Report Data” Tab from the View menu. You will see a directory with Parameters, these being the ones in your query. You can right click and select their dataype, to where a DateTime datatype will enable a date picker in the input boxes at run time. Keep in mind that the input boxes will be names accordingly to the parameter variable without the “@” sign.