logo       

Sponsor
FREE Network Mapping Tool for Microsoft® Office Visio® Professional 2007
Don't map your network by hand - let LANsurveyor Exx press for Microsoft Visio Professional 2007 automatically create network diagrams for you!

Server-side DB creation from DRDA client: msg#00178

apache.db.derby.devel

Subject: Server-side DB creation from DRDA client

Hi,

I have a question regarding the possibility and feasibility of adding new
functionality to the Derby Network Server.

BACKGROUND:

With Derby Network Server, communication between server and client happens through use of the DRDA protocol. That protocol doesn't have any explicit way to allow a client to create a database on the server side. Nonetheless, if one is using IBM's Universal JDBC Driver (hereafter referred to as "JCC"), one can successfully create a DB on the sever side by appending ";create=true" to the database name. Ex.

Class.forName("com.ibm.db2.jcc.DB2Driver");
DriverManager.getConnection("jdbc:derby:net://localhost:1527/myDB;create=true",
"someUser", "somePwd");

In this case, the call to connect transmits DRDA data to the server, and as part of that data, the database name is transmitted as "myDB;create=true". Network server passes this name to the Derby driver, which looks at it, sees the "create=true" attribute, strips it off, creates a new database "myDB", and then connects to it.

In other words, Derby recognizes the "create=true" attribute as part of the database
"name" and does the appropriate thing.

PROBLEM:

With the JCC client, appending ";create=true" to the database name is fine; however, there is no guarantee that such a syntax will work for other DRDA clients. An example? Well, in addition to working with IBM's DB2 Universal Driver for JDBC connections, Derby also has, in "beta", support for IBM's DB2 runtime client for ODBC connections. See the following link for more:

http://www-106.ibm.com/developerworks/db2/library/techarticle/dm-0409kartha/index.html

In the latter case (DB2 runtime), the DRDA client doesn't like the ";create=true" syntax--it parses the semicolon internally and then throws an error saying that the URL is invalid. I admit that I don't know what other DRDA clients exist (whether JDBC or ODBC), but it seems reasonable to think that the various clients could very well treat the ";create=true" attribute in different and potentially problematic ways.

PROPOSAL FOR ADDED FUNCTIONALITY:

If it's possible to modify Derby (Network Server and/or embedded) to allow the creation of a server-side database from a DRDA client, and to do so in a robust manner WITHOUT having to modify or diverge from the DRDA protocol, it seems like that functionality could prove beneficial--namely, by allowing any (theoretically) DRDA client to create a Derby database from a server connection. But that said, one would of course have to consider the following:

1 -- Desirability: Would users of Derby Network Server find this functionality useful? Is it a good idea to allow creation of server-side databases, or is that a high-risk thing? Would the potential benefits outweigh the potential risks? Keeping in mind, of course, that with JCC, one can _already_ create server-side databases through Derby Network Server--so the risk is already there.

2 -- Feasibility: How to do it? One thought that comes to mind is to use stored procedures in some way--but of course, one has to be connected to a database in order to execute a stored procedure, so I'm not real sure how that would work. Also, Derby has a set of "connection" attributes that apply to database creation (ex. bootPassword)--how would one handle those? What are the options there?

Anyone have any feedback/advice/knee-jerk reactions to these questions?

Thanks for taking the time to read this, and for any responses people might
have...
Army






Only community members can participate in forum threads. You must Register or log in to contribute.

<Prev in Thread] Current Thread [Next in Thread>
Sponsor
FREE Network Mapping Tool for Microsoft® OfficeVisio Professional 2007
Don't map your network by hand - let LANsurveyor Express for Microsoft Visio Professional 2007
automatically create network diagrams for you!
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | sitemap | advertise | OSDir is an inevitable website. super tiny logo