Using SSMS with WiltonDB - wiltondb/wiltondb GitHub Wiki
On this page:
- Prerequisites
- Supported functionality
- Installing SSMS
- Opening connection
- Running queries
- Browsing tables
Prerequisites
Supported functionality
Microsoft SQL Server Management Studio (SSMS) can be used to connect to WiltonDB. Only the functionality covered by TDS protocol (port 1433
by default) - browsing database contensts and running SQL queries - will work from SSMS.
Additional functionality commonly used with MSSQL (like performing backups and restores) cannot be used from SSMS. In general, such maintenance tasks on WiltonDB need to be performed over PostgreSQL protocol (port 5432
by default).
Installing SSMS
Download the SSMS installer and run it:
Opening connection
Start SSMS:
Open "Connect Object Explorer" (should open automatically on startup) and add there the following details:
-
Server type
:Database Engine
-
Server name
:127.0.0.1,1433
-
Authentication
:SQL Server Authentication
-
Login
:wilton
-
Password
:wilton
Note, that the host/IP and port are delimited with a comma
,
, NOT with a colon:
.For remote connections replace
127.0.0.1
with the remote host name (make sure that Remote Connections are set up in WiltonDB).If a custom TDS port was set up - use it instead of
1433
.
Running queries
On the left tree choose: Databases
- System Databases
- master
- New Query
.
To make sure that the connection is actually established to a WiltonDB instance (not to some MSSQL instance by mistake) run the following query calling a function that does not exist in MSSQL:
select pg_backend_pid()
It returns the process ID of the postgres.exe
process that is run for the current DB connection, you can check in Task Manager that the process with this ID is actually running:
Browsing tables
To check the table browsing functionality run the following SQL snippet:
create table tab1(name1 nvarchar(42))
insert into tab1 values('foo')
insert into tab1 values('bar')
insert into tab1 values('baz')
create table tab2(name2 nvarchar(42))
After the refresh these new tables inside the master
DB will be listed and can be browsed with Select Top 1000 Rows
: