0

I'm trying to install SonarQube on Azure, using an Azure SQL Database, which is a serverless database. Instructions I have found advise me to run these commands from the query editor:

-- On master
CREATE LOGIN sonarqube WITH PASSWORD = ‘StrongPassword’;

-- On my sonarqube db CREATE USER sonarqube FOR LOGIN SonarQube WITH DEFAULT_SCHEMA = dbo; ALTER ROLE db_owner ADD MEMBER sonarqube;

-- Then log in using user sonarqube, then: ALTER DATABASE sonarqube SET READ_COMMITTED_SNAPSHOT ON WITH ROLLBACK IMMEDIATE;

But the serverless database, and the 'virtual' database server created for it don't have a master database. Every search result on this I have found doesn't understand the problem, and the Azure docs are simply very, very bad in this regard.

The docs do hint that only an AD user can add a login and add the db_owner role to a user linked to that login, but the clarity and cohesiveness of the docs on this matter are dismal.

How can I achieve the end goal here of a sonarqube login, that has a sonarqube user with db_owner on the sonarqube database?

ProfK
  • 503

1 Answers1

0

I have a serverless database on that logical server shown below:

enter image description here

When you connect to that server on management studio, make a click on Options.

enter image description here

Make sure you connect to the Master database and make a click on Connect.

enter image description here

Then you will be able to see the master database under the System Databases folder. Make a right click on the master database and select New Query to create a query and execute it.

enter image description here