Showing posts with label address. Show all posts
Showing posts with label address. Show all posts

Friday, March 30, 2012

ODBC error

Problem: I came in this morning, and our SQL server's IP address was
changed from a static to dynamic IP. I changed it back, but not sure if
that is the cause of the problem I am having.
Running some reports in Access 2000 that queries through ODBC to our SQL
Server 2k. We are getting an error when attempting to run the report.
*start error message
Connection failed:
SQLState: '01S00'
SQL Server Error: 0
[Microsoft][ODBC SQL Server Driver] Invalid connection string attrib
ute
Connection failed:
SQLState: '01000'
SQL Server Error: 10061
[Microsoft][ODBC SQL Server Driver][TCP/IP
Sockets]ConnectionOpen(connect()).
Connection failed:
SQLState: '08001'
SQL Server Error: 11
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets] General Netw
ork
Error
*end of error message
What is going on? How do I resolve it? Thanks in advance
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!Something was up with the network side of accessing the SQL Server.
Rebooting the server cleared up the connection issues.
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!|||Hi! Good Day!
I have problem with my ODBC Data Source(32bit) which cannot
add,configure existing database because it will come up system error
code 31 (Microsoft Access Driver (*.mdb)) was missing or unable to load
the setup or translator library as well as another Micorosoft Office
database.
I'm asking for ur help.
Thank you.
jcp
---
Posted via http://www.mcse.ms
---
View this thread: http://www.mcse.ms/message519054.html

Wednesday, March 7, 2012

obtaining the ip address of connection

