There are situations where you may want to clone an existing system and deploy that image to other computers. A couple examples include training and mass deployment. Applications that embed the SQL Anywhere database server may run into problems because if you use the TCP/IP protocol, the database server name must be unique in your network. What happens is that your "master" computer image works as expected, but when you start a "cloned" system the database server cannot launch because the same server name is already in use.
If your application can connect to the database server using shared memory, then you have a couple of options:
The command line looks like one of these:
dbeng16.exe -n MyServerName MyDatabase.db
dbsrv16.exe -n MyServerName -x none MyDatabase.db
Both of these commands start the database server MyServerName and load the database file MyDatabase.db. The difference is that the personal database server (dbeng16) has some limitations (e.g. 10 simultaneous connections, max 4 cores per one CPU). A complete list of those limitations is here: http://dcx.sybase.com/sa160/en/dbadmin/da-running-database-server-differences.html. Use the network database server (dbsrv16) if you need to get around them.
If your application needs to connect using the TCP/IP network protocol (for example, a Java application using the jConnect JDBC driver), then you have the same two options, but with some differences:
The command line for the personal database server looks like this:
dbeng16.exe -n MyServerName -x tcpip MyDatabase.db
The same limitations stated above apply, so if you need to use the network database server, you can choose from a couple different options:
One method to get around the unique server name problem is to start the database server using environment variables, such as the computer's name. The command line looks like this:
dbsrv16.exe -n MyServer-%COMPUTERNAME% -x tcpip MyDatabase.db
This starts a network database server called "MyServer-%COMPUTERNAME%", where computer name is your machine's name in the network and it's unique.
While this approach works in many instances, it does have a couple of drawbacks:
This method, however, will allow other computers to connect to the database, provided that they know the database server name or IP address.
A second approach is to use the "LocalOnly=YES" network protocol option when starting the database server, like this:
dbsrv16.exe -n MyServer -x tcpip(LocalOnly=YES) MyDatabase.db
This starts a network database server, but restricts connections to the local computer. In essence, it's the same behaviour as starting the personal database server, but without its limitations.
Whichever method you choose depends on what you want to accomplish, but in the end the end-result is pretty much the same and your cloned systems will have no problem starting the database server.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
32 | |
24 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |