connecting to sql server db

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

  1. #1

    Default connecting to sql server db

    Hi,

    Is there a way to connect to an sql server db if it doesn't have an sql
    server logon, i.e. if the server uses only windows authentication?

    Would this have to be set up in the DSN or can a logon somehow be coded in
    the asp page?

    Cheers.


    Sergio Orrego Guest

  2. Similar Questions and Discussions

    1. Connecting SQL Server with DW using ASP.NET VB
      Hello All, I'm trying to connect SQL Server with DW using ASP.NET VB using several connection strings and getting different error messages. The...
    2. connecting to dsn on server
      I have a website on a shared server at CrystalTech. They say: Your data source verified. The connection string you should use in your code is...
    3. Connecting SQL Server to DW
      Hello I'm I have a project that is due shortly and I have been trying for about a week to connect SQL Server with DW with no success. I have read...
    4. Connecting to SQL Server from ASP.NET
      Hi, Hi I have SQL Server Instances running on same machine. How do i connect to the "SecondInstance" of SQL Server on a machine from ASP.NET? ...
    5. Web Server connecting to Informix Server
      I am running an OLTP system with Informix 7.3 IDS on HPUX. We are considering writing some web interfaces to connect to the database. At first we...
  3. #2

    Default Re: connecting to sql server db

    If the server uses Windows Authentication, then the user context that the
    connecting application is running in is used to login to SQL Server. So, for
    example, your ASP pages typically run under IUSR_<machinename> or
    IWAM_<machinename> (if you are using anonymous authentication). This account
    needs to be give permissions to the database.

    Cheers
    Ken

    "Sergio Orrego" <sergio@dial.pipex.com-nospam> wrote in message
    news:ZJXWa.861$tn5.699780@newsfep1-win.server.ntli.net...
    : Hi,
    :
    : Is there a way to connect to an sql server db if it doesn't have an sql
    : server logon, i.e. if the server uses only windows authentication?
    :
    : Would this have to be set up in the DSN or can a logon somehow be coded in
    : the asp page?
    :
    : Cheers.
    :
    :


    Ken Schaefer Guest

  4. #3

    Default Re: connecting to sql server db

    Thanks Ken,

    How would the connection string look then? I'm user to using a DSN & having
    to code the username & password. How would it differ using windows
    authentication?

    Cheers.


    "Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message
    news:ebP4xyiWDHA.572@TK2MSFTNGP11.phx.gbl...
    > If the server uses Windows Authentication, then the user context that the
    > connecting application is running in is used to login to SQL Server. So,
    for
    > example, your ASP pages typically run under IUSR_<machinename> or
    > IWAM_<machinename> (if you are using anonymous authentication). This
    account
    > needs to be give permissions to the database.
    >
    > Cheers
    > Ken
    >
    > "Sergio Orrego" <sergio@dial.pipex.com-nospam> wrote in message
    > news:ZJXWa.861$tn5.699780@newsfep1-win.server.ntli.net...
    > : Hi,
    > :
    > : Is there a way to connect to an sql server db if it doesn't have an sql
    > : server logon, i.e. if the server uses only windows authentication?
    > :
    > : Would this have to be set up in the DSN or can a logon somehow be coded
    in
    > : the asp page?
    > :
    > : Cheers.
    > :
    > :
    >
    >

    Miguel Orrego Guest

  5. #4

    Default Re: connecting to sql server db

    Ken,

    Your response to this query, brought a question to my
    mind. If the SQL server is setup for mixed mode
    authentication, which method is used first? SQL server
    authentication or NT?

    Just curious.

    Thanks,
    John



    >-----Original Message-----
    >If the server uses Windows Authentication, then the user
    context that the
    >connecting application is running in is used to login to
    SQL Server. So, for
    >example, your ASP pages typically run under
    IUSR_<machinename> or
    >IWAM_<machinename> (if you are using anonymous
    authentication). This account
    >needs to be give permissions to the database.
    >
    >Cheers
    >Ken
    >
    >"Sergio Orrego" <sergio@dial.pipex.com-nospam> wrote in
    message
    >news:ZJXWa.861$tn5.699780@newsfep1-win.server.ntli.net...
    >: Hi,
    >:
    >: Is there a way to connect to an sql server db if it
    doesn't have an sql
    >: server logon, i.e. if the server uses only windows
    authentication?
    >:
    >: Would this have to be set up in the DSN or can a logon
    somehow be coded in
    >: the asp page?
    >:
    >: Cheers.
    >:
    >:
    >
    >
    >.
    >
    John Beschler Guest

  6. #5

    Default Re: connecting to sql server db

    Here is the OLEDB connection string:
    [url]http://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#OLEDBProviderForSQLServer[/url]

    You can also find a DSN-less ODBC connection string on that page as well.

    Basically, you do not include a username/password in the connection string -
    the database user is automatically the user context that the calling app is
    running under.

    Cheers
    Ken

    "Miguel Orrego" <miguel@stressedmonkey.net-nospam> wrote in message
    news:3f2e553a$0$956$cc9e4d1f@news.dial.pipex.com.. .
    : Thanks Ken,
    :
    : How would the connection string look then? I'm user to using a DSN &
    having
    : to code the username & password. How would it differ using windows
    : authentication?
    :
    : Cheers.
    :
    :
    : "Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message
    : news:ebP4xyiWDHA.572@TK2MSFTNGP11.phx.gbl...
    : > If the server uses Windows Authentication, then the user context that
    the
    : > connecting application is running in is used to login to SQL Server. So,
    : for
    : > example, your ASP pages typically run under IUSR_<machinename> or
    : > IWAM_<machinename> (if you are using anonymous authentication). This
    : account
    : > needs to be give permissions to the database.
    : >
    : > Cheers
    : > Ken
    : >
    : > "Sergio Orrego" <sergio@dial.pipex.com-nospam> wrote in message
    : > news:ZJXWa.861$tn5.699780@newsfep1-win.server.ntli.net...
    : > : Hi,
    : > :
    : > : Is there a way to connect to an sql server db if it doesn't have an
    sql
    : > : server logon, i.e. if the server uses only windows authentication?
    : > :
    : > : Would this have to be set up in the DSN or can a logon somehow be
    coded
    : in
    : > : the asp page?
    : > :
    : > : Cheers.
    : > :
    : > :
    : >
    : >
    :
    :


    Ken Schaefer Guest

  7. #6

    Default Connecting to SQL Server db

    :(

    I want to connect my coldfusion app to a sql serve db through my coldfusion
    administrator but i always get an error saying that my JDBC timed out or
    something...How do i accomplish this task is there a link out there?????

    PackinDaMAC Guest

  8. #7

    Default Re: Connecting to SQL Server db

    Give us some specifics like version of CF and version of mssql. Test a
    connection in odbc using windows odbc administrator. Can you connect there?
    What error shows up in the cfadmin?

    Also in cfmx, create a simple template that does a cfquery to your mssql dsn.
    Just a simple 'select * from foo' using the dsn. Yes, it will just fail but
    the error may be more informative then the cfadmin error.

    ksmith Guest

  9. #8

    Default Re: Connecting to SQL Server db

    SQL Server 2005 Express?

    It installs with a random Listener port, probably to emulate the old MSDE
    environment where you're not supposed to be a true server merely a packaged up
    internal DB.

    At any rate, use SQL Server Configuration Manager/Network Config/Protocols to
    enable TCP/IP, continue inwards into IP Addresses and ensure every entry
    (although its the IPAll that's killing you) has a blank dynamic port and 1433
    as the regular port.

    JMGibson3 Guest

  10. #9

    Default Re: Connecting to SQL Server db

    Every time I have a problem connecting to a SQL Server DB via CF Admin, I do
    the following:

    In Windows, Control Panel, Administrative Tools, Data Sources(ODBC), set up a
    User DSN and a System DSN to the SQL Server DB. USE THE SAME NAME FOR BOTH. If
    you are using the local server on the machine, type in (local) as the server
    for the select box 'Which SQL Server do you want to connect to?' Make sure the
    connection tests OK at the end of each setup.

    Go into CF Admin under Data Sources and Add a new datasource but DO NOT pick
    SQL Server, use ODBC. Select the ODBC DSN(the entry you added should be in the
    dropdown list). Click 'Trusted Connection'. Leave username set to system .
    Click Submit and you should be connected.

    If this does not work, you may have to add a user to the Users section of the
    database with sufficient access. You will have to add the user under Control
    Panel/User Groups also.

    Then go back into CF Admin and replace username with the username of the new
    user you added and the password you assigned this user under Control Panel/User
    Groups.



    drforbin1970 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