In case you are not aware, you now get 10GB with the free edition of SQL Server 2008 Express edition!.
Greate news, check out at their official website SQL Server Express 2008
So I am a developer. Or should I say a web developer. I write code for a living. I love coding. I also love talking about it. Indeed we do find ourselves having to learn new technologies is a short spell of time. On this blog, I will try keep abreast with technological challenges. Join me in learning and sharing with the community our journey in coding.
Wednesday, July 14, 2010
C# extension method similar to Sql's IN operator
Consider the code snippet below
if(a == x || a == y || a == z)We can re-write this expression as:
- Using array's contains
- Using a similar syntax for the SQL's IN operator by using extension
return collection.Contains(obj);
}
And invoke as
if(a.IsIn(b, c, d)) { ... }
Read more at Stackoverflow
Wednesday, July 07, 2010
Find the Port a Connection is Using in Sql Server
SELECT c.session_id, c.local_tcp_port, s.login_name, s.host_name, s.program_name
FROM sys.dm_exec_connections AS c INNER JOIN
sys.dm_exec_sessions AS s on c.session_id = s.session_id
WHERE c.local_tcp_port <> 1433
I found this very useful when monitoring external access to your Sql Server instance.
The original post was here at SqlServerCentral
FROM sys.dm_exec_connections AS c INNER JOIN
sys.dm_exec_sessions AS s on c.session_id = s.session_id
WHERE c.local_tcp_port <> 1433
I found this very useful when monitoring external access to your Sql Server instance.
The original post was here at SqlServerCentral
Subscribe to:
Posts (Atom)