Blog Home  Home Feed your aggregator (RSS 2.0) or Subscribe by Email   
StupidProgrammer.com - Design
"Stupid Programmer You Are" --Master Programmer Yoda
 

 Tuesday, April 15, 2008

The other day, we noticed that when our CREATE DATABASE scripts were running... the databases were not created where we expected. Due to our setup, we want the databases and log files to use the SQL Server default locations.

We ran the following T-SQL to verify the default locations:

USE master
GO

DECLARE @SmoDefaultFile nvarchar(512)
EXEC master.dbo.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'DefaultData', @SmoDefaultFile OUTPUT

DECLARE @SmoDefaultLog nvarchar(512)
EXEC master.dbo.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'DefaultLog', @SmoDefaultLog OUTPUT

SELECT ISNULL(@SmoDefaultFile,N'') AS [DefaultFile], ISNULL(@SmoDefaultLog,N'') AS [DefaultLog]

Results...

DefaultFile   DefaultLog
-------------------------------- --------------------------------
D:\SQLDbs\Data D:\SQLDbs\Logs
(1 row(s) affected)  

Looks correct... why is it putting the database and log files in:
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data

Just to be sure... we verified this setting on the Server Properties screen in SQL Management Studio...

SQLProperties

Looks correct...

What we found through testing... In order for the default locations to work as expected... SQL Server must be restarted. I feel (not proven) that SQL Server loads these values from the registry at startup, and does not update when the change happens on Server Properties.



Tuesday, April 15, 2008 8:16:49 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]   Database | Design  |  Trackback
 Wednesday, January 30, 2008

BizTalk Last year, our local .NET User Group held a four session .NET University to cover the 3.0 Framework (WPF, WCF, WF, and CardSpace).

Now, thanks to Karl Rissland (special thanks to Doug for sharing the information), there are sessions for BizTalk.

You can get all the information over at the .NET University Site (Power Points, videos, labs, etc...).

If there is anyone that would like to present the material at our Pee Dee Area User Group, please let me know!!!



Wednesday, January 30, 2008 10:36:18 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]   .NET | Database | Design  |  Trackback
 Monday, October 15, 2007

toolshed Russ Fustino is coming to Florence, SC this Wednesday! Russ is a MSDN Developer Community Champion for Microsoft. (Register for the event here) Russ is stopping by on his way to Raleigh from Tallahassee!

FYI: A copy of Office Ultimate 2007 will be given away!

Did you ever feel inundated with developer tools? Did you ever feel you are missing something that could make your life easier as a developer and as a power user? There are so many tools available to choose from and it keeps getting tougher to  keep up with. Tool familiarity continues to be one of the top developers challenges. This series of seminars is all about tools for developers, by developers.

Welcome to this new, fresh and original ground breaking MSDN seminar series from Russ’ Tool Shed called … It’s All About The Tools.  This is the first installment of many more to come. This session is tech talk about tools for developers. Join Microsoft Florida Developer Evangelist Russ Fustino for his take on what's hot in the developer's toolbox. There's something here for everyone, from beginners to experts. Oh, by the way, you might want to put your hard hat on for this one!

In this session you will see demonstrations the following tools and a few more surprises…

Fiddler
Web Stress Tool
IE Developer Toolbar
Visual Studio IDE tools
   code convertors
   obfuscator
   snippit manager (and the snippet tool in vista as a bonus)
   toolbox scratch pad
   Refactor
   Visual Studio Express tool’s
   Visual Web Developer Express:
   Web Administrator
   Membership and personalization
Visual Express C#
   XNA Express
Live Services
   Spaces
   Live Writer
   MSDN article on search provider (2007.08)

Silverlight 1.0/1.1 XAML Designer (Expression Blend)
Community Tool Web Site Review 
Top downloaded SDK’s
GotDotNet: http://www.gotdotnet.com/team/ide/
MSDN Dev Center: http://msdn.microsoft.com/vstudio/downloads/powertoys/
CodePlex home: http://www.codeplex.com/Default.aspx
Download center and more!

 

