microsoft / microsoft/azure-tools-for-java

[IntelliJ][ReportedByUser] Unable to create Non Azure SQL server database connection when Azure connection already exists

Open
#7,372 1 comment 0 reactions 1 assignee View on GitHub

@wangmingliang-ms is already working on this.

Since Mar 7, 2023.

Module: SQL Databases Type: Bug
Dominant language
Java
Stars
262
Forks
185
Avg merge
2d 21h
Merged PRs (30d)
1

Description

Setup

IntelliJ build version: 2022.3.2 IU-223.8617.56
OS: Mac OS X
JDK: JetBrains s.r.o. 17.0.5
Plugin version: 3.73.0-2022.3

Describe the bug

Attempting to create a non-azure (microsoft sql server) datasource in intellij to localhost gets overwritten as an azure datasource pointing to default azure datasource database.

There is no way to create a data source to a localhost connection as they keep getting overridden to point to database.windows.net.

To Reproduce

Steps to reproduce the bug

  1. log into an azure account that has SQL server instances setup.
  2. Create an Azure datasource connection in Intellij
  3. Verify that you can interact with that datasource. (view table etc)
  4. Install an instance of microsoft sql edge docker image locally: https://hub.docker.com/_/microsoft-azure-sql-edge
  5. Attempt to connect to the local docker image in Intellj:
    1. New Datasource
    2. "Microsoft SQL Server"
    3. Notice that it pre-fills with an azure host name even though it is not an azure datasource
    4. reset hostname to "localhost"
    5. Set user
    6. set password.
    7. Click Test Connection
    8. Verify connection work
    9. Click okay
    10. Database gets "converted" to an azure database and hostname overwritten to an azure host name.
Screenshots

Add screenshots to help explain your problem if available.
New "microsoft sql server" datasource defaults to azure host:
New-SQL-Server-datasource-defaults_to_azure

Force host to be localhost and driver type default
New_SQL_Server_after_changing_to_localhost_

Verifying connection works:
Localhost-Test_Connection_success

After hitting Apply, the host and connection type get overridden again.

After-clicking-apply-resets-to-azure

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.