Archive for the ‘ SQL’ Category

Error: "SQL BPA command line has encountered a problem and needs to close"

When running Windows Update and installing the SQL Express Update I have received this error on a couple of machines.

Error: “SQL BPA command line has encountered a problem and needs to close

To get the installer to work (and not crash) I had to do this…..

01.) Create a directory C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\BPA\BPAClient

02.) Copy the BPAClient.dll form the C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\BPA\Bin directory into the directory that you just created

at   then I continued with the install and it worked.

Re-run Windows Update to Install the SQL Server / SQL Express Update.

I have no idea why this works :)

BOOK: Murach’s SQL Server 2008 for Developers

I consistently meet good developers who are not database “experts”.

Many of us had a good deal of formal education on Data Structures, Algorithms, Patterns, Syntax, Methodologies, but learn about developing with Databases and the associated tools a little bit as a time as our work took us through the process.

Murach’s has just updated their great book on SQL Server for Developers for all the 2008 versions from Microsoft.

Not only does it provide detailed enlightenment on all the “tools” like the SQL 2008 Management Studio, but it’s full of practical “How-DO-I” stuff.

For example, we all know that binary or other “un-typed” data can be stored in a Table Column of type “BLOB”. But how do I get stuff into and out of a BLOB field.

See Chapter 19 on working with BLOBS. The intro shows the T-SQL Syntax for INSERT statements to work with a BLOB. But later in the chapter comes a whole sample application with C# code !!!

That’s just one example – pick up a copy for the rest :)

Check it out [ HERE ] on Amazon.com

SQL Express – "Failed generate a user instance…"

I Love SQL Server Express. I write demos. Lots of them. SQL Express is great because it’s free and works with .MDF files so that I can just bundle up the database with my demo and folks can download a demo, run, and experiment.

I’m “learning” to love Windows Vista.

My only real complaint is that we OVER DID security. I want a switch that says…..

  1. Use Vista’s Maximum Security (I never would.)
  2. Lighten Up a Bit (You know, turn of UAC and such.)
  3. Make security on this vista box just like Windows XP
  4. Make me a GOD on this box (Super Grand Admin – I accept the responsibility.)
  5. Windows 98 Mode (TURN IT ALL OFF.)

Life’s been very busy these days and I’m working on some new illustrative demos for my AJAX World Talks next week.

Trying to connect to my SQL Express database from my ASP.NET code yields the following message.

“Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.”

… “a failure.”

CAN YOU BE A BIT MORE SPECIFIC ????????

I know, I know, this is a typical Microsoft error message.

I know SQL Express installers locked down to some extend so I thought maybe the issue was disabled protocols as I was carrying forward some code, but alas – nothing seamed to help. I tried all the configuration tools, used the surface area tool and added everyone to the SQL admin’s groups. NOTHING

After searching and playing for some time I got things working again and wanted to share the solution.

If you’re running from the IDE then you are running as yourself so:

Delete C:\Documents and Settings\USERNAME\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS.

If you’re running via IIS the user is usually ASPNET so….

Delete C:\Documents and Settings\COMPUTERNAME\USERNAME\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS

Hope you found this and it saves you some time.

Northwind for SQLExpress

Some time ago we had Scott Mitchell create THIS GREAT SET OF DATA ACCESS TUTORIALS

I’ve had lots of requests to record video versions of Scott’s tutorials. (Scott already did all the hard work :)

I thought you all would prefer this I use SQLExpress which does not come with SQL Express.

You can get SQL Express here: http://www.microsoft.com/express/sql/default.aspx

To get Northwind for SQL Express…..

1) Navigate to the following URL and click the Download button – http://www.microsoft.com/downloads/details.aspx?familyid=06616212-0356-46a0-8da2-eebc53a68034&displaylang=en

2) Complete the download and install process. This places the necessary files for Northwind (and Pubs) into the “c:\Sql Server 2000 Sample Databases” folder.

3) Open a command window. (Go to Start, Run, type Command and click OK)

4) Change the directory to the sample databases (type:  cd c:\SQL Server Sample Databases)

5) Type or paste the following into the command window replacing computerName with the actual name of your computer:

   osql -E -S computerName/SqlExpress -i instnwnd.sql

6) now go to VS and create a data connection using the computerName\sqlexpress as the Server name in the Add Connection dialog. The Northwind database should now be available.

Or, you can just drag Northwind.mdf & .ldf and drop them into your App_Data Folder

Then you’re ready to start the tutorials. (The videos will take me a while :)

Do you PASS ?

Snessug_logo_banner

My buddy Steve Simon has recently formed an official PASS (Professional Association for SQL  Server) Chapter in Providence RI.

They meet on the second Wednesday of every month at the New England Institute of Technology in Warwick, Rhode Island from 6:00PM to 9:00PM. Click here to become a member.

http://www.snessug.org/

Microsoft releases CTP SQL 2005 Drivers for PHP

Microsoft has released a Community Technology Preview of its new SQL 2005 driver for PHP.

Click HERE to get the bits.

Click HERE to leave comments for the team.

BOOK – Murach’s SQL Server 2005 for Developers

If you’re a regular reader of my blog then you probably know that I’m a big fan of the Murach’s books and Murach’s SQL Server 2005 for Developers is no exception.

If I were teaching a course on SQL for Developers this would be the text book that I’d use. It even comes with an Instructor’s DVD.

While it contains the expected academics, it also includes lots of “real world stuff”.  In addition to the basic mechanics of programming against SQL Server it includes great sections on things like SQL Database Design and a SQL CLR drill down. It also includes cool advances sections like all about working with temp tables.

This one will stay on my in-reach book case. Hope you pick up a copy.

SQL Server Hosting Toolkit

Getting your database deployed :

The Database Publishing Wizard enables the deployment of SQL Server 2005 databases into a hosted environment on either a SQL Server 2000 or 2005 server. It generates a SQL script file which can be used to recreate the database in shared hosting environments where the only connectivity to a server is through a web-based control panel with a scripting window.

Get it HERE : SQL Server Hosting Toolkit