Showing posts with label books. Show all posts
Showing posts with label books. Show all posts

Saturday, February 25, 2012

Capturing WARNINGS to write to error log?

Hey y'all...

Anyone know how to capture SQL Warnings so I can write them to an error log? I can't seem to find any info on it in Books Online...

I can capture the errors just fine by using @.@.ERROR after a select, but what about warnings such as "Warning: Null value is eliminated by an aggregate or other SET operation."

Thanks!IF (EXISTS (SELECT name FROM msdb.dbo.sysalerts WHERE name = 'NULL_VALUE'))
EXECUTE msdb.dbo.sp_delete_alert @.name = N'NULL_VALUE'
EXECUTE msdb.dbo.sp_add_alert @.name = N'NULL_VALUE', @.message_id = 8153, @.severity = 0, @.enabled = 1, @.delay_between_responses = 60, @.include_event_description_in = 4, @.category_name = N'[Uncategorized]'|||Warnings get returned as messages in the TDS stream, much like PRINT statements do. I don't think that they generate an internal event or change any spid state information, so I don't think that there is any way for a script/stored procedure to capture them.

I'm pretty sure that you can modify the client to capture warning messages and the text (after substitution) of error messages, but I can't think of any way to capture it on the server side.

-PatP|||Pat, do me a favor and replicate on your TEST system the following screens. I saved the actual error message screens, but before posting this also experimented with warnings that you called "like PRINT statements." So that there won't be any further confusion, anything that is stored in sysmessages can be logged to the errorlog of both SQL Server and Windows Application log, as long as the check box in screen #3 is checked.|||Will do, but it will be a couple of days before I have the opportunity. I'm traveling now, and when I get back to the orifice I'll be working on other issues for a couple of days. It will probably be 2004-07-29 before I really have a chance to try it.

-PatP

Friday, February 10, 2012

Can't uninstall books Online CTP Preview

It shows in Add/Remove Programs. I had ASP.NET 2.0 installed and Add/Remove Programs tells me I need 2.0 before I can Install Books Online. But I'm trying to Uninstall Books Online. I uninstalled 2.0 with no effect. I reinstalled 2.0 with no effect. I searched Program Files and the Register and can't find Book Online. It won't go away. How to get rid of it? Thank you.

There is no Books Online dependency on ASP.NET. However, the CTP versions of SQL Server (including Books Online) do have a dependency on a specific version of .NET Framework 2.0. That is, the version of .NET Frameworks 2.0 required for the June CTP is different than the version of .NET Framework 2.0 required for the September CTP. The specific version of .NET Framework 2.0 must be installed and available when you uninstall SQL Server or Books Online. This is an unfortunate side effect of one beta application having a dependency on another beta application.
Please try these steps to get your CTP version of Books Online uninstalled.
1. Uninstall the version of .NET Frameworks you have installed now.
2 Install the .NET Frameworks 2.0 version that is appropriate for the CTP version of Books Online you have installed by using one of the following links.

For the September CTP, select the download link to the version of .NET Frameworks available from this site : http://www.microsoft.com/downloads/details.aspx?familyid=ADC75E35-7245-4038-9B8A-B8FABAEC16DA&displaylang=en

For the June CTP, select the download link to the version of .NET Frameworks available from this site: http://www.microsoft.com/downloads/details.aspx?FamilyID=f0d182c1-c3aa-4cac-b45c-bd15d9b072b7&DisplayLang=en

If you're not sure which CTP version of Books Online you have, right-click in any BOL topic and select View Source. Search for the words "Topic built:". The date after that phrase will either be a September or June date.

3. From Add/Remove Programs uninstall Books Online.
4. From Add/Remove Programs uninstall .NET Frameworks 2.0 installed in step 2.

Regards,

|||Thanks for taking the time to respond. After going to bed at 4 AM, again, and awakening from a nightmare I resolved to cut my losses, reformat the hard drive and start fresh. The first thing I installed, after Windows and all my drivers, was dot Net 2.0 and the SQL 2005 Server 180 day Evaluation program. Seems to be working fine.

I would recommend this to anyone if their situation permits. Now I have a clean machine, which provides a comfortable feeling. It will take many more hours to reinstall and reconfigure all my programs, but that dwarfs [[edit - oops, is dwarfed by ]] the time already wasted. I'm not blaming Microsoft, and I understand that this was Beta software. This 919 Meg download takes an hour and a half, but it includes the 2005 version of Visual Studio, which is a beautiful program. Many thanks to Microsoft for their fine work. Looking forward to the upcoming 2005 road show in Olando.|||

Hi Steve,
I'm glad you were able to resolve the problem. I know starting from scratch can be time consuming, but as you pointed out, when going from beta software to production code, it's definitely worth starting with a clean machine (even on a test machine).

If possible, you might consider using something like Virtual PC for testing future beta applications.

Regards,
Gail

|||Your instructions were much more precise than the "read me" file. Could the read me be improved?

The trouble is too many variables. Incomplete instructions require guessing, blind allies, recovery, trying something else, etc. The advantage of a read me file is that it can be updated.

I spent probably 24 nonproductive hours with this and a similar Beta problem a couple weeks ago. Productive time, learning something new, is fine. Time going around in circles due to arbitrary idiosyncracies is different. For example, I don't mind the 8 hours I spent the other day debugging a javascript. Specific Beta version dependencies is arbitrary information.

Thanks again.|||I'll check into getting the readme modified.

Thanks,|||

Gaile,

I had the exact issue. Your help above sold my issue perfectly. All I did was install only the .NET Framework I needed and my BOL uninstalled just fine.

Thanks,

Scott