any one know how the get the ip address of a source connection to my sql
server using a query/stored procedure/ex stored procedure etc.
essentially to ip address of the "host" process
thanksI don't if IP is possible, but system_user returns the Windows
Authentication domain\user, host_name() returns the workstation name, and
host_id() returns workstation id.
"Matthew Kempf" <mpkempf@.gmail.com> wrote in message
news:OeeW$6ijFHA.4000@.TK2MSFTNGP12.phx.gbl...
> any one know how the get the ip address of a source connection to my sql
> server using a query/stored procedure/ex stored procedure etc.
> essentially to ip address of the "host" process
> thanks
>|||Note that you can't always derive an IP address from a host name, but in an
enclosed environment, this might work for you:
declare @.cmd varchar(255)
set @.cmd = 'ping '+HOST_NAME()
create table #foo (l VARCHAR(8000))
set nocount on
insert #foo exec master..xp_cmdshell @.cmd
select substring
(
l,
charindex('[', l)+1,
charindex(']', l)-charindex('[',l)-1
)
from #foo
WHERE l like 'Pinging%'
drop table #foo
"Matthew Kempf" <mpkempf@.gmail.com> wrote in message
news:OeeW$6ijFHA.4000@.TK2MSFTNGP12.phx.gbl...
> any one know how the get the ip address of a source connection to my sql
> server using a query/stored procedure/ex stored procedure etc.
> essentially to ip address of the "host" process
> thanks
>|||Aaron Bertrand [SQL Server MVP] wrote:
> Note that you can't always derive an IP address from a host name, but
> in an enclosed environment, this might work for you:
>
> declare @.cmd varchar(255)
> set @.cmd = 'ping '+HOST_NAME()
> create table #foo (l VARCHAR(8000))
> set nocount on
> insert #foo exec master..xp_cmdshell @.cmd
> select substring
> (
> l,
> charindex('[', l)+1,
> charindex(']', l)-charindex('[',l)-1
> )
> from #foo
> WHERE l like 'Pinging%'
> drop table #foo
>
Good idea. You'll get better performance if you limit the number of echo
requests to 1 with the -n parameter:
declare @.c nvarchar(255)
set @.c = 'ping ' + host_name() + ' -n 1'
exec master..xp_cmdshell @.c
David Gugick
Quest Software
www.imceda.com
www.quest.com|||> Good idea. You'll get better performance if you limit the number of echo
> requests to 1 with the -n parameter:
Good catch. Though I have to wonder if this is a one-time thing or if we
plan on putting this into production. =)|||thanks,
the problem is I want the closed environment to be able to access, but
certain connections from the firewall not to be able to. I have replication
coming in over the firewall (connection I want), but do not want someone
just trying to launch the app (unwanted connection) from across the
internet, if I knew the ip of the connection this could be accomplished, but
it looks like so far it can't be done.........
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:erKHYNjjFHA.2152@.TK2MSFTNGP14.phx.gbl...
> Aaron Bertrand [SQL Server MVP] wrote:
> Good idea. You'll get better performance if you limit the number of echo
> requests to 1 with the -n parameter:
> declare @.c nvarchar(255)
> set @.c = 'ping ' + host_name() + ' -n 1'
> exec master..xp_cmdshell @.c
>
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com|||Assuming Windows Authentication, to verify a that a connection is internal,
all you need is to check the host name of the connection. Also, system_user
will return the domain\user like: Cerebrus\jturner
Is resolving to a specific IP really necessary?
Also change the default listening port, remove support for unneeded
protocols, etc.
"Matthew Kempf" <mpkempf@.gmail.com> wrote in message
news:OpUktQjjFHA.1480@.TK2MSFTNGP10.phx.gbl...
> thanks,
> the problem is I want the closed environment to be able to access, but
> certain connections from the firewall not to be able to. I have
> replication coming in over the firewall (connection I want), but do not
> want someone just trying to launch the app (unwanted connection) from
> across the internet, if I knew the ip of the connection this could be
> accomplished, but it looks like so far it can't be done.........
> "David Gugick" <david.gugick-nospam@.quest.com> wrote in message
> news:erKHYNjjFHA.2152@.TK2MSFTNGP14.phx.gbl...
>|||So what is your protection doing inside the database? Don't you think
Windows (or another application) will be better at analyzing incoming
connections, trying to PREVENT your app from being called, than from the
database merely responding to the fact that your firewall has been breached
and the app has been successfully called?
Again, you seem to be protecting one morsel of cheese from the mice, but
letting them have their way with the rest of the fridge...
"Matthew Kempf" <mpkempf@.gmail.com> wrote in message
news:eBpkbZjjFHA.1048@.tk2msftngp13.phx.gbl...
> it doesn't
> i have satellites and i don't want to try to launch the program.... i
> just know they will try.
>
> "Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in
> message news:evZZeWjjFHA.1444@.TK2MSFTNGP10.phx.gbl...
>|||the firewall is fine; the security is fine
i have an application that makes an encrypted connection to an sql server
located at a satellite. the satellite uses transactional replication over
ssl to push a copy of the database to the host so reporting can be run; so
the only connection that can be made to the sql server is that application
or if you know the sa password or application userid and password. the
problem is if someone launches that application from the satellite and makes
a connection to the firewall (not violating any security). what i'm
attempting to do is write the remote application to have sql server check to
see what ip address the application is connecting from. if the application
sees that it attempting a connection from the firewall ip address then the
app will shutdown. it needs to do this because it will break replication if
this occurs, and a snapshot merge of 24 8gb databases over the internet
sucks royally.
"Aaron Bertrand [SQL Server MVP]" <ten.xocdnartreb.noraa> wrote in message
news:%23$gVjdjjFHA.3336@.TK2MSFTNGP10.phx.gbl...
> So what is your protection doing inside the database? Don't you think
> Windows (or another application) will be better at analyzing incoming
> connections, trying to PREVENT your app from being called, than from the
> database merely responding to the fact that your firewall has been
> breached and the app has been successfully called?
> Again, you seem to be protecting one morsel of cheese from the mice, but
> letting them have their way with the rest of the fridge...
>
>
> "Matthew Kempf" <mpkempf@.gmail.com> wrote in message
> news:eBpkbZjjFHA.1048@.tk2msftngp13.phx.gbl...
>|||> see what ip address the application is connecting from. if the
> application sees that it attempting a connection from the firewall ip
> address then the app will shutdown.
Can you explain "the application"? Is this an EXE, a service, or ...?

Obtaining destination e-mail address

I have been asked if we can give NS the destination e-mail address via our Application's Event Table. I have suggested that this defeats the purpose of using NS and that we should instead call the Subcription Classes from our system to create and manage subscriptitons. That way we can take advantage of the more advanced Distribution features in NS. Is this the right way to think about NS or is passing the e-mail a common practice?

Thanks

...Ray

Hi Ray -

I'll agree with you. If I'm understanding your question correctly, what you're describing effectively shifts the burden of matching to the event provider.

For example, to send notifications to a set of subscribers, the event collection mechanism will have to determine what set of subscribers should be notified. Additionally, since each event will have an email address too, you'll potentially have lots of almost identical events, only differing by the destination email address. This is certainly the case for the sample apps - stocks, flight, etc - where the event data is not tied to any particular person or customer.

Your implementation may have some specific characteristics that would allow their suggested approach to work; for example the notifications are to notify customers when their order has arrived. In this case there is (or almost is) a one to one corrolation between the customer and the notification. But still your generator rules will have to be such that a match can be made.

I think the better approach is to get the email address from NS, allowing it to do what it does really well. The concept of subscribers is central to SQLNS.

I'm curious as to what the perceived benefit of getting the email address from the event would be.

Here's a link to a news group posting where Shyam describes how it's possible to bypass the subscribers view in NS and use one of your tables instead - something akin to a customers table in one of your own databases. He's not necessarily advocating it, just describing that it's possible.


http://groups-beta.google.com/group/microsoft.public.sqlserver.notificationsvcs/browse_thread/thread/9b66e513159c0c6a/32afae9a31b39e43?lnk=st&q=%22are+views+really+needed%22&rnum=1&hl=en#32afae9a31b39e43

HTH...

Joe

--
Joe Webb
SQL Server MVP


~~~
Get up to speed quickly with SQLNS
http://www.amazon.com/exec/obidos/tg/detail/-/0972688811

I support PASS, the Professional Association for SQL Server.
(www.sqlpass.org)

|||Thanks Joe

To answer your question the perceived benefit is that the implementation might be easier/quicker.

Unfortunately I am dealing with someone who doesn't realize just how complex NS really is and I the pressure is on to do this really quickly. In his mind, a day and your done and the whole thing is in production. Maybe if you are already an expert or have written a book on the subject. The learning curve on this product is longer than that from what I have seen and some of the problems I've been getting are hard to debug (Ill post one of them next).

The books are OK but its all very hit and miss in terms of understanding how the thing really works. I wasn't mentally ready for how complex NS is.

...Ray|||Ray,
I understand that there's a lot ot learn before you can be productive with NS. Many things we're doing in the next release are aimed at reducing this burden.

That said, NS is very flexible and powerful and in the end, will help you build a production application more quickly than if you were doing it from scratch. I know this seems counter-intuitive (and it sounds like you're fighting some of the other argument from your managers/colleagues), but experience with many large production deployments has demonstrated this to be true over and over.

At first glance, building a notification app seems simple. Collect some events, match subscriptions, deliver emails. Nothing hard about that, in principle. But in a production app, there's much more too it than that. If you have lots of users, you have to think about scalability - building a scalable matching engine yourself isn't trivial. YOu have to think about reliability if the system is used in business - how do you guarantee uptime for your application. How do you support advance features like application state, scheduled subscriptions, formatting for multiple cultures/devices, delivery retry. What about administration? You'll need tools and processes to maintain the app over time. Speaking of maintenance, how do you make changes to the application without long downtime or losing data?

SQL-NS gives you all these things "out of the box", though admittedly, it takes a little while to learn. However, once you get the first app built, you really can prototype the next one in a day.

A large number our SQL-NS customers end up using the platform after trying unsucessfully to build their apps from scratch. It seems easy at first, but after you get started down the path, there are lots and lots of issues to resolve. SQL-NS thankfully deals with all these under the hood. Hopefully some of these arguments will help you as you discuss the merits of what you're doing with your management.

Please do keep posting your questions. We'll help you get up to speed and get your application working with SQL-NS.
Regards,
-shyam