To find out more and register for the event go here. This is going to be an awesome event!

Florence, Columbia, Charleston, Conway, Myrtle Beach, Fayetteville, Wilmington, Charlotte (anyone from anyplace)...

You are ALL WELCOME to attend this FREE event.



Monday, October 15, 2007 10:25:12 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]   .NET | Database | Design | Mobile | Software  |  Trackback
 Wednesday, October 03, 2007

I have known about this for a while, but just recently stumbled upon it again.

Here is a cool site at http://www.databaseanswers.org to assist with data model designs.

They have hundreds of database designs specific for certain types of needs such as...

163+ data models...

Thanks Chris Craft for first sharing the site with me!



Wednesday, October 03, 2007 2:02:38 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]   .NET | Database | Design | Mobile | WebSites  |  Trackback
 Wednesday, September 26, 2007

Win2008RC0 Windows 2008 RC0 was released yesterday. I am really looking forward to using IIS7. I am anxious to setup a few web sites with SQL 2008 and see how it works and performs.

Get it Windows 2008 RC0 here
Get SQL 2008 CTP here

Cool Benefits of Windows 2008 (taken from here)

  • Cross-site copy allows you to easily copy Web site settings across multiple Web servers without additional configuration.
  • Built-in virtualization to virtualize multiple operating systems—Windows, Linux and others—on a single server. With virtualization built into the operating system and with simpler, more flexible licensing policies, it's now easier than ever to take advantage of all the benefits and cost savings of virtualization.
  • Protection of your server with security innovations that reduce attack surface area of the kernel, resulting in a more robust and secure server environment.
  • Protection against malicious software with User Account Control with a new authentication architecture. (NOOOOOOOOOOO)
  • Simplified management of your IT infrastructure by using new tools that provide a one-stop interface for server configuration and monitoring, as well as the ability to automate routine tasks.
  • Effectively pinpointing and resolving trouble spots with powerful diagnostic tools that give you ongoing visibility into your server environment, both physical and virtual.

And the one I really want to see...

  • Delegated administration of applications and sites so you can give control to different parts of the Web server to those who need it.

My understanding is that this will allow web hosting companies to give more control of IIS to clients hosting their web applications on your server. Pretty cool!!!

 

Thanks Somasegar for the announcement.



Wednesday, September 26, 2007 8:32:44 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]   .NET | Database | Design | Mobile | Software  |  Trackback
 Wednesday, September 12, 2007

Jacob Sebastian wrote a very cool article on "power of the merge"...

How many times have you needed to merge data between tables... or mobile devices to central servers...

 

"MERGE, a new keyword which performs INSERT, UPDATE and DELETE operations at one go"

His example:

Old way to merge tables:

    1 /*
    2 Pseudo code used for saving sales order information with SQL Server 2005
    3
    4 -- save order header information
    5 If OrderNumber found in OrderHeader
    6    Update the information
    7 Else
    8    Insert the information
    9 end
   10
   11 -- save order detail information
   12 Delete from Order detail table all items not in the order info
   13 Update Order detail for all items present in the order info
   14 Insert into order details all new items in the order info
   15 */

New Way using Merge

    1 /*
    2 Pseudo code for saving the same order with the MERGE statement of SQL Server 2008
    3
    4 -- save order header information
    5 MERGE order info to Order Header table
    6
    7 -- save order detail information
    8 MERGE order info to order detail table
    9 */

"No, I did not miss anything. You can write the code in just 2 lines."

Check out entire article here.



Wednesday, September 12, 2007 1:48:50 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]   .NET | Database | Design | Mobile  |  Trackback
 Tuesday, August 07, 2007

Tuesday, August 14, 2007, is our next meeting of Pee Dee Area .NET User's Group

