Maintaining Session State across WebApplications
======================================
stateConnectionString="tcpip=dataserver:42424"
cookieless="false"
timeout="20"/>
MS GAMES CHEATS
===============
Solitaire
==================
You can actually turn only one card at a time in 3 cards over mode. Just hold down Ctrl+Alt+Shift and click and the card! This will turn only one card instead of 3.
Free Cell
==================
Can't win? Hold down Ctrl+Shift+F10. A pop-up menu can let you choose whether you want to win, lose or restart.
Minesweeper
===================
Hold down the Shift key and type XYZZY. Release Shift and then press it again. Now whenever your cursor is over the top of a mine, the top left pixel on your screen shows as a black dot.
This is more towards an undocumented feature than an egg. Open up winmine.ini. At the end of the file, add the line Sound=3. Run the game. If you have your PC speaker on, you will hear something the next time you hit a mine.
MS GAMES CHEATS
===============
Solitaire
==================
You can actually turn only one card at a time in 3 cards over mode. Just hold down Ctrl+Alt+Shift and click and the card! This will turn only one card instead of 3.
Free Cell
==================
Can't win? Hold down Ctrl+Shift+F10. A pop-up menu can let you choose whether you want to win, lose or restart.
Minesweeper
===================
Hold down the Shift key and type XYZZY. Release Shift and then press it again. Now whenever your cursor is over the top of a mine, the top left pixel on your screen shows as a black dot.
This is more towards an undocumented feature than an egg. Open up winmine.ini. At the end of the file, add the line Sound=3. Run the game. If you have your PC speaker on, you will hear something the next time you hit a mine.
Reinitializing an identity column to 0
Reinitializing an identity column is of two folds. If there is no foregin key on the table where we want to reset the identity to 0 then the following process would work.
create table testTable1
(
sno int identity,
lastname varchar(25)
)
insert into testTable1 values('lastname1')
truncate table testTable1 -- This statement alone would do the trick for us :)
If there is a foreign key relationship then we can't use the above statement instead follow the steps explained below:
create table testTable1 -- example table 1
(
sno int identity primary key,
lastname varchar(25)
)
create table testTable2 -- example table 2
(
sno int references testTable1(sno),
email varchar(50)
)
insert into testTable1 values('lastname1')
insert into testTable2 values(1,'vmvadivel@yahoo.com')
delete testTable2 -- remove all the records from the child table first
delete testTable1-- remove all the records from the parent table
After deleting the content in the table(s) you need to give the execute below statement.
dbcc checkident(testTable1,Reseed,0)
There are cases where we want to reinitialize ALL identity columns in a database. In such cases make use of the below script.
Select
'dbcc checkident (' + sysobjects.name + ', Reseed, 0)' as 'Reset Identity for the whole database'
From
sysobjects, syscolumns
Where
sysobjects.id = syscolumns.id and
syscolumns.colstat & 1 <> 0 and
sysobjects.xtype = 'U' and
sysobjects.name <> N'dtproperties'
The result of the above query would be 'n' number of sql statements. Just copy those statements and execute it to reinitialize ALL identity columns in a database.
CREATE proc spt_GetUserTableInfo
@tableName varchar(255)=NULL,
@columnName varchar(255)=NULL
/******************************************************************************
** File:
** Name: spt_GetUserTableInfo
** Desc: Gets all the TABLES and COLUMNS and COLUMN
** Description of a particular DATABASE.
**
**
** Auth: Soumalya
** Date: 4-03-2004
*******************************************************************************/
AS
BEGIN
IF @tableName is NULL AND @columnName is NULL
BEGIN
select sysobjects.name,
syscolumns.name,
systypes.name as datatype,
systypes.length as length,
case syscolumns.isnullable
when 1 THEN 'NULL'
when 0 THEN 'NOT NULL'
END
As nullOrNotnull
from sysobjects inner join syscolumns
on syscolumns.id=sysobjects.id
and sysobjects.type='u'
join
systypes
on syscolumns.xtype = systypes.xtype
END
ELSE IF @columnName is NULL
BEGIN
select sysobjects.name,
syscolumns.name,
systypes.name as datatype,
systypes.length as length,
case syscolumns.isnullable
when 1 THEN 'NULL'
when 0 THEN 'NOT NULL'
END
As nullOrNotnull
from sysobjects inner join syscolumns
on syscolumns.id=sysobjects.id
and sysobjects.type='u'
join
systypes
on syscolumns.xtype = systypes.xtype
where sysobjects.name=@tableName
END
ELSE
BEGIN
select sysobjects.name,
syscolumns.name,
systypes.name as datatype,
systypes.length as length,
case syscolumns.isnullable
when 1 THEN 'NULL'
when 0 THEN 'NOT NULL'
END
As nullOrNotnull
from sysobjects inner join syscolumns
on syscolumns.id=sysobjects.id
and sysobjects.type='u'
join
systypes
on syscolumns.xtype = systypes.xtype
and sysobjects.name = @tableName
END
END
To get a list of all the procedures created or updated recently, simply run this query in SQL Server
SELECT
ROUTINE_NAME, CREATED, LAST_ALTERED
FROM
INFORMATION_SCHEMA.ROUTINES
WHERE
ROUTINE_TYPE = 'PROCEDURE'
ORDER BY LAST_ALTERED DESC