Monday, October 22, 2007

Failed to access IIS metabase Error - Solution 1

This type of problem will occur only if you have both 1.1 & 2.0 Framework installed on your system. (along with the associated Visual Studio 2003 and 2005 products because you can't help but write software in both environments).

Upon running your website (via http://localhost/xxx or something like that), you may encounter the error page that reports:

Failed to access IIS metabase

If so, you may have installed IIS after installing the .NET framework. If that's the case, try running to repair your ASP.NET installation and set up all of the appropriate ISAPI extension mappings.

aspnet_regiis -i

If, however, you're like me and had IIS already installed, and you installed VS 2003 and then VS 2005, and then set up a 1.1 virtual directory / website, simply check that the appropriate ASP.NET version is associated with it (Select VDIR --> Properties --> ASP.NET tab).

"aspnet_regiis -i" - However, the directory it is located in was not included a system path previously, so just note that you may have to run this from the "WINDOWS\Microsoft.NET\Framework\vX.X.XXXXX" directory (with the X's being your version number)

Visual Studio Clipboad Ring - Tip

Unlike most other applications, VS.NET has something called a clipboard ring.
During development, the average developer finds it very annoying that you can only save 1 item into the clipboard (copy-and-pasting).
Well with VS.NET, the clipboard ring allows you to save up to 20 items into the clipboard. To reference this items, its important to know that they are saved in a LIFO method (Last-In First-Out if your not into stacks).
Usage:
1. Copy a selection using Ctrl-C (Copy). You can repeat this copying upto 19 more times.
2. Pressing Ctrl-V will paste the last item you copied. Nothing new yet right?
3. Pressing Ctrl-Shift-V will also paste the last item in the clipboard.
Now say you want to retrieve the 2nd, or 3rd last item you inserted into the clipboard, simply keep pressing Ctrl-Shift-V to cycle through the items in the clipboard.
So this saves you from running back and forth between documents to get the next selection of text you want to paste over to some other page of code.

Database Diagrams Error - SQL Server 2005

Hello Friends,

Most of our friends will receive the below error message when they are trying to create a database diagram. This will happne when the database


Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects.


This is covered in section 4.8 in the Readme file that comes with the product .To install database diagram support in SQL Server Management Studio, databases must be in SQL Server 2005 database compatibility level. Database compatibility level can be reset after diagram support is installed. To create database diagrams, change the database compatibility level to 2005, install database diagram support, and then return the database to the desired database compatibility level. For more information, search for "sp_dbcmptlevel" in SQL Server Books Online.So, run the following statement and try the diagram again.

EXEC sp_dbcmptlevel database_name, 90

I happened to have the SQL 2005 server DVD in my player, and I found aReadme in G:\SQL Server x86\Servers\ReadmeSQL2005.htm. There seem to beone in every top-level setup directory.

In addition to Erland's response, you can also find the readme here: http://support.microsoft.com/default.aspx?scid=kb;en-us;910228Also, the April update to Books Online will contain this information in the various topics on database diagrams.

Generating INSERT statements in SQL Server

Generating INSERT statements in SQL Server


http://www.codeproject.com/database/InsertGeneratorPack.asp