1.1

Table Of Contents
...
// Start a couple of SQLFire servers with network servers on different ports
$ sqlf server start -locators=localhost[3000] -auth-provider=BUILTIN
-sqlfire.user.gem1=gem1 -user=gem1 -password=gem1 -dir=server1
-client-port=1528
Starting SQLFire Server using locators for peer discovery: localhost[3000]
Starting network server for SQLFire Server at address
localhost/127.0.0.1[1528]
...
$ sqlf server start -locators=localhost[3000] -auth-provider=BUILTIN
-sqlfire.user.gem1=gem1 -user=gem1 -password=gem1 -dir=server2
-client-port=1529
Starting SQLFire Server using locators for peer discovery: localhost[3000]
Starting network server for SQLFire Server at address
localhost/127.0.0.1[1529]
...
// Create a new user (username/password as gem2/gem2) from SQLF
command-shell.
$ sqlf
sqlf version 10.4
sqlf> connect client 'localhost:1527;user=gem1;password=gem1';
sqlf> call sys.create_user('sqlfire.user.gem2', 'gem2');
Statement executed.
sqlf> quit;
// Open a new connection to the locator having network server on
localhost:1527
// with username and password in the connection string.
string host = "localhost";
int port = 1527;
string user = "gem2";
string passwd = "gem2";
string connectionStr = string.Format("server={0}:{1};user={2};password={3}",
host, port, user, passwd);
using (SQLFClientConnection conn = new SQLFClientConnection(connectionStr))
{
conn.Open();
// perform operations
conn.Close();
}
// Open a new connection to the locator having network server on
localhost:1527
// with username and password passed as properties.
string connectionStr2 = string.Format("server={0}:{1}", host, port);
using (SQLFClientConnection conn = new SQLFClientConnection(connectionStr2))
{
Dictionary<string, string> props = new Dictionary<string, string>();
props.Add("user", user);
props.Add("password", passwd);
conn.Open(props);
// perform operations
conn.Close();
}
669
ADO.NET Driver Reference