Skip to content
Docs
Connection to a database
Data Source
SQLServer

Connect to SQLServer

To start using the server object, you should create and open a connection. If the server is empty, you need to create a new database.

Use Chat2DB to quickly connect to the SQLServer server.

Official Documents and Software:

Step 1: Create a new connection

In the Toolbar, click the New icon (+), navigate to Data Source and select SQLServer.

'SQLServer2'

Step 2: Fill in the connection information

'SQLServer'

  • Name: Customize the connection name for easy memorization

  • Env: Select the connection environment, test, production, etc. to distinguish connections in different environments

  • Storge: Select the connection storage type, currently supports local (LOCAL) and cloud (CLOUD)

  • Host: SQLServer server address, which can be IP or domain name

  • Port: SQLServer server port, default 1433

  • Instance: SQLServer instance

  • Authentication: SQLServer authentication method, username and password or no authentication required

  • User: SQLServer username

  • Password: SQLServer password

  • Database: SQLServer database name, optional, if not filled in, it will connect to the default database

  • URL: SQLServer connection URL, optional, if not filled in, it will be automatically generated according to the above information

Driver: SQLServer driver, optional, if not filled, it will be automatically identified according to the URL, you can also select manually, and the driver configuration items will be displayed after manual selection

  • SSH: Whether to use SSH connection, optional, if not filled, it will not be used by default, and the SSH configuration items will be displayed after selection
  • Advanced Configuration: Advanced configuration, optional, if not filled, it will not be used by default, and the advanced configuration items will be displayed after selection

Step 3: Download driver

If you want to download the JDBC driver for SQLServer, click the Download Driver download button at the bottom of the dialog box. Of course, you can also manually upload your own driver (Upload driver)

'driver'

Step 4: Configure SSH channel (optional)

'ssh'

  • USE SSH: Whether to use SSH channel
  • SSH Host: SSH server address
  • SSH Port: SSH server port, default 22
  • Authentication: SSH Authentication method, username and password or private key
  • User: SSH username
  • Password: SSH password
  • Test the SSH connection: Test whether the SSH connection is normal

Step 5: Test the connection

Make sure that you can establish a connection to the database using the details provided. To do this, click the test button in the lower left corner to test whether the connection is normal. If the connection is normal, it will show that the connection is successful. Otherwise, it will show that the connection failed. You can adjust the connection information according to the error message.

'ssh'

If there are any connection problems, please refer to the Cannot connect to database (opens in a new tab) page.

Step 6: Save the connection

After the test connection is passed, click the Save button to save the connection information. The connection information will be displayed in the database list on the left. Click the connection information to view the connection details or delete the connection.

'ssh'