Saturday, June 10, 2006
Command Prompt CSharp Compilation
Here is the string for compiling the .cs files c:\bin>csc /t:library fileName.cs.
Sql Server number of tables, procedures etc
Use db1
select count(*) from sysobjects where xtype = 'U' and status > 0
select count(*) from sysobjects where xtype = 'P' and status > 0
Use db2
select count(*) from sysobjects where xtype = 'U' and status > 0
select count(*) from sysobjects where xtype = 'P' and status > 0
Here xtype can also be
Object type. Can be one of these object types:
C = CHECK constraint
D = Default or DEFAULT constraint
F = FOREIGN KEY constraint
L = Log
FN = Scalar function
IF = Inlined table-function
P = Stored procedure
PK = PRIMARY KEY constraint (type is K)
RF = Replication filter stored procedure
S = System table
TF = Table function
TR = Trigger
U = User table
UQ = UNIQUE constraint (type is K)
V = View
X = Extended stored procedure
select count(*) from sysobjects where xtype = 'U' and status > 0
select count(*) from sysobjects where xtype = 'P' and status > 0
Use db2
select count(*) from sysobjects where xtype = 'U' and status > 0
select count(*) from sysobjects where xtype = 'P' and status > 0
Here xtype can also be
Object type. Can be one of these object types:
C = CHECK constraint
D = Default or DEFAULT constraint
F = FOREIGN KEY constraint
L = Log
FN = Scalar function
IF = Inlined table-function
P = Stored procedure
PK = PRIMARY KEY constraint (type is K)
RF = Replication filter stored procedure
S = System table
TF = Table function
TR = Trigger
U = User table
UQ = UNIQUE constraint (type is K)
V = View
X = Extended stored procedure
Sql Server Table Column counts
It has been a long time since i added anything to the tech blog.
Got one very nice UDF here for finding the number of columns in each table.
Was very useful as i had to upgrade a clients db after a long time.
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE FUNCTION dbo.udf_Tbl_ColCountTAB (
@Table_Name_Pattern sysname = NULL -- Pattern for matching
-- to the table name, Null=all
, @Col_Name_Pattern sysname = NULL -- Pattern for matching
-- to the column name, NULL=all
) RETURNS TABLE
-- NO SCHEMABINDING do to use of INFORMATION_SCHEMA
/*
* Returns a count for the number of columns in each table or
* view that satisfies the Table_Name_Pattern
*
* Example:
select * FROM dbo.udf_Tbl_ColCountTAB (null, null)
*
*/
AS RETURN
SELECT TOP 100 PERCENT WITH TIES
c.TABLE_NAME
, COUNT(*) NumColumns
FROM INFORMATION_SCHEMA.[COLUMNS] c
inner join INFORMATION_SCHEMA.[TABLES] t
ON C.TABLE_SCHEMA = t.TABLE_SCHEMA
and c.TABLE_NAME = T.TABLE_NAME
WHERE TABLE_TYPE = 'BASE TABLE'
and 0=OBJECTPROPERTY(OBJECT_ID(t.TABLE_NAME),
'IsMSShipped')
and (@Table_name_pattern IS NULL
or c.TABLE_NAME LIKE @Table_Name_Pattern)
and (@Col_Name_Pattern IS NULL
or c.COLUMN_NAME LIKE @Col_Name_Pattern)
GROUP BY c.TABLE_NAME
ORDER BY c.TABLE_NAME
GO
GRANT SELECT ON dbo.udf_Tbl_ColCountTAB to PUBLIC
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
Got one very nice UDF here for finding the number of columns in each table.
Was very useful as i had to upgrade a clients db after a long time.
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE FUNCTION dbo.udf_Tbl_ColCountTAB (
@Table_Name_Pattern sysname = NULL -- Pattern for matching
-- to the table name, Null=all
, @Col_Name_Pattern sysname = NULL -- Pattern for matching
-- to the column name, NULL=all
) RETURNS TABLE
-- NO SCHEMABINDING do to use of INFORMATION_SCHEMA
/*
* Returns a count for the number of columns in each table or
* view that satisfies the Table_Name_Pattern
*
* Example:
select * FROM dbo.udf_Tbl_ColCountTAB (null, null)
*
*/
AS RETURN
SELECT TOP 100 PERCENT WITH TIES
c.TABLE_NAME
, COUNT(*) NumColumns
FROM INFORMATION_SCHEMA.[COLUMNS] c
inner join INFORMATION_SCHEMA.[TABLES] t
ON C.TABLE_SCHEMA = t.TABLE_SCHEMA
and c.TABLE_NAME = T.TABLE_NAME
WHERE TABLE_TYPE = 'BASE TABLE'
and 0=OBJECTPROPERTY(OBJECT_ID(t.TABLE_NAME),
'IsMSShipped')
and (@Table_name_pattern IS NULL
or c.TABLE_NAME LIKE @Table_Name_Pattern)
and (@Col_Name_Pattern IS NULL
or c.COLUMN_NAME LIKE @Col_Name_Pattern)
GROUP BY c.TABLE_NAME
ORDER BY c.TABLE_NAME
GO
GRANT SELECT ON dbo.udf_Tbl_ColCountTAB to PUBLIC
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
Wednesday, June 07, 2006
பிரசாந்த்
பிரசாந்த்
Wow that is actually my name in Tamil. It is cool that it is being shown since it is in Unicode
http://home.att.net/~jameskass/keybtaml.htm
Used this link to paste it
Wow that is actually my name in Tamil. It is cool that it is being shown since it is in Unicode
http://home.att.net/~jameskass/keybtaml.htm
Used this link to paste it
Saturday, April 01, 2006
Tracking who read your mail
Well i had a very interesting code which i had to look on friday. So what is so interesting about this code, the answer is it magically tracks who read your mail.
No i am not talking about the outlook read receipt, that shows an annoying alert to the receiver saying "the person who sent it wants a receipt do you want to send yes/no" - who on earth would like to send this receipt, I always click no :)
So how do we solve the problem, you want to know whetehr the person to whom you sent it actually read it or not. So what do we do.
Let us answer few questions, does the person who receives your email has html viewing capacity, does he have internet access, if so bingo!!!!!!!!!!! our idea will work.
This is what you do,
Inside the email you place a hook, an image it could be a simple image not so fancy one of those 2 kb ones, the html tag can be something like,
img src = www.yourwebsite.com/tracker.gif?param=343343
So that does the trick, now what you do is write a server side code (either php or asp.net or jsp or some SSC) and you put a listener.
As soon as the person opens hte mail, it downloads the images and your site get a hit with the param, so you can identify whether the mail was opened or not.
Isnt that cool!!!!
No i am not talking about the outlook read receipt, that shows an annoying alert to the receiver saying "the person who sent it wants a receipt do you want to send yes/no" - who on earth would like to send this receipt, I always click no :)
So how do we solve the problem, you want to know whetehr the person to whom you sent it actually read it or not. So what do we do.
Let us answer few questions, does the person who receives your email has html viewing capacity, does he have internet access, if so bingo!!!!!!!!!!! our idea will work.
This is what you do,
Inside the email you place a hook, an image it could be a simple image not so fancy one of those 2 kb ones, the html tag can be something like,
img src = www.yourwebsite.com/tracker.gif?param=343343
So that does the trick, now what you do is write a server side code (either php or asp.net or jsp or some SSC) and you put a listener.
As soon as the person opens hte mail, it downloads the images and your site get a hit with the param, so you can identify whether the mail was opened or not.
Isnt that cool!!!!
Sunday, March 26, 2006
No more installation issues
With VmWare providing application appliance model, moving forward there will be no more installation issues, no need to worry about dot net framework Vs IIS installation which comes first, no more issues about vb run time or java runtime.
all we need to do is ship the vmplayer to the client with all the items installed and they will import it.
Wow !!! what a great idea.
We have read about hardware virtualization now this is software virtualization.
Who knows tomorrow we will have human virtualization too !!!!!!!
all we need to do is ship the vmplayer to the client with all the items installed and they will import it.
Wow !!! what a great idea.
We have read about hardware virtualization now this is software virtualization.
Who knows tomorrow we will have human virtualization too !!!!!!!
Tuesday, January 03, 2006
VMWare player
Spoke to kicha (who works for vmware) on new year eve and came to know about the new vmware player.
http://www.vmware.com/news/releases/player.html
Free New Product Enables Users to Securely Browse the Internet with New Browser Appliance Powered by Mozilla Firefox, to Quickly Run Pre-configured Software Environments and to Access Their Personal Computing Environments on Any PC
What is more interesting is to know that a lot of companies like BEA Weblogic are releasing VM images for this player.
Virtualization is great and let me plan to get weblogic image and see how it works.
http://www.vmware.com/news/releases/player.html
Free New Product Enables Users to Securely Browse the Internet with New Browser Appliance Powered by Mozilla Firefox, to Quickly Run Pre-configured Software Environments and to Access Their Personal Computing Environments on Any PC
What is more interesting is to know that a lot of companies like BEA Weblogic are releasing VM images for this player.
Virtualization is great and let me plan to get weblogic image and see how it works.
AVG Antivirus
Are you also fed up of anti virus programs running on your PC.
I recently tried AVG antivirus, it is pretty good and have been using it for a while.
Each time i reboot it goes and gets a new patch update and has been very good.
There is a free home edition available too, you can download it at,
http://www.grisoft.com/doc/289/lng/us/tpl/tpl01
By the way i think i am posting after a long time and it is 2006 now :)
I had a blast this new year eve ;)
I recently tried AVG antivirus, it is pretty good and have been using it for a while.
Each time i reboot it goes and gets a new patch update and has been very good.
There is a free home edition available too, you can download it at,
http://www.grisoft.com/doc/289/lng/us/tpl/tpl01
By the way i think i am posting after a long time and it is 2006 now :)
I had a blast this new year eve ;)
Thursday, December 01, 2005
How to fix Internet explorer 6
I am fed up of the ad and spywares in my IE and now the IE crashes too.
http://www.theeldergeek.com/repair_ie6.htm
This is a very good link which fixes this issue.
http://www.theeldergeek.com/repair_ie6.htm
This is a very good link which fixes this issue.
Wednesday, November 30, 2005
Mac address spoofing
Posting after few days. I was interested to find a tool which would spoof my mac address.
As there was a burning need to do it :)
Found this awesome tool which would do the trick for me.
http://www.gorlani.com/publicprj/macmakeup/macmakeup.asp
With this tool i can enter my own OID and spoof the mac address on any pc i want to.
Wondering how i can write this in my own code :)
As there was a burning need to do it :)
Found this awesome tool which would do the trick for me.
http://www.gorlani.com/publicprj/macmakeup/macmakeup.asp
With this tool i can enter my own OID and spoof the mac address on any pc i want to.
Wondering how i can write this in my own code :)
Subscribe to:
Posts (Atom)
