New user cannot login to SQL Azure

后端 未结 6 2647
臣服心动
臣服心动 2020-12-13 08:19

I am creating a new read/write user on SQL Azure as follows:

-- Connected to master
create login [fred] with password = \'xxx\';

-- Connected to my DB
creat         


        
6条回答
  •  感动是毒
    2020-12-13 08:46

    As Karol commented in Herve Roggero's response, I had the same problem even after selecting the database.

    In our case the problem was that the users we created in our databases were disabled.

    After we run the following script in the database we wanted to connect for each user:

      GRANT CONNECT TO [ourDbUser]
    

    We refreshed the database's users and now they were enabled, and then we were able to connect to the database successfully.

提交回复
热议问题