Viewing 15 posts - 31 through 45 (of 166 total)
Another option is to use stored procedures (instead of functions i described in the original reply) with an OUTPUT parameter. When you execute those sps, the output parameters will...
November 26, 2008 at 8:16 am
Will below work?
a. Wrap each sp [sp1 and sp2] within a function [f1 and f2]. Each function will just execute sp [f1 will execute sp1 and f2 will execute...
November 25, 2008 at 3:10 pm
Any table can only have ONE clustered index.
November 25, 2008 at 12:12 pm
What is the question here?
November 25, 2008 at 12:10 pm
Assuming you know how to send emails from your server:
1. Create a stored procedure which sends an email alert when you execute it
2. Create a job, which executes this stored...
November 25, 2008 at 10:30 am
If you don't have backup of the db and want to find out what would be its size if you backup, I believe you can run the following query to...
November 25, 2008 at 10:19 am
Will this do (changing DB name to your own, and setting this sp as a job)?
CREATE PROCEDURE Monitor_Backups_And_Alert(@Allowed_Threshold INT)
AS
BEGIN
DECLARE @Hours_since_last_backup INT
SELECT @Hours_since_last_backup = ISNULL(STR(ABS(DATEDIFF(hour, GetDate(),MAX(Backup_Finish_Date)))), 'NEVER')
FROM master.dbo.sysdatabases B...
November 25, 2008 at 10:02 am
I only work with SQL Server 2000, and have never heard of it.
A simple google search seems to suggest that this concept only exists in SQL Server 2005...
November 25, 2008 at 9:36 am
Will this do?
select ITEM, CASE WHEN COUNT(ITEM) > 1 THEN 'N' ELSE 'Y' END
from #item
GROUP BY ITEM
November 25, 2008 at 9:28 am
Would the agent always be started after it is stopped or not necessarily?
There is a way to record when it starts, but skeptical that there is a way to record...
October 3, 2008 at 9:50 am
Guys,
I decided to simplify my problem a bit, and just find out if a given user is a sysadmin.
This was achieved using the following script:
SELECT 'Username' = lgn.name
FROM master.dbo.spt_values spv,...
October 3, 2008 at 9:09 am
Wildcat,
I just tried this query and it returned nothing.
I'm also curious about something else: Since administrators have privileges to everything, should all admin users be returned in this query?
Thank you!
October 2, 2008 at 2:46 pm
Viewing 15 posts - 31 through 45 (of 166 total)