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 =
NO"
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 ...
http://www.microsoft.com/downloads/details.aspx?FamilyID=890cd06b-abf8-4c25-
91b2-f8d975cf8c07&displaylang=en
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
/// <summary>
/// Simple tool to find out which process have loaded a particular module.
/// </summary>
public class LMod
{
// "System Idle Process" pid
static int IdleProcessID = 0;
// "System" pid
static int SystemProcessID
{
get
{
//Is older than XP...
if (Environment.OSVersion.Version.Major < 5 ||
(Environment.OSVersion.Version.Major == 5 &&
Environment.OSVersion.Version.Minor == 0))
return 8;
else
return 4;
}
}
public static int Main(string[] args)
{
int total = 0;
string m_ModuleName = "";
if (args.Length == 1)
m_ModuleName = args[0];
else
{
// wrong number of parameters...
Console.WriteLine("Usage: LMod module_name");
return 1;
}
// Get all running processes on the machine...
Process[] m_arrSysProcesses = Process.GetProcesses();
for (int i = 0; i < m_arrSysProcesses.Length; i++)
{
try
{
ProcessModuleCollection modules =
m_arrSysProcesses[i].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("-------------------");
Console.WriteLine("Process Name: "
+ m_arrSysProcesses[i].ProcessName);
Console.WriteLine("Process ID : "
+ m_arrSysProcesses[i].Id);
Console.WriteLine("Priority : "
+ m_arrSysProcesses[i].BasePriority);
Console.WriteLine("Memory Usage: "
+ (m_arrSysProcesses[i].WorkingSet64 /
1024) + " Kb");
Console.WriteLine();
total++;
break;
}
}
}
}
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].ProcessName
+ " (" + m_arrSysProcesses[i].Id + ") failed!");
Console.WriteLine(e);
return 2;
}
}
}
Console.WriteLine();
Console.WriteLine("There are " + total
+ " processes using module " + m_ModuleName);
return 100;
}
}
Saturday, November 12, 2005
(Singularity) New MS OS other than Windows
http://research.microsoft.com/os/singularity/
This is just a little brief about the new OS :
Singularity is a new operating system being developed as a basis for more
dependable
system and application software [28]. Singularity exploits advances in
programming languages
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
Processes
(SIPs), which encapsulate pieces of an application or a system and provide
information hiding,
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
dependable software.
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
processes cannot
simultaneously access an object. Communications between processes transfers
exclusive
ownership of data.
- SIPs are closed code spaces. A process cannot dynamically load or generate
code.
- 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,
higher-order
channels. A channel specifies its communications protocol as well as the
values
transferred, and both aspects are verified.
- SIPs are inexpensive to create and communication between SIPs incurs low
overhead.
Low cost makes it practical to use SIPs as a fine-grain isolation and
extension
mechanism.
- 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
layouts, run-time
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
one error
recovery model, one communication mechanism, one security policy, and one
programming
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
system
There are a lot more in the report on the research site