How to set Azure SQL Database default_database to NewDatabase

Robert Lang 0 Reputation points
2026-08-04T16:49:32.11+00:00

How do we change the default database for a new user to our [new database] instead of master.

we are using Azure SQL/ SQL database and getting the error 'Keyword or statement option 'default_database' is not supported in this version of SQL Server.'

Is there another work around for this?

Azure SQL Database

1 answer

Sort by: Most helpful
  1. Allan Solomon Mejia 1,860 Reputation points
    2026-08-04T18:52:54.9133333+00:00

    Hello @Robert Lang

    The DEFAULT_DATABASE option isn't supported in Azure SQL Database, so you can't change a user's or login's default database from master to another database as you would in SQL Server or Azure SQL Managed Instance.

    The supported approach is to specify the target database in the client connection. For example:

    • In your connection string, set Database=NewDatabase (or Initial Catalog=NewDatabase).
    • In SQL Server Management Studio (SSMS), click Options → Connection Properties and set Connect to database to NewDatabase before connecting.

    If you're using contained database users (the recommended authentication model for Azure SQL Database), make sure the user is created within NewDatabase and connect directly to that database.

    Please "Accept the Answer" if this information helped you. This will help us and others in the community as well.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.