[Top] [All Lists]

Re: NS with Remote DB Server?

Subject: Re: NS with Remote DB Server?
From: Joe Webb
Date: Thu, 02 Nov 2006 07:38:23 -0600
Newsgroups: microsoft.public.sqlserver.notificationsvcs
Hi Tarpan - 

Okay, let's make sure we're talking the same thing....

As I understand it, you have a server that is running the database
engine; we'll call that SQL1. 

You also have a server that is running IIS and hosts your subscription
management interface (SMI); let's call that WEB1. 

The SQLNS instance is installed on WEB1, right?

If so this is what is generally referred to as a Remote Database
deployment scenario. 

Under this scenario, the SMI doesn't need direct access to the SQL
Server database (unless you are doing things that are outside the
bounds of what SQLNS provides like checking passwords, obtaining lists
of something, etc).

The SQLNS instance does, of course, need access to the remote
database. This is configured when the instance is registered on WEB1.
You can specify that the instance should authenticate using SQL Server
Security or Windows Authentication. If you opt for the former, provide
a SQL Server Login and password. 

Next make sure a Login is present  in SQL Server on SQL1. If you're
using SQL Server authentication, create a SQL Server login to match
the one defined when the instance was registered. If you're using
Windows Authentication, make sure you map it correctly to the domain
user account. 

Finally, make sure the login has access to the SQLNS database and are
members of the appropriate database roles, probably NSRunService is
what you're after. 

Make sense? 

BTW - if you own a copy of my book, this topic is covered in a bonus
chapter that's available for download from the publisher's site -


Joe Webb
SQL Server MVP

Get up to speed quickly with SQLNS 

I support PASS, the Professional Association for SQL Server.

On Tue, 24 Oct 2006 08:21:02 -0700, tarpan
<[email protected]> wrote:

>First of all, thank you for the responce. You are the best! :-)
>Well, I have read the links you sent. It's wrong. I should not change the 
>application user just because one page of the application sometimes accesses 
>another server. If the page needs special access, it should be able to 
>provide special user credentials. That's it. 
>It seems like a very standard setup: Web-server and SQL-server are separate 
>PCs. I don't understand why I can not configure standard SQL Server feature 
>for the standard setup. %-(
>"Joe Webb" wrote:
>> Hi Tarpan - 
>> I'm assuming you've installed the NS client tools and have registered
>> the instance on the web server, right? 
>> See if these links help:
>> HTH...
>> -- 
>> Joe Webb
>> SQL Server MVP
>> ~~~
>> Get up to speed quickly with SQLNS
>> I support PASS, the Professional Association for SQL Server.
>> (
>> On Mon, 16 Oct 2006 07:21:01 -0700, tarpan
>> <[email protected]> wrote:
>> >Hi everybody,
>> >
>> >In good old times with a one server everything worked fine. Now I have 2 
>> >servers: web server + DB server.  I have deployed NS Instance to the Web 
>> >server with DBs created on the DB server. Installs nice and easy. 
>> >
>> >However, my Subscription management App (ASP.Net based) crashes with 
>> >message:
>> >
>> > Login failed for user ''. The user is not associated with a trusted SQL 
>> >Server connection.
>> >
>> >[NSException: Notification Services failed to get the metadata for the 
>> >specified instance.
>> >Instance Name: NSInstance
>> >SqlServerError:
>> >  Source: .Net SqlClient Data Provider
>> >  Number: 18452
>> >  State: 1
>> >  Class: 14
>> >  Server: DBSERVER\DB
>> >  Message: Login failed for user ''. The user is not associated with a 
>> >trusted SQL Server connection.
>> >  Procedure: 
>> >  Line Number: 65536
>> >]
>> >
>> >
>> >in a line
>> >
>> >NS_Instance = New 
>> >Microsoft.SqlServer.NotificationServices.NSInstance(NS_InstanceName)
>> >
>> >
>> >When I register the instance I have provided the SQL user name and password 
>> >as :
>> >
>> >nscontrol register ... -server SqlServer -sqlusername USERNAME -sqlpassword 
>> >
>> >My guess is: the ASP app runs under ASPNET user. When I create object of 
>> >NSInstance class, the object trying to access it's database with the 
>> >credentials of ASPNET user. The DB server does not know who the ASPNET user 
>> >is, so it rejects the connection. 
>> >
>> >I tried to add user WebServer\ASPNET to the SQL server - unsuccessful. At 
>> >this point I don't know what to do.
>> >
>> >Whoever has any ideas, please help me. Thank you.
>> >
>> > 
>> >
>> >PS. I have tried to deploy the NS to the DB Server and register it on the 
>> >web server - got exactly same result. 
>> >
>> > 
>> >

<Prev in Thread] Current Thread [Next in Thread>