Thursday, February 28, 2013

[SQL Server] Current date data problem in SSRS

[SQL Server] Current date data problem in SSRS


Current date data problem in SSRS

Posted: 28 Feb 2013 06:52 AM PST

Hi all,Trying to get data by month for current month and previous month in ssrs but couldn't able to get it. I was using this statement in procedure:IF @CurrentDate IS NULL BEGIN SET @CurrentDate = DATEADD(MM, -1, GETDATE())ENDThis gives me records up to Jan and not for Feb month. I want also Feb month in there. How should I write this. Hope this makes sense.Thanks

Removing a secondary tempdb file

Posted: 27 Feb 2013 08:55 PM PST

Hello.I created a secondary tempdb file on our testing server the other day and i wish now to remove it.I have runUse tempdbalter database tempdbremove file tempdev2and i got an error sayingThe file "D:\tempdb\tempdb2.ndf" has been modified in the system catalog. The new path will be used the next time the database is started. Msg 5042, Level 16, State 1, Line 1 The file 'tempdb2′ cannot be removed because it is not empty.When i restared the instance - sure enough the file was still there.Do i need to run some kind of shrink operation first ?Any help would be great - thanks very muchSteven

DBMail service stopped - Job notification sent

Posted: 28 Feb 2013 04:45 AM PST

DBMail was installed on a 2008 SQL Server platform. Profile, alerts and job monitoring were setup. Due to other environment problems - all alerts and job monitoring were disabled. We had other issues which would have sent 50-100 emails a day (I had a few hours of that).Once these issues were resolved, alerts and job monitoring were re-enabled - then bounced the SQL Server agent. Sending a test DB mail failed (Error: 14641 - Database Mail is stopped). Running sysmail_help_status_sp showed the DBMail was stopped.While researching (I decided not to run sysmail_start_sp initially), I noticed 2 job notification emails sent well after bouncing the SQL agent (two days later). Running sysmail_help_status_sp yielded the same - dbmail was still stopped.My question - how is it that DBMail service appears stopped yet DBMails are generated? Comments / URLs are appreciated.Thank you.

No comments:

Post a Comment

Search This Blog