select count(*) NoOfColumns from SYSCOLUMNS
WHERE id= (Select id from SYSOBJECTS where name = 'emp')
Tuesday, August 17, 2010
What is live lock and deadlock? what is Lock escalation?
In SQL Server Live Lock occurs when read transactions are
applied on table which prevents write transaction to wait
indefinitely and Deadlocking occurs when two user processes
have locks on separate objects and each process is trying to
acquire a lock on the object that the other process has.
Lock escalation is the process of converting a lot of low
level locks (like row locks, page locks) into higher level
locks (like table locks).
applied on table which prevents write transaction to wait
indefinitely and Deadlocking occurs when two user processes
have locks on separate objects and each process is trying to
acquire a lock on the object that the other process has.
Lock escalation is the process of converting a lot of low
level locks (like row locks, page locks) into higher level
locks (like table locks).
What is OPENXML in SQL Server?
OPENXML can parse the xml data in SQL server very efficiently in SQL Server. OpenXML primarily gives the ability to insert XML data to the relational database, however we can query the data too using OpenXML. We need to specify the path of the xml element using xpath.
Labels:
What is OPENXML in SQL Server?
Monday, August 16, 2010
What is SQL Profiler what is the use of it?
SQl Profiler is a tool provided by SQL Server, which can
capture the queries, procedures executed on the database.
It also capture all the details like user, m/c, input
parameters, time of execution etc. This is very helpful
while bebugging any query / procedure
capture the queries, procedures executed on the database.
It also capture all the details like user, m/c, input
parameters, time of execution etc. This is very helpful
while bebugging any query / procedure
here id col have primary key and identity id name 1 a 2 b 3 c 4 d delete 2nd row then o/p will be id name 1 a 3 c 4 d next inssert 2nd row and i want o/p will be id name 1 a 2 e 3 c 4 d
set identity_insert order1 on
insert into order1(id,name) values(2,'insertedat2')
insert into order1(id,name) values(2,'insertedat2')
Monday, August 9, 2010
Session Expire and Redirect to Login Page
The basic idea for this is to have your authentication cookie + session expire at the same time. The automatic behaviour of asp.net would be to take you back to the defined login page. The "slidingExpiration" attribute on the auth cookie would need to be 'true' to keep extending it's life while the session is active.
system.web>
sessionstate mode="InProc" cookieless="false" timeout="20" />
authentication mode="Forms">
forms name=".SAMPLESITEAUTH" loginUrl="~/Login.aspx" protection="All" timeout="20" slidingExpiration="true" path="/" cookieless="UseCookies">
/authentication>
/system.web>
The slidingExpiration on your cookie doesn't work the way you hope. ASP.NET won't refresh the expiry on the cookie with every request; rather it does that only once every half-the-value-of-timeout minutes. I.e. if you set timeout="20", it only refreshes the cookie every ten minutes.
system.web>
sessionstate mode="InProc" cookieless="false" timeout="20" />
authentication mode="Forms">
forms name=".SAMPLESITEAUTH" loginUrl="~/Login.aspx" protection="All" timeout="20" slidingExpiration="true" path="/" cookieless="UseCookies">
/authentication>
/system.web>
The slidingExpiration on your cookie doesn't work the way you hope. ASP.NET won't refresh the expiry on the cookie with every request; rather it does that only once every half-the-value-of-timeout minutes. I.e. if you set timeout="20", it only refreshes the cookie every ten minutes.
Subscribe to:
Posts (Atom)