Hello Julian,
You simply need to do something like this
import com.sap.dbtech.powertoys.DBM;
...
.. somewhere in code
Properties pt = new Properties();
pt.setProperty("host", "localhost");
pt.setProperty("dbname", "DB74");
String dbuser = "DBM";
String dbpasswd = "DBMPASSWORD";
String result = null;
DBM mydbm = new DBM(pt);
result = mydbm.cmd("user_logon " + dbuser +","+dbpasswd);
result = mydbm.cmd("param_startsession");
...
mydbm.release();
...
'result' contains the text that would appear on the dbmcli console, that is 'OK' on
most
commands.
Keep in mind that for Java access the x_server must be started, as it uses TCP/IP to
connect to the database.
Regards
Alexander Schr�der
SAP DB, SAP Labs Berlin
> -----Original Message-----
> From: jlegeny [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 07, 2003 11:08 AM
> To: [EMAIL PROTECTED]
> Subject: Create DB instance using java
>
>
> Hi,
> how can I create new database instance and set database parameters
> (MAXDATADEVSPACES, MAXUSERTASKS, CAT_CACHE_SUPPLY, number and size of
> data/log volumes, ...) IN JAVA?
> Is it possible to do it using java API ?
>
> For dbmcli is used 'com.sap.dbtech.powertoys.DBM' package.
> I need to know, how can I setup database parameters (followed
> under) in
> JAVA.
>
> param_startsession
> param_init OLTP
> param_put CAT_CACHE_SUPPLY 300
> param_checkall
> param_commitsession
> param_addvolume 1 DATA %DIR_VOLUME%\%DATABASE_NAME%\DISKD0001 F 51200
>
> Thanks for your answer,
> Julian
> _______________________________________________
> sapdb.general mailing list
> [EMAIL PROTECTED]
> http://listserv.sap.com/mailman/listinfo/sapdb.general
>
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general