[MonetDB-users] Multiple database question.
I have created a customed version of the MServer5.bat and MClient.bat to serve multiple databases. MServer5.bat : set MONETHOME=D:\Amber\Program\MonetDB\MonetDB5 set MONETDATAROOT=%1set MONETDATAROOT=%MONETDATAROOT:~0,-1%set MONETDBNAME=%2 if "%MONETDATAROOT%" == "" pauseif "%MONETDBNAME%" == "" pause set PATH=%MONETHOME%\bin;%MONETHOME%\lib;%MONETDB%\lib\MonetDB5;%PATH% set MONETDBFARM=--dbfarm="%MONETDATAROOT%\dbfarm"set SQLLOGDIR=--set "sql_logdir=%MONETDATAROOT%\sql_logs"set XQUERYLOGDIR=--set "xquery_logdir=%MONETDATAROOT%\xquery_logs" rem start the real server"%MONETHOME%\bin\mserver5.exe" --set "prefix=%MONETHOME%" --set "exec_prefix=%MONETHOME%" %MONETDBFARM% %SQLLOGDIR% --dbname=%MONETDBNAME% --dbinit="include sql;" MClient5.bat @set MONETHOME=D:\Amber\Program\MonetDB\MonetDB5 @set DBNAME=%1if "%DBNAME%" == "" pause @rem extend the search path with our EXE and DLL folders@rem we depend on pthreadVCE.dll having been copied to the lib folder@set PATH=%MONETHOME%\bin;%MONETHOME%\lib;%MONETHOME%\lib\bin;%PATH% @rem start the real client@"%MONETHOME%\bin\mclient.exe" -lsql -d %DBNAME% @if ERRORLEVEL 1 pause Using "MServer5.bat D:\MONETDB amber" I am able to start a new server process, ant it successfully created a new database in D:\MONETDB directory, but with the new server and default demo server process all running, I can't use mclient connect to the new database. MClient5.bat amber D:\>mclient.exe -E GB2312 -lsql -d amber!database 'amber' does not exist But the demo database can be connected to, and the new database can be connected to only when I close the demo database process. The netstat -a command shows there are two processes listening on port 50000. _________________________________________________________________ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us
On Fri, Jan 02, 2009 at 03:58:04PM +0800, 小波 顾 wrote:
I have created a customed version of the MServer5.bat and MClient.bat to serve multiple databases.
MServer5.bat :
set MONETHOME=D:\Amber\Program\MonetDB\MonetDB5 set MONETDATAROOT=%1set MONETDATAROOT=%MONETDATAROOT:~0,-1%set MONETDBNAME=%2 if "%MONETDATAROOT%" == "" pauseif "%MONETDBNAME%" == "" pause
set PATH=%MONETHOME%\bin;%MONETHOME%\lib;%MONETDB%\lib\MonetDB5;%PATH%
set MONETDBFARM=--dbfarm="%MONETDATAROOT%\dbfarm"set SQLLOGDIR=--set "sql_logdir=%MONETDATAROOT%\sql_logs"set XQUERYLOGDIR=--set "xquery_logdir=%MONETDATAROOT%\xquery_logs" rem start the real server"%MONETHOME%\bin\mserver5.exe" --set "prefix=%MONETHOME%" --set "exec_prefix=%MONETHOME%" %MONETDBFARM% %SQLLOGDIR% --dbname=%MONETDBNAME% --dbinit="include sql;"
MClient5.bat
@set MONETHOME=D:\Amber\Program\MonetDB\MonetDB5 @set DBNAME=%1if "%DBNAME%" == "" pause @rem extend the search path with our EXE and DLL folders@rem we depend on pthreadVCE.dll having been copied to the lib folder@set PATH=%MONETHOME%\bin;%MONETHOME%\lib;%MONETHOME%\lib\bin;%PATH% @rem start the real client@"%MONETHOME%\bin\mclient.exe" -lsql -d %DBNAME% @if ERRORLEVEL 1 pause Using "MServer5.bat D:\MONETDB amber" I am able to start a new server process, ant it successfully created a new database in D:\MONETDB directory, but with the new server and default demo server process all running, I can't use mclient connect to the new database.
MClient5.bat amber
D:\>mclient.exe -E GB2312 -lsql -d amber!database 'amber' does not exist
But the demo database can be connected to, and the new database can be connected to only when I close the demo database process.
The netstat -a command shows there are two processes listening on port 50000.
Right: if you want to have more than one MonetDb servers running concurrently on one machine (each serving a different DB), you need to make sure they use different ports, e.g., by eplicitly specifying the MAPI port to be used on the mserver5 (and mclient) commandline: `mserver5 --set mapi_port=<portnr>` `mclient --port=<portnr>` Stefan
_________________________________________________________________ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us ------------------------------------------------------------------------------
_______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
-- | Dr. Stefan Manegold | mailto:Stefan.Manegold@cwi.nl | | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | | The Netherlands | Fax : +31 (20) 592-4312 |
Thanks Stefan.> Date: Fri, 2 Jan 2009 09:12:36 +0100> From: Stefan.Manegold@cwi.nl> To: monetdb-users@lists.sourceforge.net> Subject: Re: [MonetDB-users] Multiple database question.> > On Fri, Jan 02, 2009 at 03:58:04PM +0800, 小波 顾 wrote:> > > > I have created a customed version of the MServer5.bat and MClient.bat to serve multiple databases.> > > > MServer5.bat :> > > > set MONETHOME=D:\Amber\Program\MonetDB\MonetDB5> > set MONETDATAROOT=%1set MONETDATAROOT=%MONETDATAROOT:~0,-1%set MONETDBNAME=%2> > if "%MONETDATAROOT%" == "" pauseif "%MONETDBNAME%" == "" pause> > > > set PATH=%MONETHOME%\bin;%MONETHOME%\lib;%MONETDB%\lib\MonetDB5;%PATH%> > > > set MONETDBFARM=--dbfarm="%MONETDATAROOT%\dbfarm"set SQLLOGDIR=--set "sql_logdir=%MONETDATAROOT%\sql_logs"set XQUERYLOGDIR=--set "xquery_logdir=%MONETDATAROOT%\xquery_logs"> > rem start the real server"%MONETHOME%\bin\mserver5.exe" --set "prefix=%MONETHOME%" --set "exec_prefix=%MONETHOME%" %MONETDBFARM% %SQLLOGDIR% --dbname=%MONETDBNAME% --dbinit="include sql;"> > > > MClient5.bat> > > > @set MONETHOME=D:\Amber\Program\MonetDB\MonetDB5> > @set DBNAME=%1if "%DBNAME%" == "" pause> > @rem extend the search path with our EXE and DLL folders@rem we depend on pthreadVCE.dll having been copied to the lib folder@set PATH=%MONETHOME%\bin;%MONETHOME%\lib;%MONETHOME%\lib\bin;%PATH%> > @rem start the real client@"%MONETHOME%\bin\mclient.exe" -lsql -d %DBNAME%> > @if ERRORLEVEL 1 pause> > Using "MServer5.bat D:\MONETDB amber" I am able to start a new server process, ant it successfully created a new database in D:\MONETDB directory, but with the new server and default demo server process all running, I can't use mclient connect to the new database.> > > > MClient5.bat amber> > > > D:\>mclient.exe -E GB2312 -lsql -d amber!database 'amber' does not exist> > > > But the demo database can be connected to, and the new database can be connected to only when I close the demo database process.> > > > The netstat -a command shows there are two processes listening on port 50000.> > Right: if you want to have more than one MonetDb servers running> concurrently on one machine (each serving a different DB), you need to make> sure they use different ports, e.g., by eplicitly specifying the MAPI port> to be used on the mserver5 (and mclient) commandline:> > `mserver5 --set mapi_port=<portnr>`> > `mclient --port=<portnr>`> > Stefan> > > > > > > _________________________________________________________________> > Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy!> > http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us> > ------------------------------------------------------------------------------> > > _______________________________________________> > MonetDB-users mailing list> > MonetDB-users@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/monetdb-users> > > -- > | Dr. Stefan Manegold | mailto:Stefan.Manegold@cwi.nl |> | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ |> | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 |> | The Netherlands | Fax : +31 (20) 592-4312 |> > ------------------------------------------------------------------------------> _______________________________________________> MonetDB-users mailing list> MonetDB-users@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/monetdb-users _________________________________________________________________ More than messages–check out the rest of the Windows Live™. http://www.microsoft.com/windows/windowslive/
participants (2)
-
Stefan Manegold
-
小波 顾