1Manual testing of the DB connectivity
2-------------------------------------
3
4
5./test_netstorage_rpc -> ./netstoraged -> ./netcat -> MSSQL
6
7
81. Detect the MS SQL address via executing in MS SQL Server Studio:
9   select @@SERVERNAME
10   and then, e.g.
11   $ host mssql113
12
132. Have GNU netcat e.g. 0.7.1 at hand to create a proxy:
14   $ ./netcat -L mssql113.ncbi.nlm.nih.gov:1433 -p 1433
15
16   Attention: port 1433 is vitally important. Simple DB API will not work if
17   the port number is anything but 1433
18
19   Presence or absence of a DB connection is imitated via running/killing netcat
20
213. netstoraged.ini must have a service pointing to netcat, e.g.
22
23   [database]
24   service=localhost:1433
25   user_name=netstorage_write
26   password=allowed_write
27   database=NETSTORAGE
28
294. netstoraged.ini must have an api_key for filetrack, e.g.
30
31   [netstorage_api]
32   netcache=netcache_api
33   filetrack=filetrack
34   [filetrack]
35   api_key=bqyMqDEHsQ3foORxBO87FMNhXjv9LxuzF9Rbs4HLuiaf2pHOku7D9jDRxxyiCtp2
36
375. netstoraged.ini must have a service configured for test_netstorage_rpc the
38   way it uses for connecting, e.g.
39
40   [metadata_conf]
41   service_name_01=iebdev11.be-md.ncbi.nlm.nih.gov:9822
42
436. netstoraged.ini server port must match the one from the metadata config
44   service, e.g.
45
46   [server]
47   port=9822
48
497. test_netstorage_rpc should be manually tweaked to have a direct connection
50   to the server:
51
52   connect/services/test/test_netstorage_rpc.cpp:
53
54   #define NETSTORAGE_SERVICE_NAME "iebdev11.be-md.ncbi.nlm.nih.gov:9822"
55
56
57Checking that the things are going as expected could be done via looking at
58- top -> to control the threads
59- MS SQL Server Studio -> to control records in the DB
60- tail -f netstoraged.log -> to control incoming commands
61
62
63
64List of tests for the DB connections:
65
66No connection at start
67----------------------
681. Connection appears, data
692. Data, connection appears, data
70
71There is a connection at start
72------------------------------
731. Connection disappears, connection appears, data
742. Data, connection disappears, connection appears, data
753. Data, connection disappears, data, connection disappears, data
764. Connection disappears, data, connection appears, data
775. Data, connection disappears, connection appears, connection disappears, connection appears, data
786. Connection disappears, data, data,�connection appears, data
79
80
81