Viewing 15 posts - 91 through 105 (of 117 total)
If it's just looping over all the tables, you can do that with a while loop (but since it's still completely procedural, I classify this as cheating :-):
1. Create a...
August 16, 2005 at 2:42 pm
It could also be built with a derived table, I think -- if you REALLY want it in one query 🙂
August 16, 2005 at 10:13 am
Now THAT is clever. Wow.
I wonder what someone would do who came upon that device in an existing database, without knowing what it did :-). Quite a puzzle!
August 16, 2005 at 10:02 am
August 15, 2005 at 9:57 am
My 2 cents - you save a lot of energy and heartache by simply ignoring the gaps. They do no harm. 🙂
The philosophy I like to follow is like Chris':...
August 15, 2005 at 9:51 am
Have you tried single quotes around the date?
Also, 2 cents: the structure of the stored proc uses a string to compose dynamic SQL, which will work but might not be...
August 15, 2005 at 9:42 am
It's pretty simple to script a restore from backup -- in my firm we do that for training and development copies of our production database. You could write the restore...
August 15, 2005 at 9:28 am
Check out BOL under CREATE PROCEDURE WITH ENCRYPTION
August 10, 2005 at 12:22 pm
I usually use DTS for that type of thing. Can you handle it that way?
August 4, 2005 at 4:22 pm
Does this help?
select tbl.[name] as TableName,
idx.[name] as IndexName,
indexproperty( tbl.[id], idx.[name], 'IsStatistics') as IsStats,
indexproperty( tbl.[id], idx.[name], 'IsAutoStatistics') as IsAutoStats,
indexproperty( tbl.[id], idx.[name], 'IsHypothetical') as IsHypothetical,
indexproperty( tbl.[id], idx.[name], 'IsClustered') as IsClustered,
index_col( tbl.[name], idx.indid,...
August 2, 2005 at 11:40 am
I don't think it's possible to "stretch" stored procs to do what you are attempting. If it were me, I'd head toward just troubleshooting the script instead ... then run...
July 29, 2005 at 12:33 pm
AFAIK, you can't issue Create Trigger inside a stored proc. BOL: "CREATE TRIGGER must be the first statement in the batch and can apply to only one table."
Can I ask...
July 29, 2005 at 11:18 am
Great article! Very informative. Thanks so much for taking the time to write this up. As I am about to move a database myself, it's quite timely.
One minor, even picky...
July 29, 2005 at 9:27 am
Would some flavor of this work?
SELECT top 1 count( column ) , column
from table
where [your conditions]
order by count( column ) desc
July 27, 2005 at 2:55 pm
I also like Idera Diagnostic Manager -- we just completed a comparison test of monitoring tools, using demo licenses, and it was the clear winner for what we needed to...
July 27, 2005 at 2:17 pm
Viewing 15 posts - 91 through 105 (of 117 total)