Chris Reeder (that's me), from ACS Technologies, will be presenting an Introduction to SQL Server Data Partitioning. Learn how to better handle billions of records in one table or how to make better use of fast and slow drive combinations. Will also explore how to speed up disaster recovery and other maintenance.

We will see real world benefits and situations for using this new feature to SQL Server 2005.

Here is the tentative schedule:

6:00 PM - 6:20 PM Socializing / Dinner
6:20 PM - 6:30 PM Introduction, Sponsor Time, and News
6:30 PM - 7:45 PM Presentation on SQL Data Partitioning
7:45 PM - 8:00 PM Drawing and Wrap Up

Please subscribe to the PDANUG Upcoming Events and News Feed here.



Tuesday, August 07, 2007 12:08:52 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]   .NET | Database | Design  |  Trackback
 Monday, July 09, 2007

PDANUG_Short_Small Tuesday, July 10, 2007, is our next meeting of Pee Dee Area .NET User's Group

Chris Craft, from Taylor Data Systems, and Page Brooks, from ACS Technologies, will be presenting a follow up introduction to Silverlight, Microsoft's new platform for delivering rich internet applications (RIAs).

We will further explore Silverlight and related technologies.

 

Here is the tentative schedule:

6:00 PM - 6:20 PM Socializing / Dinner
6:20 PM - 6:30 PM Introduction, Sponsor Time, and News
6:30 PM - 7:45 PM Presentation on Silverlight
7:45 PM - 8:00 PM Drawing and Wrap Up

 

Please subscribe to the PDANUG Upcoming Events and News Feed here.



Monday, July 09, 2007 8:18:05 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]   .NET | Database | Design  |  Trackback
 Friday, July 06, 2007

Owner Qualification in SQL? Huh?

Depending on your SQL setup and user accounts, it is possible to have the same table name in a database with different owners. I would not advise it, but SQL allows for it... And I am sure there is a reason for this...

Examples:

dbo.Employees
chris.Employees
sqlhero.Employees

Which table does this statement  get data from?

SELECT *
FROM Employees

Answer... It depends on your SQL username. When doing a SELECT, you could get the wrong table. (Also applies to other object types like stored procedures, views, etc)

So, it is generally a good idea to qualify the owner of your SQL objects.

SELECT *
FROM dbo.Employees

Anyway... the primary reason for the post...

There is a great article on sqlblog.com discussing an even more "real world" reason for explicitly qualifying the owner. PERFORMANCE!

http://sqlblog.com/blogs/linchi_shea/archive/2007/07/05/performance-impact-of-procedure-calls-without-owner-qualification-sql-server-2000.aspx

In the post, Linchi Shea does a great job of explaining the performance impact of fully qualifying your object owners. In his example, you will see in SQL 2000 it makes a BIG difference in performance. SQL 2005 is a little faster too. But, every little bit helps when you have thousands of users calling the same procedure!



Friday, July 06, 2007 8:56:14 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]   .NET | Database | Design  |  Trackback
 Thursday, July 05, 2007

SQL2000Box Microsoft will stop supporting SQL Server Service Pack 3a next Tuesday, July 10th.

 

Be sure you update your SQL Server Instances to SP4.



Thursday, July 05, 2007 9:52:32 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]   .NET | Database | Design | Mobile  |  Trackback
 Tuesday, July 03, 2007

Call me Stupid... But I never knew this...

I had a query that was returning more data than I expected. The goal was to find all files that started with 'backup_' (literal underscore) and end with '.zip' extension.

TSQL:

SELECT *
FROM MyFILES
WHERE MyFileName LIKE 'backup_%.zip'

Results:

backuptemp.zip
backup_2007_07_01.zip
backup_2007_07_02.zip

Argggggggg!!!

I don't want the temp backup!!!

Here is the problem. The underscore ("_") is a wildcard character for the LIKE clause. You can find a really good description of the LIKE clause here. (on a sybase site)

So, how do you use a wildcard as a literal in the like clause? Simply wrap the wildcard in braces LIKE below.

SELECT *
FROM MyFILES
WHERE MyFileName LIKE 'backup[_]%.zip'

Side note: What exactly does the underscore do?

