Friday, November 25, 2005
Dynamic ports and muli-port/IP listener in SQL 2005
In the configuration manager , you can configure SQL 2005 to listen on
multiple Ips , and even more you can make it listen to multiple ports on the
same IP (1440,1450,1460) , but in this case you have to make "listen ALL =
Moreovere you can configure the server to have dynamic port , so when the
service is strating , it asks the OS for an available port, opens an
endpoint for that port.
SQL Server Browser monitors the ports, and direct incoming connections to
the right port for specific instance.
So what happens if SQLBrowser is off ? Of course clients must provide the
right IP and port otherwise they cannot connect.
So sql browser acts as a resolution for instance name to their ports .
The client send a UDP msg to port 1434 with the name of the instance , the
sql browser replies with the port.
The war of SQL vs. Xquery
The world is your database with Log Parser.
I can think of this as a point towards the relational world against the
hierarchical world ...
Log parser is a powerful, versatile tool that provides universal query
access to text-based data such as log files, XML files and CSV files, as
well as key data sources on the WindowsR operating system such as the Event
Log, the Registry, the file system, and Active DirectoryR. You tell Log
Parser what information you need and how you want it processed. The results
of your query can be custom-formatted in text based output, or they can be
persisted to more specialty targets like SQL, SYSLOG, or a chart.
Most software is designed to accomplish a limited number of specific tasks.
Log Parser is different... the number of ways it can be used is limited only
by the needs and imagination of the user.
Saturday, November 19, 2005
Cannot delete fileX :Access is Denied
How many times did you get this message ?
"Cannot delete fileX :Access is Denied
Make Sure the Disk is not full or write-protected
And the file is not currently in use"
I think a lot ha ?
At last I got a solution from the BCL Team
you can use it to enumerate the processes that are using the blocked module
For example : LMOD.exe file1.dll
Then you get a list of running process who are using file1.dll module
/// Simple tool to find out which process have loaded a particular module.
public class LMod
// "System Idle Process" pid
static int IdleProcessID = 0;
// "System" pid
static int SystemProcessID
//Is older than XP...
if (Environment.OSVersion.Version.Major < 5 ||
(Environment.OSVersion.Version.Major == 5 &&
Environment.OSVersion.Version.Minor == 0))
public static int Main(string args)
int total = 0;
string m_ModuleName = "";
if (args.Length == 1)
m_ModuleName = args;
// wrong number of parameters...
Console.WriteLine("Usage: LMod module_name");
// Get all running processes on the machine...
Process m_arrSysProcesses = Process.GetProcesses();
for (int i = 0; i < m_arrSysProcesses.Length; i++)
ProcessModuleCollection modules =
int nCount = modules.Count;
if (nCount > 0)
for (int j = 0; j < nCount; j++)
// Is it the module we are looking for?
if (modules[j].ModuleName == m_ModuleName)
Console.WriteLine("Process Name: "
Console.WriteLine("Process ID : "
Console.WriteLine("Priority : "
Console.WriteLine("Memory Usage: "
+ (m_arrSysProcesses[i].WorkingSet64 /
1024) + " Kb");
catch (Exception e)
// System Idle Process (Idle): represents pseudo-process
// that represents all the processor time not used by
// other processes.
// System (System): represents the processor time
// used by the kernel itself.
if (m_arrSysProcesses[i].Id != SystemProcessID
&& m_arrSysProcesses[i].Id != IdleProcessID)
Console.WriteLine("Error: Process "
+ " (" + m_arrSysProcesses[i].Id + ") failed!");
Console.WriteLine("There are " + total
+ " processes using module " + m_ModuleName);
Saturday, November 12, 2005
(Singularity) New MS OS other than Windows
This is just a little brief about the new OS :
Singularity is a new operating system being developed as a basis for more
system and application software . Singularity exploits advances in
and tools to create an environment in which software is more likely to be
built correctly, program
behavior is easier to verify, and run-time failures can be contained.
A key aspect of Singularity is an extension model based on Software-Isolated
(SIPs), which encapsulate pieces of an application or a system and provide
failure isolation, and strong interfaces. SIPs are used throughout the
operating system and
application software. We believe that building a system on this abstraction
will lead to more
SIPs are the OS processes on Singularity. All code outside the kernel
executes in a SIP. SIPs
differ from conventional operating system processes in a number of ways:
- SIPs are closed object spaces, not address spaces. Two Singularity
simultaneously access an object. Communications between processes transfers
ownership of data.
- SIPs are closed code spaces. A process cannot dynamically load or generate
- SIPs do not rely on memory management hardware for isolation. Multiple
SIPs can reside
in a physical or virtual address space.
- Communications between SIPs is through bidirectional, strongly typed,
channels. A channel specifies its communications protocol as well as the
transferred, and both aspects are verified.
- SIPs are inexpensive to create and communication between SIPs incurs low
Low cost makes it practical to use SIPs as a fine-grain isolation and
- SIPs are created and terminated by the operating system, so that on
termination, a SIP's
resources can be efficiently reclaimed.
- SIPs executed independently, even to the extent of having different data
systems, and garbage collectors.
SIPs are not just used to encapsulate application extensions. Singularity
uses a single
mechanism for both protection and extensibility, instead of the conventional
dual mechanisms of
processes and dynamic code loading. As a consequence, Singularity needs only
recovery model, one communication mechanism, one security policy, and one
model, rather than the layers of partially redundant mechanisms and policies
in current systems.
A key experiment in Singularity is to construct an entire operating system
using SIPs and
demonstrate that the resulting system is more dependable than a conventional
There are a lot more in the report on the research site