Sunday, April 10, 2011

"Failed to access IIS metabase" Error

I was working on a sample web project, where in I came across this error "Failed to access IIS metabase". This happened only when I tried to run the web project by "Using Local IIS Web Server" instead of the default "Use Visual Studio Development Server".  From the Error I was able to find out it is something related to IIS web server only. When I tried to dig into this issue, I understood this is because of my IIS installation. I installed IIS web server after installing my ASP.NET framework.

I got few suggestions to fix this error first one was 
 "To repair framework from the Add/Remove programs" : But for some reasons this did not work

Next suggestion was
  "To Register ASP.NET on IIS" . 
Registering ASP.NET on IIS is not just a matter of associating the various .aspx, .asmx, .axd, .ashx and the other ASP.NET extensions to the aspnet_isapi.dll ISAPI, more has to be done to create the ASP.NET account and to set it for ASP.NET requests, register the ISAPI itself and other stuff.

To do this we will have to use the aspnet_regiis utility
1. Click Start -> run -> cmd - ENTER
2. At the command prompt, type the following, and then press ENTER:
"%windir%\Microsoft.NET\Framework\<version>\aspnet_regiis.exe"
-i
  
Here version is the version number of the .NET Framework that are installed on our server

   -i is the register the .NET Framework 
   -u is to unregister the .NET Framework

We will have to do this for all the versions installed on the server. I did the following

"%windir%\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe" -i
"%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe" -i
"%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe" -i

My IIS web server started working!!!

How do you test Microsoft Visual Studio .NET Installation

1. Take a Sample aspx file, Let us say "test.aspx" And copy that to "c:\Inetpub\wwwroot" folder
2. Now open browser and type http://localhost/test.aspx: You should be able to see the page if your Microsoft Visual Studio .NET installation is right. aspx programs need the .NET framework to run. The .NET framework is one of the Windows component updated by the Microsoft Visual Studio .NET installation

How do you test IIS Installation

1. Take a Sample HTML file, Let us say "test.html" And copy that to "c:\Inetpub\wwwroot" folder
2. Now open browser and type http://localhost/test.html: You should be able to see the page if your IIS installation is right

Thursday, March 17, 2011

MMC could not create the Snap-In -IIS

If you get the following error while opening IIS,

MMC could not create the Snap-In




From the Command Line run, to resolve the issue
regsvr32 %windir%\system32\inetsrv\inetmgr.dll”

This command line basically registers the IIS Server DLL

Friday, September 10, 2010

Signature has been changed Error

ORA-04062 (Signature has been changed)

This error is cause when you have a master Schema & local schema, And the package Spec is not in sync with both the schema.

Solution:
  Compile the package one more time in both the schema.

Friday, September 3, 2010

Explain Plan

To Explain Plan
EXPLAIN PLAN FOR <Any Statement>

Eg:
EXPLAIN PLAN FOR
SELECT * FROM Emp

You can see the plan by selecting the PLAN_TABLE

SELECT * FROM PLAN_TABLE;

Or you can also use
SELECT lpad(' ',level-1)||operation||' '||options||' '||
        object_name "Plan"
   FROM plan_table
CONNECT BY prior id = parent_id
        AND prior statement_id = statement_id
  START WITH id = 0 AND statement_id = '&1'
  ORDER BY id;


You can also assign a name for the statement by
 
EXPLAIN PLAN SET statement_id = <statement Name> FOR <Statement>;

Example
EXPLAIN PLAN SET statement_id = 'example_plan1' FOR
SELECT full_name FROM per_all_people_f
 WHERE UPPER(full_name) LIKE 'Pe%' ;

Monday, August 30, 2010

What IS the cost of a query and what does it mean?

The formula for the cost (using the CPU Costing Model) of a query is:

Cost = (
#SRds * sreadtime
+ #MRds * mreadtime
+ #CPUCycles / cpuspeed
) / sreadtime

where:
#SRds = number of single block reads
#MRds = number of multi block reads
#CPUCycles = number of CPU Cycles

sreadtim = single block read time
mreadtime = multi block read time
cpuspeed = Standard 'Oracle' CPU cycles per second

The translation of this formula is:

The cost is the time spent on single block reads, plus the time spent on multiblock reads, plus the CPU time required, all divided by the time is takes to do a single block read.

This means that the cost of a query is the PREDICTED EXECUTION TIME, counted in number of single block read times and is effectively the unit of measure of the cost.