SELECT *
FROM MyFILES
WHERE MyFileName LIKE '_mail%'

Will return files like:

gmail.jpg
email.jpg
zmail.jpg
emailbackups.zip

I allows for a wildcard, but for one character.



Tuesday, July 03, 2007 8:29:29 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]   .NET | Database | Design  |  Trackback
 Wednesday, June 20, 2007

There was a RED package waiting on me when I got home from work today. 

Friend of Red-Gate

I have been officially welcomed into the Friends of Red Gate program. The picture is my red box and it's contents.

  • One Thank you letter from Rachel Hawley, Marketing Associate @ Red Gate
  • Ink Pen
  • 256 Jump Drive
  • Drink Coaster
  • Coffee mug that reads "You may look at my Red Gate mug.  You may not borrow it."
  • Then one of the coolest marketing items I have seen recently. For the SQL Tool Belt, it is a miniature tool belt to hold pens that fits snugly around a coffee mug.
  • And what an awesome t-shirt! "I didn't get where I am today by wearing the wrong t-shirt"
  • Of course, the greatest of all is copies of their software to use personally (Not For Resale).

Red Gate makes great SQL Server products and has been great to work with. Thanks Red-Gate for the  package. I will be writing more about the Red Gate suite of products of the next couple of weeks. I may even present at a Pee Dee Area .NET User Group what Red-Gate can bring to the development process.

By the Way, Red Gate wrote the greatest SQL Product to date: SQL Prompt (intenseness for SQL Server Management Studio & Query Analyzer)



Wednesday, June 20, 2007 9:17:05 PM (Eastern Standard Time, UTC-05:00)  #    Comments [1]   .NET | Database | Design | Software  |  Trackback
 Wednesday, May 16, 2007

Microsoft SharedView (Beta)
Connect. Show. Share.

Talk about collaboration!

 

This app allowed me, James (co-worker) and Page Brooks (across town) to all share my desktop. I allowed Page to take control of my computer. He opened applications, change documents, and modified queries. Meanwhile, James and I watched.

Then I changed the setting so they could only see one application (Visual Studio); not my entire desktop. I did not want them to see any of my top-secret applications I had open... :-)

After a little playing, Page shared his Visual Studio session on his computer. When I connected, I noticed something... there was a method in his code called "ThisCodeSucks".


Fine Print: Page was quick to realize that I was the one that changed his code :-)

This is a great tool to help your wife at home when she is having computer issues... or if a friend calls you because you are "Mr. Computer Club".

 

Download here: http://get.live.com/betas/sharedview_betas



Wednesday, May 16, 2007 10:42:39 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]   .NET | Database | Design | Misc | Software  |  Trackback
 Wednesday, May 02, 2007

Here is a look into the Google Headquarters!!! Kinda kwel!

http://www.time.com/time/photoessays/2006/inside_google/1.html

Hal, when are we getting the professional massage room?

                                                Thanks Dean for sharing...

Update:
Found a few more:

This one has a video about what it is like to work @ Google. It contains employee interviews and shows Google's approach to ingenuity. The 20% Rule is awesome. This is a Google sales pitch to make people salivate wanting to work for them... let me wipe my drool... 
   http://www.techeblog.com/index.php/tech-gadget/want-to-work-for-google-take-a-look-inside

Has a few aditional pictures.
   http://desinotes.com/2007/05/02/the-torture-of-working-at-google-in-googleplex/

Find our more @ http://www.google.com/jobs/



Wednesday, May 02, 2007 3:35:13 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]   .NET | Database | Design | Misc | Mobile | Personal  |  Trackback
 Monday, April 02, 2007

A high-level performance comparison between Windows Communication Foundation (WCF) and existing Microsoft .NET distributed communication technologies.

http://msdn2.microsoft.com/en-us/library/bb310550.aspx

Bottom line conclusion is that WCF is 25%-50% faster than Web services. Way cool!!!

Can't wait to prove it!

Thanks Kirk!



