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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Login Fail for user 'XYZ'

Login Fail for user 'XYZ'

Scheduled Pinned Locked Moved Database
helpdatabasesysadminsecuritybusiness
4 Posts 2 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
    Sasmi_Office
    wrote on last edited by
    #1

    Dear Friend's, My Issue scenario is as follow's i have two servers Name "Server_A" "Server_B" In "Server_A" i have one Database "DB1" In "Server_B" i have one Database "DB2" in Database "DB1" of Server "Server_A" i have one table "tbl_ListOfCountry" now as per my business logic that table must be centralize where my client will update information and i need to use this table data in "Server_B". For that i have create one procedure which pull all the data of table "tbl_ListOfCountry" from "Server_A". for that i have created Synonym "tbl_ListOfCountry" using following syntex

    CREATE SYNONYM [dbo].[tbl_ListOfCountry] FOR [Server_A].[DB1].[dbo].[tbl_ListOfCountry]

    now for security purpose i have created one user "user1" with "Server Role" as "Public" and "User Mapping" as "db_datareader", "db_datawriter" and "public" in "Server_B" and Grant As Execute Permission of this user to my procedure "Proc1" which use to pull the record. now the main issue is started whenever i execute that procedure "Proc1" using "user1" login instead of "sa" it give me error Msg 18456, Level 14, State 1, Line 1 Login failed for user 'user1'. Please, help me to overcome this issue... Thanks in advanced..

    Sasmi

    C 1 Reply Last reply
    0
    • S Sasmi_Office

      Dear Friend's, My Issue scenario is as follow's i have two servers Name "Server_A" "Server_B" In "Server_A" i have one Database "DB1" In "Server_B" i have one Database "DB2" in Database "DB1" of Server "Server_A" i have one table "tbl_ListOfCountry" now as per my business logic that table must be centralize where my client will update information and i need to use this table data in "Server_B". For that i have create one procedure which pull all the data of table "tbl_ListOfCountry" from "Server_A". for that i have created Synonym "tbl_ListOfCountry" using following syntex

      CREATE SYNONYM [dbo].[tbl_ListOfCountry] FOR [Server_A].[DB1].[dbo].[tbl_ListOfCountry]

      now for security purpose i have created one user "user1" with "Server Role" as "Public" and "User Mapping" as "db_datareader", "db_datawriter" and "public" in "Server_B" and Grant As Execute Permission of this user to my procedure "Proc1" which use to pull the record. now the main issue is started whenever i execute that procedure "Proc1" using "user1" login instead of "sa" it give me error Msg 18456, Level 14, State 1, Line 1 Login failed for user 'user1'. Please, help me to overcome this issue... Thanks in advanced..

      Sasmi

      C Offline
      C Offline
      Chris Meech
      wrote on last edited by
      #2

      Let me guess. The password for the 'sa' account on DB1(ServerA) is the same as on DB2(ServerB). :)

      Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]

      S 1 Reply Last reply
      0
      • C Chris Meech

        Let me guess. The password for the 'sa' account on DB1(ServerA) is the same as on DB2(ServerB). :)

        Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]

        S Offline
        S Offline
        Sasmi_Office
        wrote on last edited by
        #3

        Thanks for the quick reply... I am also think same but when i am using this Procedure in my application it is giving me same error can you explain me why this happening....

        C 1 Reply Last reply
        0
        • S Sasmi_Office

          Thanks for the quick reply... I am also think same but when i am using this Procedure in my application it is giving me same error can you explain me why this happening....

          C Offline
          C Offline
          Chris Meech
          wrote on last edited by
          #4

          I suspect that it works when you are logged in to DB2 as 'sa', because it attempts to use those same credentials on DB1, it will work since 'sa' also exists in DB1 with the same password. When you login to DB2 with 'XYZ', the same login will be attempted on DB1 and since 'XYZ' doesn't exist on DB1, the login fails. The quick and dirty solution is to replicate the userid on DB1 and I suspect that will allow the link to work. :)

          Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]

          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