Contact to sql server from a seperate box

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Contact to sql server from a seperate box

    Hi,

    well, I guess this question has been asked before but all of the solutions
    that I have gone with have failed so I am appealing for help.
    I have two win2k3 servers.
    Box A is hosting the webserver (IIS6)
    Box B has MSDE on it.
    I am trying to connect from an asp script on box A to the sql server db on
    box B.
    The connection string I am using is like so.
    oConn.Open "Provider=sqloledb;" & _
    "Data Source=myServerName;" & _
    "Initial Catalog=myDatabaseName;" & _
    "User Id=myUsername;" & _
    "Password=myPassword"

    I have created a sql authenticated login in the MSDE database on box B. This
    works as I can connect to it via query analyser, and also by running a web
    app from IIS on box B.

    I changed the account used to run the website on box A to a domain account
    (Instead of IUSR_MACHINE). I needed to do this because initially I was
    getting an error saying "sql server not found or access denied" -- changing
    to a domain user account solved this problem.

    now I am getting an error saying that the sql account account is not a
    trusted source. Noramally this would indicate to me that the error was cause
    because I was trying to connect using windows authentication and this was
    failing because the login was not there in windows, but this is not the
    case. I am using SQL authentication and box B is definatly set for mixed
    mode.

    any help is appreciated.

    cheers

    martin.






    martin Guest

  2. Similar Questions and Discussions

    1. Programatically creating seperate CF server instances
      Hi there, I have a Cf server that has roughly 400 individual IIS6 student websites configured. These get created via a vbscript each year for one...
    2. UltraSuite Customers: Please contact me for a full refund (or I'll contact you within the next day or so)
      Folks, If you have paid for any UltraSuite product and have not yet received it, I sincerely apologize for that. If you'd like a full refund...
    3. Using Flash Media Server to Stream FLV from seperate appserver
      We're looking to see whether it is possible to stream FLV or MP3 files located on our web application server through FMS installed on a totally...
    4. How to contact a mail server?
      In a form there is a text box for an email address ? is there a way to validate the email address, or to contact the mail server, to find out if the...
    5. Saving/uploading a file to seperate server
      I am trying to figure out a way to save a file to a seperate server(not my web server) on my network. Is this possible? If so with what tag? ...
  3. #2

    Default Re: Contact to sql server from a seperate box

    "Bob Barrows" <reb_01501@yahoo.com> wrote in message
    news:e$6KgJQVDHA.2368@TK2MSFTNGP09.phx.gbl...
    > If the two servers are in different domains, then you need to try
    connecting
    > by using the SQL Server's IP address.
    Just to add my $.02, you can also created a trust relationship between
    the two domains, if IP is not an option for security reasons.


    Chris Hohmann Guest

  4. #3

    Default Re: Contact to sql server from a seperate box

    Thanks agin.

    NTLM was turned on at a higher level in the directory structure and I guess
    this was causing the page
    to think it was using a trusted source when it was not one.

    cheers

    martin.




    "Bob Barrows" <reb_01501@yahoo.com> wrote in message
    news:e$6KgJQVDHA.2368@TK2MSFTNGP09.phx.gbl...
    > martin wrote:
    > > Hi,
    > >
    > > well, I guess this question has been asked before but all of the
    > > solutions that I have gone with have failed so I am appealing for
    > > help.
    > > I have two win2k3 servers.
    > > Box A is hosting the webserver (IIS6)
    > > Box B has MSDE on it.
    >
    > Key piece of information needed: are they both in the same domain?
    >
    >
    > > I am trying to connect from an asp script on box A to the sql server
    > > db on box B.
    > > The connection string I am using is like so.
    > > oConn.Open "Provider=sqloledb;" & _
    > > "Data Source=myServerName;" & _
    > > "Initial Catalog=myDatabaseName;" & _
    > > "User Id=myUsername;" & _
    > > "Password=myPassword"
    > >
    > > I have created a sql authenticated login in the MSDE database on box
    > > B. This works as I can connect to it via query analyser, and also by
    > > running a web app from IIS on box B.
    > >
    > > I changed the account used to run the website on box A to a domain
    > > account (Instead of IUSR_MACHINE). I needed to do this because
    > > initially I was getting an error saying "sql server not found or
    > > access denied" -- changing to a domain user account solved this
    > > problem.
    > >
    > > now I am getting an error saying that the sql account account is not a
    > > trusted source. Noramally this would indicate to me that the error
    > > was cause because I was trying to connect using windows
    > > authentication and this was failing because the login was not there
    > > in windows, but this is not the case. I am using SQL authentication
    > > and box B is definatly set for mixed mode.
    > >
    > If the two servers are in different domains, then you need to try
    connecting
    > by using the SQL Server's IP address.
    >
    > If they are in the same domain, can you ping Box B from Box A by name? It
    > could be a WINS or DNS problem.
    >
    > HTH,
    > Bob Barrows
    >
    >

    martin de vroom Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139