Installing octopus to Azure SQL Database

I’m struggling to install Octopus and connect to an Azure SQL Database. The error is:
"There was a problem connecting to your SQL Server database. Error: SQL Error 18456 - Login failed for user ‘octopus’.

I turned on auditing on the database, and it successfully connects:
DATABASE AUTHENTICATION SUCCEEDED Principal name octopus
The next message is:
BATCH COMPLETED <batch_information><failure_reason>Err 208, Level 16, Server latitudetestserverInvalid object name ‘OctopusServerNode’.</failure_reason></batch_information>
statement: DELETE FROM OctopusServerNode

I seem to get the Login Error 18456 when I try to login to the master database. Is it possible the setup code is doing that? If so, that doesn’t make sense for Azure SQL Databases.

Hi Clay,

Thanks for getting in touch.

Can you tell me a bit more about when the login failed error is happening? Are you trying to setup a new instance of Octopus using the Octopus Manager and getting to the database configuration screen?

There is a DELETE FROM OctopusServerNode that happens after the database has been configured in the manager and “Next” is pressed. The query is executed using the connection details that have been configured in the manager, so should be using whatever database has been set. Can you manually execute that query using the same credentials you are using to configure the Octopus database?

Hope this helps, look forward to learning more.

Cheers,
Shane

Yes, this happens when installing and when I’m on the database connection details screen and click “next”. I installed the LTS version on Friday, v2018.10.2.
The error message can be misleading (Login Error 184546), because the logs suggest it is able to login with the “DELETE FROM OctopusServerNode” error. That’s why I think Octopus must be trying to login to another database, like master, which there is none in Azure SQL Databases. I’m not sure what Octoups is doing. Can you clarify - or better yet verify you can install Octopus to an Azure SQL Database? Looks like it should work according to this page: https://octopus.com/docs/installation/sql-server-database, but there are no explicit steps. For example, I’m not sure what type of SQL users and logins you support. I created user like "CREATE USER octopus WITH PASSWORD = ‘abc’; I’m not sure what other options there are for Azure SQL Databases. I don’t believe I can create a LOGIN for Azure SQL Databases, for example.
Thanks for your help,
Clay

Got it to work by talking with the DBA. Needed a server-wide login to get it to work (contained database user doesn’t work)

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.