May 19, 2009 at 11:42 pm
Comments posted to this topic are about the item Creating a recycle bin for SQL Server 2005\2008
May 20, 2009 at 3:01 am
Yea great idea, and very nice post here Chris!
This one is enable in Oracle from 10g version if I'm not wrong!
Anyway, thanks for the script and explanation!
😎
May 20, 2009 at 4:06 am
Good post! Interesting concept!
May 20, 2009 at 4:22 am
Chris,
This is the reason I subscribe to the forums. One becomes a "panner for gold" or a "hunter of diamonds". And, this is a find that I think I will have to frame somewhere amongst my piles of debris left over from my adventures surfing the net.
I must send you a million thanks. This article and associated code have introduced a much needed breath of fresh air in my cubicle.
Thanks,
Duncan
May 20, 2009 at 4:45 am
very good post....this is the thing i was really expected when i was beginner in sql 2005..........anyway a good idea and i appreciate to share this valuable information to everyone.............................:-)
May 20, 2009 at 5:12 am
Interesting, but what if someone renames a procedure, object or view ?
May 20, 2009 at 7:49 am
Nice article, Chris!
Now we have an un-drop. Last things we need are un-delete and un-update. 😀
(I know about auditing tables ;-))
May 20, 2009 at 8:11 am
What a great idea. Thank you for the tip. I did have one question. Are there any additional considerations for items that are schema bound or have foreign keys associated to them?
May 20, 2009 at 8:18 am
Duncan Ray could not have said it better.... "gold", "diamonds", "debris", " breath of fresh air".
Thanks a million.
-Mike
May 20, 2009 at 8:23 am
Interesting article and great concept. I've always relied on backups if an object gets dropped accidentally but this would be an interesting concept. I'm wondering why you didn't do it as database instead of schemas? A little more work, but I think it would work also.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
May 20, 2009 at 8:30 am
doveb (5/20/2009)
What a great idea. Thank you for the tip. I did have one question. Are there any additional considerations for items that are schema bound or have foreign keys associated to them?
You can't drop the parent table in a foreign key relationship, but you can drop the child.
You can't drop a table that has a schema-bound view associated with it.
Here's some tests:
CREATE TABLE parent
(
Id INT PRIMARY Key
)
GO
CREATE TABLE child
(
id INT,
parent_id INT REFERENCES parent(id)
)
GO
-- will not work because it is the parent table
DROP TABLE parent;
GO
-- you can drop the child table
DROP TABLE child;
GO
CREATE TABLE child
(
id INT,
parent_id INT REFERENCES parent(id)
)
GO
CREATE VIEW vw_child
WITH SCHEMABINDING
AS
SELECT id, parent_id FROM dbo.child
GO
-- can't drop the table if there is schema bound view
DROP TABLE child;
Go
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
May 20, 2009 at 8:59 am
Fantastic idea, thanks.
May 20, 2009 at 9:34 am
"Excellent Script By Chris Kinley".
A Special Thanks goes to Steve & SQL Guru like {Gail, Jeff & others} for posting this kind of article in the forum which specify the future technologies of SQL Server.
Cheers!
Sandy.
--
May 20, 2009 at 10:32 am
Superb idea
May 20, 2009 at 12:47 pm
Very handy! Good job, here.
Thanks for sharing
Lee
Viewing 15 posts - 1 through 15 (of 30 total)
You must be logged in to reply to this topic. Login to reply