Create new DB using JAVA

jlegeny <[email protected]>
Newsgroups gmane.comp.db.sapdb.general
Message-ID <[email protected]>
Hello,
 Can somebody send me a short demo example for creating new db instance 
in JAVA ?

 When I have already created DB I know connect to it, change some db 
parameters, but still I don't know how can I create new instance.

  This is example for setting up parameters what I'm using now:
     String dbUser = "dbm";      String dbPasswd = "dbm";

   DBM dbSession = DBM.dbDBM ("localhost", "my_db");
   // logon to dbm server
   dbSession.cmd ("user_logon " + dbUser + "," +  dbPassword);
   // send server command for starting the database
   result = dbSession.cmd ("db_warm");
   // set up some parameters
   result = session.cmd ("param_startsession");
   result = session.cmd ("param_put MAXUSERTASKS 5");
   result = session.cmd ("param_checkall");
   result = session.cmd ("param_commitsession");

 This is running OK. But  my problem is create new DB instance. I have try

   DBM dbSession = DBM.dbDBM ("localhost", "my_new_db");
   DBM.dbrootDBM("localhost", "c:\program files\sapdb\depend");
   result = session.cmd ("db_create");

   but I have an error -   com.sap.dbtech.rte.comm.RTEException: Server 
or DB unknown

   How can I do that?

 Thanks in advance for your answer,
  Julian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.