This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I wondered that too. With SQL Server I'd try connecting to the master database (which always exits) as sa. That should work?
siva krishna pallapu
Joined: Aug 12, 2008
yeah you are right mr.ulf mitter .. but my requirement is to create a database using java or any other api it can be either with .bat files also but the local system should not contain any servers installed in it..
for ex: let us say if the local system contains ms-sql server then we can create the databases on remote systems using osql commands.. but this is not not my situation local system will not have any servers installed on it.
Joined: Mar 22, 2005
Can you use Telnet to log into the other machine? If so, you can use the Apache Commons Net library (which contains a Telnet client) to run osql on the server itself. Using SSH instead of Telnet would also be an option.
But in general I would say that the creation of a database should be a sufficiently rare occasion that it doesn't need to be automated to this degree. How often do you foresee running this? [ September 15, 2008: Message edited by: Ulf Dittmer ]