Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

Scheduled Pinned Locked Moved Database
helpdatabasesql-serversysadminsecurity
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sivaram praveen
    wrote on last edited by
    #1

    Previously i have used sql authentication for my application but due to some reasons sql server 2000 was reinstalled with mixed mode(both windows and sql authentication). when i run my application "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection." error message is showing pls help me out

    C M I 3 Replies Last reply
    0
    • S sivaram praveen

      Previously i have used sql authentication for my application but due to some reasons sql server 2000 was reinstalled with mixed mode(both windows and sql authentication). when i run my application "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection." error message is showing pls help me out

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      Does the login exist for the user? Logins are held in the master database while the users are held in each individual database. The application will fail if the login does not exist.


      Upcoming FREE developer events: * Glasgow: SQL Server Managed Objects AND Reporting Services ... My website

      1 Reply Last reply
      0
      • S sivaram praveen

        Previously i have used sql authentication for my application but due to some reasons sql server 2000 was reinstalled with mixed mode(both windows and sql authentication). when i run my application "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection." error message is showing pls help me out

        M Offline
        M Offline
        Mike Dimmick
        wrote on last edited by
        #3

        Mixed mode is the correct option if you want to use SQL Authentication. You cannot turn off Windows authentication. It's most likely that the server was reinstalled with Mixed Mode disabled, i.e. Windows Authentication only. You will need the administrator to re-enable Mixed Mode. In Enterprise Manager, connect to the server, then right-click the server in the tree and select Properties. On the Security tab, ensure that Authentication is set to "SQL Server and Windows" rather than "Windows only". Click OK, then you will have to restart SQL Server.


        DoEvents: Generating unexpected recursion since 1991

        S 1 Reply Last reply
        0
        • M Mike Dimmick

          Mixed mode is the correct option if you want to use SQL Authentication. You cannot turn off Windows authentication. It's most likely that the server was reinstalled with Mixed Mode disabled, i.e. Windows Authentication only. You will need the administrator to re-enable Mixed Mode. In Enterprise Manager, connect to the server, then right-click the server in the tree and select Properties. On the Security tab, ensure that Authentication is set to "SQL Server and Windows" rather than "Windows only". Click OK, then you will have to restart SQL Server.


          DoEvents: Generating unexpected recursion since 1991

          S Offline
          S Offline
          sivaram praveen
          wrote on last edited by
          #4

          Thanks for ur reply. I have changed it to "sql server and windows" and also created a login for the domainname\username and in the connection string i have given "data source=domainname,intial catalog=appliactionname,persist security info=false" when im giving trusted connection=none then it is showning error while running the application itself so pls help me with some solution

          1 Reply Last reply
          0
          • S sivaram praveen

            Previously i have used sql authentication for my application but due to some reasons sql server 2000 was reinstalled with mixed mode(both windows and sql authentication). when i run my application "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection." error message is showing pls help me out

            I Offline
            I Offline
            Ian Uy
            wrote on last edited by
            #5

            You need to associate a certain user to the database you want to access. Using Object Explorer, Go to Security -> Login, Right click Login then select New Login, create your user account. Then on the left side, select User Mapping then put a check on the database you want to access with this user account, check everything below except the denyreader and denywriter (It's up to your preference).

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups