Showing posts with label receiving. Show all posts
Showing posts with label receiving. Show all posts

Monday, February 13, 2012

Apparent Security violations recorded in Event Viewer

I am receiving the following event in the event viewer. I
believe that it is from hackers trying to execute Sql
Statements against my Sql Server to gain access to my
website. I only have port 80 open via my firewall, so I'm
confused as to how they are getting in. Does anyone have
any suggestions?
Any help, ideas, suggestions would be greatly appreciated.
Pat Rogers
Event Type: Information
Event Source: ODBC Error (388221)
Event Category: None
Event ID: 0
Date: 7/21/2004
Time: 8:44:23 AM
User: N/A
Computer: P6-CR2-SVR
Description:
The description for Event ID ( 0 ) in Source ( ODBC Error
(388221) )
cannot be found. The local computer may not have the
necessary registry
information or message DLL files to display messages from
a remote
computer. The following information is part of the event:
Message Text:
=============
SQL Selected Record is invalid: - 00000.Pat,
I would at least make sure that you record all failed access attempts. This
can be done by properties - Security tab - Audit level and check Failure.
This way you can see who is trying to get access.
Chris Wood
Alberta Department of Energy
CANADA
"Pat Rogers" <progers@.kc.rr.com> wrote in message
news:2ea301c470e0$6a535d50$a401280a@.phx.gbl...
> I am receiving the following event in the event viewer. I
> believe that it is from hackers trying to execute Sql
> Statements against my Sql Server to gain access to my
> website. I only have port 80 open via my firewall, so I'm
> confused as to how they are getting in. Does anyone have
> any suggestions?
> Any help, ideas, suggestions would be greatly appreciated.
> Pat Rogers
> Event Type: Information
> Event Source: ODBC Error (388221)
> Event Category: None
> Event ID: 0
> Date: 7/21/2004
> Time: 8:44:23 AM
> User: N/A
> Computer: P6-CR2-SVR
> Description:
> The description for Event ID ( 0 ) in Source ( ODBC Error
> (388221) )
> cannot be found. The local computer may not have the
> necessary registry
> information or message DLL files to display messages from
> a remote
> computer. The following information is part of the event:
> Message Text:
> =============
> SQL Selected Record is invalid: - 00000.
>
>

App receiving "Options" message from Service Broker

I have an app receiving messages from SQL Service Broker when data is updated. (Messages are located at http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlnotificationinfo.aspx )

When I run this app against a remote SQL Server, I receive the message "Updated" which I expect.

But when I run the same app against the local machine SQL Server, I receive the message "Options".

Does anyone know if there are SQL Server options that must be set to certain values?
I can't seem to find anything that troubleshoots this message... either from a SQLServer- or a .NET standpoint.

JFoushee wrote:

Does anyone know if there are SQL Server options that must be set to certain values?
I can't seem to find anything that troubleshoots this message... either from a SQLServer- or a .NET standpoint.

From http://msdn2.microsoft.com/en-us/library/ms181122.aspx:

SET Option Settings

When a SELECT statement is executed under a notification request, the connection that submits the request must have the options for the connection set as follows:

ANSI_NULLS ON

ANSI_PADDING ON

ANSI_WARNINGS ON

CONCAT_NULL_YIELDS_NULL ON

QUOTED_IDENTIFIER ON

NUMERIC_ROUNDABORT OFF

ARITHABORT ON|||

On my local machine,
sp_configure 'user options' returns 0 for config_value .

So I ran the enumeration for the options above...

ANSI_NULLS ON 32
ANSI_PADDING ON 16
ANSI_WARNINGS ON 8
CONCAT_NULL_YIELDS_NULL ON 4096
QUOTED_IDENTIFIER ON 256
NUMERIC_ROUNDABORT OFF
ARITHABORT ON 64

4474

And then I ran this against my local machine...

sp_configure 'user options', 4474

and the program suddenly works!

|||

The recommended way of fixing this is to actualy run the SET options from the user connection. This way the app sets it's needed settings overwritting whatever defaults are in the database/instance.

HTH,
~ Remus

|||

Agreed, I was using the example to explain this wasn't the app's fault.
It still manages to work against the remote server with no intervention. (Why?)

Thanks for your assistance.

|||

JFoushee wrote:

It still manages to work against the remote server with no intervention. (Why?)

sp_configure changes the global instance level settings. I'd guess that the remote server and local server are different at the database level settings (ALTER DATABASE ... SET ...)

HTH,
~ Remus

|||

I ran a compare between the two databases.

The local one, in 80-compatibility, needed the various SET options.

The remote one, in 90-compatibility, needed nothing extra to work.

When I changed the local one to 90-compatibility, the program magically worked, with or without the SET options.

(I downloaded the pubs database from MS for the example and attached to both local and remote.)