September 13, 2012 at 9:51 pm
Comments posted to this topic are about the item DBA Basics
Best,
Naseer Ahmad
SQL Server DBA
September 13, 2012 at 9:55 pm
An easy one for Friday!
I love using Rollback [after specified time].....to warn developers to log-off from the database otherwise they will automatically be logged-off after specified time
Thanks for posting the question.
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
September 13, 2012 at 10:50 pm
Lokesh Vij (9/13/2012)
An easy one for Friday!I love using Rollback [after specified time].....to warn developers to log-off from the database otherwise they will automatically be logged-off after specified time
Thanks for posting the question.
warning , ah , such a polite world we are living.
Nice question !!
~ demonfox
___________________________________________________________________
Wondering what I would do next , when I am done with this one :ermm:
September 14, 2012 at 1:07 am
Awesome, Great question.
Considering there is one transaction which is still not committed ,If executed the below command then
-- #1
ALTER DATABASE LOCALWORK SET OFFLINE WITH NO_WAIT
-- RESULT
Msg 5070, Level 16, State 2, Line 1
Database state cannot be changed while other users are using the database 'LocalWork'
Msg 5069, Level 16, State 1, Line 1
ALTER DATABASE statement failed.
-- #2
ALTER DATABASE LOCALWORK SET OFFLINE WITH ROLLBACK IMMEDIATE
-- RESULT
Nonqualified transactions are being rolled back. Estimated rollback completion: 100%.
-- #3
ALTER DATABASE LOCALWORK SET OFFLINE
-- OR
Going to the menu and tasks and then selecting "Take Offline" (right-click on the specific database)
-- RESULT
Msg 5061, Level 16, State 1, Line 1
ALTER DATABASE failed because a lock could not be placed on database 'LOCALWORK'. Try again later.
Msg 5069, Level 16, State 1, Line 1
ALTER DATABASE statement failed.
ww; Raghu
--
The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.
September 14, 2012 at 1:50 am
demonfox (9/13/2012)
Lokesh Vij (9/13/2012)
An easy one for Friday!I love using Rollback [after specified time].....to warn developers to log-off from the database otherwise they will automatically be logged-off after specified time
Thanks for posting the question.
warning , ah , such a polite world we are living.
Nice question !!
... and I am glad that you are also part of it.
ww; Raghu
--
The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.
September 14, 2012 at 2:51 am
Stewart "Arturius" Campbell (9/14/2012)
Nice simple question to end the week.
+1
Thanks
-------------------------------Posting Data Etiquette - Jeff Moden [/url]Smart way to ask a question
There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
I would never join a club that would allow me as a member - Groucho Marx
September 14, 2012 at 3:59 am
Thanks.
September 14, 2012 at 5:42 am
Raghavendra Mudugal (9/14/2012)
demonfox (9/13/2012)
Lokesh Vij (9/13/2012)
An easy one for Friday!I love using Rollback [after specified time].....to warn developers to log-off from the database otherwise they will automatically be logged-off after specified time
Thanks for posting the question.
warning , ah , such a polite world we are living.
Nice question !!
... and I am glad that you are also part of it.
...and Raghavendra you toooo:-P :hehe:
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
September 14, 2012 at 6:42 am
Good question... something many people tend to learn only after running into this for the first time.
September 14, 2012 at 8:55 am
Nice question but I enjoy using the KILL command to get rid of connections. Perhaps I should join the polite world.
September 14, 2012 at 1:34 pm
+1 I usually use the kill command. I will keep this option in mind though.
September 14, 2012 at 2:42 pm
Thanks
September 14, 2012 at 10:54 pm
Thanks for the question.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
September 15, 2012 at 6:34 am
Nice question.
But using rollback immediate may annoy someone :hehe:. I guess it's OK if you are fireproof :cool:.
Tom
Viewing 15 posts - 1 through 15 (of 18 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy