@@ -22,101 +22,86 @@ Windows and Linux platforms and speak the PostgreSQL protocol.
22
22
23
23
### Using ` sqlcmd ` to connect to the DB instance {#babelfish-connect-sqlcmd}
24
24
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:
28
27
29
28
``` bash
30
29
sqlcmd -S host.sample.com,1433 -U PUT_USER_HERE -P PUT_PASSWORD_HERE -d PUT_DBNAME_HERE
31
30
```
32
31
33
32
Where:
34
33
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.
36
35
- ` -U ` is the login name of the user.
37
36
- ` -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.
39
39
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.
42
41
43
42
### Using SSMS to connect
44
43
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.
54
47
55
48
#### Connecting with SSMS
56
49
57
50
1 . Open the Connect to Server dialog by doing one of the following:
58
51
59
- - Choose & ldquo ; New Query& rdquo ; .
60
- - If the Query Editor is open, choose & ldquo ; Query& rdquo ; &ndash ;
61
- & ldquo ; Connection& rdquo ; &ndash ; & ldquo ; Connect& rdquo ; .
52
+ - Choose ` New Query ` .
53
+ - If the Query Editor is open, choose ` Query ` &ndash ;
54
+ ` Connection ` &ndash ; ` Connect ` .
62
55
63
56
2 . Provide the following information for your database:
64
57
65
- - For & ldquo ; Server type& rdquo ; , choose & ldquo ; Database Engine& rdquo ; .
58
+ - For ` Server type ` , choose ` Database Engine ` .
66
59
67
- - For & ldquo ; Server name& rdquo ; , 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
68
61
name should look similar to the following:
69
62
70
63
``` none
71
64
host.example.com,1433
72
65
```
73
66
74
- - For “Authentication”, choose “SQL Server
75
- Authentication”.
67
+ - For `Authentication`, choose `SQL Server Authentication`.
76
68
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
78
70
created your database.
79
71
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.
90
73
74
+ - Optionally, choose `Options`, and then choose the
75
+ `Connection Properties` tab.
91
76
92
- #### Limitations
77
+ - For `Connect to database`, specify the name of the database
78
+ to connect to, and choose `Connect`.
93
79
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`.
95
82
96
83
97
84
### Using `tsql` to connect
98
85
99
86
`tsql` is a command line tool that is shipped as part of FreeTDS. It allows you
100
87
to connect and to interact with Babelfish (or any other TDS enabled data source)
101
- from your Linux terminal.
88
+ from a Linux terminal.
102
89
103
- Here is an example how to connect to Babelfish with `tsql` :
90
+ A Babelfish connection string takes the following form :
104
91
105
92
```bash
106
93
tsql -S database.example.com -p 1433 -U postgres -P secretpassword
107
94
```
108
95
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/ ) .
111
97
112
98
Note that ` tsql ` is not officially supported.
113
99
114
100
115
101
### Using ` psql ` to connect
116
102
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 ) .
120
105
121
106
Here is an example how to connect with ` psql ` :
122
107
@@ -125,5 +110,5 @@ psql -h database.example.com -p 5432 -U postgres -d dbname
125
110
```
126
111
127
112
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