Aug 25 2008

Clearing In The Woods

Published by rich
    under Photography, Reflection   

A beautiful day hiking through the woods, we came upon a clearing amongst the oak trees:

woods231

No responses yet

Aug 15 2008

Requirements

Published by rich
    under Software, Web Development   

One of my favorite quotes related to software development:

 
The hardest single part of building a software system is deciding precisely what to build. No other part of the conceptual work is as difficult as establishing the detailed technical requirements, including all the interfaces to people, to machines, and to other software systems. No other part of the work so cripples the resulting system if done wrong. No other part is more difficult to rectify later.

                                                                                                    –Frederick Brooks

No responses yet

Aug 05 2008

Orphaned Users

Published by rich
    under Software, Web Development   

 Full credit to Narayana Vyas Kondreddi — this code has help me immensly with database imgration and server clean-up. Thank You sir.

CREATE PROC dbo.ShowOrphanUsers
AS
   BEGIN
       CREATE TABLE #Results (
           [Database Name] sysname       COLLATE Latin1_General_CI_AS,
           [Orphaned User] sysname       COLLATE Latin1_General_CI_AS)
      
       SET NOCOUNT ON
      
       DECLARE   @DBName sysname,
                         @Qry       nvarchar(4000)
                                        
       SET @Qry = ''                
       SET @DBName = ''
                                  
       WHILE @DBName IS NOT NULL
           BEGIN
               SET @DBName = (SELECT MIN(name)
                                             FROM     master..sysdatabases
                                             WHERE   name NOT IN ('master','model','tempdb','msdb',
                                                                                     'distribution','pubs','northwind')
                                                           AND DATABASEPROPERTY(name,'IsOffline') = 0
                                                           AND DATABASEPROPERTY(name,'IsSuspect') = 0
                                                           AND name > @DBName)    
               IF @DBName IS NULL
                   BREAK
                  
               SET @Qry = ' SELECT ''' + @DBName + ''' AS [Database Name],
CAST(name AS sysname) COLLATE Latin1_General_CI_AS
AS [Orphaned User] FROM ' + QUOTENAME(@DBName) +
'..sysusers su WHERE su.islogin = 1 AND su.name
<> ''guest'' AND NOT EXISTS
( SELECT 1 FROM master..sysxlogins sl WHERE su.sid = sl.sid )'
                                                                                                
               INSERT INTO #Results
               EXEC( @Qry)
           END
          
       SELECT     *
       FROM         #Results
       ORDER BY [Database Name],
                         [Orphaned User]
   END

No responses yet

Jul 22 2008

This Website is Mine [disclaimer]

Published by rich
    under This Website   

Seems obvious doesn’t it? Well, it’s branded with my name; that’s a clue.  All of the opinions, thoughts, photography, artwork, and code presented on this website are solely mine [unless otherwise stated].  I do not represent any businesses, organizations, or my employer in this regard. I do not to make money  and have no commercial interests with this website. This website is simply a platform for self expression.

If you have issues with the content of this website, feel free to log-in and post comments (be polite) or send me an email; there is a contact form on the “About” page. Please do not contact my family, friends, or my employer with issues regarding this website – that’s not cool.

 The information on this website is provided “AS IS” with no warranties, and confers no rights.

I reserve the right to publish or delete [for any reason] comments posted on this website. All comments will be approved before publication.

All original content is copyrighted. All content is subject to change without notice.

You should not drive or operate machinery while reading this blog. Your actual mileage may vary.

[I'll write a better disclaimer later; but this gets to the main point for now]

No responses yet

Feb 13 2008

Poipu Beach Kauai, Hawaii

Published by rich
    under Hawaii, Kauai, Photography   

This beach is absolutely beautiful; great for swimming and snorkeling. Early morning we would see surfers catching waves on the other side out a bit where the waves break. In the winter the south shore [where Poipu lives] is generally calmer while the north shore roars with intensity, we have seen it. The sand on this beach is golden and very soft…you just love to wiggle your toes in it. Right now it’s about 5 degrees in Chicagoland, and it snowed almost every day this month so far. I want to go back to Kauai! This shot was taken in the morning just after an early breakfest at the Sheraton. For a better view, enlarge your browser window and “click it”.

Poipu Beach Kauai

“click-it for the big picture”

No responses yet

Feb 10 2008

Ocean View Near Poipu Beach Kauai

Published by rich
    under Hawaii, Kauai, Photography   

While in Kauai we stayed at the Sheraton which embraces the Poipu Beach on the south shore. The Poipu Beach is arguably one of the very best beaches on the island; totally user-friendly, especially in the winter. It consists of three beautiful crescents of golden sand accented with black lava rocks. The shot below was taken just near west edge of the beach; painted with a beautiful sunset accompanied by a warm tropical breeze while I enjoyed a Mai Tai…perfection! Today in Chicagoland it’s -25 to -30 degrees fahrenheit with the wind chill-factor — ouch!

Ocean View at Sunset near Poipu Beach Kauai

No responses yet

Feb 08 2008

Happy Birthday Bro

Published by rich
    under Misc   

I wish you all the very best; and many more to come. Lookin’ forward to tippin’ a few with ya. Have a good one!

One response so far

Feb 08 2008

Garden Island Kauai – Kalalau Valley

Published by rich
    under Hawaii, Kauai, Photography   

Aloha. I recently returned from a fantastic vacation on the island of Kauai, Hawaii. This was my first visit; I fell in love with this place. This trip was a spiritually significant experience for me.

The photo below was taken while hiking on the Kalalau trail which provided a spectacular view of the Kalalau Valley along the Na Pali coast on the north shore of the island.  Please click the image for a larger view (900 x 602):

Garden Island Kauai - Kalalau Valley

“click it”

No responses yet

Dec 16 2007

A Small Website of Massive Proportion — Sitecore

Published by rich
    under CMS, Web Development   

Imagine a straight forward informational website of around 25 pages including a few special features like an events calendar, publications section, contact form, and a simple membership management piece with maybe 40 members…and yes, it has an intergrated Content Management System — Sitecore. Sitecore is like an iceberg where the end-User Interface is just the “tip” as they say. The CMS functionality and databases (8 in this case) which exist below the surface is massive.  This relatively simple informational website built with Sitecore requires more then 5 Gigabytes of disk space, yes that’s right 5 GB. Something to consider when building with this system.

One response so far

Dec 14 2007

To Copy a Database…

Published by rich
    under CMS, Web Development   

Lately I have been involved with migrating websites from one production server to another. All of these websites are CMS applications with databases on the back-end; implemented with Microsoft Technologies. This post will discuss the database aspect of website migration. There are a number of different methods to copy or move a database: detach-move-attach, backup-move-restore, export-import, DTS, Copy Database Wizard. Since we are not only moving the databases, we are also upgrading from SQL Server 2000 to SQL Server 2005, I decided to give Copy Database Wizard (CDW) a try…it’s a tool under SQL Management Studio full version. In theory CDW sounds great, but in practice you’ll pull your hair out getting it to work in some cases. CDW is very finicky about set-up, permissions, etc.

Preparation

  • Check the source database ownership. If needed, change it to an account with sysadmin membership. For this example I used the sa account. To change DB ownership execute the following code in Query Analyzer:
use [currentdatabase]
go
sp_changedbowner 'yourusername', 'true'
go
  • Check the source database for orphaned users and resolve or delete them. Here is an excellent article about orphaned users along with a Stored Procedure for identifying them:
    http://vyaskn.tripod.com/troubleshooting_orphan_users.htm
    Orphaned users will cause a failure at the destination during the DB copy.
  • On the source server add an entry to the LMHOSTS database file which is the IP address and NTLM name of the destination server. For additional info: http://support.microsoft.com/kb/314108
  • To avoid data loss or inconsistency, you must be sure there are no active sessions attached to the database being moved or copied. It’s probably a good idea to do it off-hours and take the website off line during the migration.
  • Make sure the SQL Server Agent has the proper user account setting…should be set to the Local System Account (NT AUTHORITY\System).

Process

  1. Login to the destination server with admin credentials, fire-up Management studio and the CDW tool. Right click on a db, CWD is under tasks. CDW will step you through various screens to build the SSIS[DTS] package.
  2. Specify the Source SQL Server by name or IP, use SQL Server Authentication, enter credentials of the saaccount – ID and password.
  3. Specify the SQL Destination by name or IP, use SQL Server Authentication, enter sa account credentials of the sa account — ID and password.
  4. Select Transfer Method, use the SQL Management Object method. This will allow the DBs to stay online and operational during the copy.
  5. Select databases to be copied — use the copy checkbox…don’t move it.
  6. Configure destination database. For this example I just used the default destination name and location. I also selected “drop any database at destination if one exists” to overwrite it.
  7. Select the database objects. Leave the logins selected and nothing else. This will bring over the logins, so your connection strings should work at the destination with only a server name change.
  8. Configure Package screen. Select logging options. Sometimes it’s good to direct logging to a file for better debugging.
  9. Schedule package or run immediately — I have been just running immediately.
  10. Verify choices — go back if needed.
  11. Run the job — all steps should be all green [pass] or study the log file if debugging is needed.
  12. Refresh Management Studio database list. Right click top server node and select refresh. The new databases should now appear. Check tables, users, etc.
  13. Run sp_updatestats against the database on the destination server to
    update statistics and make sure that the copied database is performing optimally.
  14. Update connection strings and test application.

No responses yet

Next »