Skip to content

Commit 95089a9

Browse files
Improved consistency of grammar and added note about connecting on SSMS (#185)
This update improves the grammar in the command-line.md file, and adds warning from Simon about connecting on SSMS. Signed-off-by: susanmdouglas [email protected]
1 parent dbf9a82 commit 95089a9

File tree

1 file changed

+30
-45
lines changed

1 file changed

+30
-45
lines changed

_usage/command-line.md

+30-45
Original file line numberDiff line numberDiff line change
@@ -22,101 +22,86 @@ Windows and Linux platforms and speak the PostgreSQL protocol.
2222

2323
### Using `sqlcmd` to connect to the DB instance {#babelfish-connect-sqlcmd}
2424

25-
The most common way to connect to and interact with Babelfish
26-
is with the SQL Server `sqlcmd` utility, as shown in the following.
27-
25+
One way to connect to and interact with Babelfish is with the SQL Server `sqlcmd` utility. A Babelfish
26+
connection string takes the following form:
2827

2928
```bash
3029
sqlcmd -S host.sample.com,1433 -U PUT_USER_HERE -P PUT_PASSWORD_HERE -d PUT_DBNAME_HERE
3130
```
3231

3332
Where:
3433

35-
- `-S` is the server name and port of the DB instance.
34+
- `-S` is the server name and TDS port of the DB instance.
3635
- `-U` is the login name of the user.
3736
- `-P` is the password associated with the user.
38-
- `-d` is the database that is selected initially.
37+
- `-d` is the database to which you are connecting. This value is optional; if omitted, the client will
38+
connect to the `master` database.
3939

40-
After connecting with `sqlcmd`, you can use familiar T-SQL syntax to create and
41-
manage database objects.
40+
After connecting, you can use familiar T-SQL syntax to create and manage database objects.
4241

4342
### Using SSMS to connect
4443

45-
SSMS is one of the most commonly used clients to connect to Babelfish.
46-
47-
In the following procedure, you connect to your Babelfish database by
48-
using SSMS. You can use the SSMS query editor to connect to a Babelfish database.
49-
50-
51-
>
52-
> _You **can't currently connect using the SSMS Object Explorer**._
53-
>
44+
SQL Server Management Studio (SSMS) is a commonly used SQL Server client. When loading SSMS, it
45+
may attempt to connect with the Object Explorer `Connect to Server` dialog box. If this dialog
46+
box opens by default, hit `Cancel`. Babelfish **only** supports connecting from the Query Editor.
5447

5548
#### Connecting with SSMS
5649

5750
1. Open the Connect to Server dialog by doing one of the following:
5851

59-
- Choose “New Query”.
60-
- If the Query Editor is open, choose “Query” –
61-
“Connection” – “Connect”.
52+
- Choose `New Query`.
53+
- If the Query Editor is open, choose `Query` –
54+
`Connection` – `Connect`.
6255

6356
2. Provide the following information for your database:
6457

65-
- For “Server type”, choose “Database Engine”.
58+
- For `Server type`, choose `Database Engine`.
6659

67-
- For “Server name”, enter the DNS name. For example, your server
60+
- For `Server name`, enter the DNS name followed by a comma and the TDS port. For example, your server
6861
name should look similar to the following:
6962

7063
```none
7164
host.example.com,1433
7265
```
7366
74-
- For “Authentication”, choose “SQL Server
75-
Authentication”.
67+
- For `Authentication`, choose `SQL Server Authentication`.
7668
77-
- For “Login”, enter the user name that you chose to use when you
69+
- For `Login`, enter the user name that you chose to use when you
7870
created your database.
7971
80-
- For “Password”, enter the password corresponding to that user name.
81-
82-
- Optionally, choose “Options”, and then choose the
83-
“Connection Properties” tab.
84-
85-
- For “Connect to database”, specify the name of the database
86-
to connect to, and choose “Connect”.
87-
88-
3. If a message appears indicating that SSMS can't apply connection
89-
strings, choose “OK”.
72+
- For `Password`, enter the password corresponding to that user name.
9073
74+
- Optionally, choose `Options`, and then choose the
75+
`Connection Properties` tab.
9176
92-
#### Limitations
77+
- For `Connect to database`, specify the name of the database
78+
to connect to, and choose `Connect`.
9379
94-
As previously stated, currently you can not connect using the SSMS Object Explorer.
80+
3. If a message appears indicating that SSMS can't apply the connection
81+
strings, choose `OK`.
9582
9683
9784
### Using `tsql` to connect
9885
9986
`tsql` is a command line tool that is shipped as part of FreeTDS. It allows you
10087
to connect and to interact with Babelfish (or any other TDS enabled data source)
101-
from your Linux terminal.
88+
from a Linux terminal.
10289
103-
Here is an example how to connect to Babelfish with `tsql`:
90+
A Babelfish connection string takes the following form:
10491
10592
```bash
10693
tsql -S database.example.com -p 1433 -U postgres -P secretpassword
10794
```
10895

109-
For information about using `tsql`, consult
110-
[the FreeTDS documentation](https://www.freetds.org/userguide/).
96+
For information about using `tsql`, consult [the FreeTDS documentation](https://www.freetds.org/userguide/).
11197

11298
Note that `tsql` is not officially supported.
11399

114100

115101
### Using `psql` to connect
116102

117-
You can also use PostgreSQL's `psql` to connect to Babelfish. `psql` has to
118-
connect to the PostgreSQL port (by default 5432), and you will have to use
119-
PostgreSQL SQL syntax instead of T-SQL.
103+
You can use PostgreSQL's `psql` client to connect to Babelfish on the PostgreSQL port (by default `5432`).
104+
`psql` supports [PostgreSQL-style SQL syntax](https://www.postgresql.org/docs/current/sql-commands.html).
120105

121106
Here is an example how to connect with `psql`:
122107

@@ -125,5 +110,5 @@ psql -h database.example.com -p 5432 -U postgres -d dbname
125110
```
126111

127112
Note that Babelfish ships with a modified version of `psql`, which is intended
128-
for use by Babelfish development. This version can produce incorrect results,
129-
and should not be used in production.
113+
for use by Babelfish development. This version is not intended for use in a production
114+
environment.

0 commit comments

Comments
 (0)