Monday, April 02, 2007 9:34:12 AM (Eastern Standard Time, UTC-05:00)  #    Comments [1]   .NET | Database | Design | Mobile  |  Trackback
 Friday, March 30, 2007

I noticed today that MapQuest now has an Aerial View of their maps. If that has been there long... oh well... shows how long it has been sense my last visit to the site.

I decided to pull up my house (similar to a previous post)

Looks good to me!!! Let's zoom in another click.

Huh... where did my house go??? Hurricane? Tornado? Huh... does not even look like it zoomed in?

Craziness!!! And yes... both of these are from MapQuest!!!



Friday, March 30, 2007 8:12:15 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]   .NET | Database | Design | Misc | Mobile | WebSites  |  Trackback
 Thursday, March 29, 2007

This will be the first time we have done anything like this... so brace yourself. 

Pee Dee Area .NET Users Group
April 10th 6:00 - 8:00
Directions: here

April 10th's Meeting will be held in two parts. (Make plans to attend now)

Part 2: Normal meeting at 6:00. Brian Hitney (structuretoobig.com), a Developer Evangelist with Microsoft will be speaking on Windows Vista Internals and Architecture.

Part 1: Brain will be speaking to the PDANUG users at 2:30 - 5:00. ACS Technologies will be hosting the event at their location in Florence. (Directions below). He will be discussing how to better build scalable web solutions with .NET. He will discuss Windows Communication Foundation if time permits.

**SPECIAL NOTE**
If any member of PDANUG would like to attend the 1st session hosted at ACS Technologies, PLEASE let me know ASAP (Send mail to the author(s)). I am trying to finalize plans, space, and snacks!!! Brian said he was going to bring 10 XBOX 360s to give away... Just Kidding...

 

Special Instructions: Directions here. Google maps does not get the exact location correct but it gets on the correct street. :-) The actual location is closer to the other end of the road near the intersection of I95 & I20. You can't miss the buildings. "ACSTechnologies" will be on the building. If you are attending; the meeting will be in the Khaki colored building on the left... not the "Salmon" colored building.



Thursday, March 29, 2007 8:18:13 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]   .NET | Database | Design | Misc | Mobile  |  Trackback
 Friday, March 16, 2007

PDANUG_Short_Small.gifPDANUG finally has an RSS feed.

Please subscribe to stay informed of future Pee Dee Area .NET User Group Events.

Please, spread the word!!!



Friday, March 16, 2007 9:06:51 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]   .NET | Database | Design | Misc | Mobile | WebSites  |  Trackback
 Friday, March 09, 2007

I want to personally invite you to attend the Pee Dee Area .NET User Group meeting, on March 13th, to learn more about ClickOnce Deployments in .NET. Jamey McElveen of ACS Technologies will be presenting. The presentation will include the basics of deploying with click once through the Visual Studio 2005 tools. Also, a brief introduction to customizing end user experience using the ClickOnce client API’s.

There will be a couple of nice ACS giveaways too…

Tuesday, March 13, 2007 6:00 PM - 8:00 PM Eastern Time (US & Canada)

Location: (here for directions)
McLeod Medical
800 Cheves St.
Florence, SC 29506

The April 10th meeting will be presented by Brian Hitney, Developer Evangelist with Microsoft. He will be doing a deep dive into the Vista kernel and architecture experience.



Friday, March 09, 2007 1:59:20 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]   .NET | Design  |  Trackback
 Thursday, March 01, 2007

If you have Messenger, this may be for you. You can now help raise money for charity.

It is called "I'm", which is short for "I'm Making a Difference"

From the live.com website.
"Every time you start a conversation using i’m, Microsoft shares a portion of the program's advertising revenue with some of the world's most effective organizations dedicated to social causes"

You simply have to add a special code to your display name in Messenger. That simple.

I am supporting the American Red Cross, but there are other options.

***Windows Live Messenger 8.1 is required



Thursday, March 01, 2007 2:40:26 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]   .NET | Database | Design | Misc | Mobile | Music | Personal | Software | Sports | WebSites  |