Q
Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

Setting up a default library in DB2

How can I set up a default library in DB2 in order to not change our SQL statements? In fact, we are migrating from DB2 UDB Windows Server to the iSeries. Actually, in Windows environment, our SQL statements run well and with the SET CURRENT SCHEMAS = "EMPORIUM", we define default schemas so we don't have to explicitly specify it in each of our SQL statements. How can I do this in an iSeries environment? I need to define a library such as SELECT ... FROM MCMLIB.COMMANDES WHERE. Can you help me?
It depends on the application programming interface that you are using. DB2 UDB for iSeries added support for the SET CURRENT SCHEMA statement in V5R2. The iSeries Access ODBC and JDBC drivers support connection keywords and properties to allow specifying a default library. Here's an example of the ODBC connection keyword:

DefaultLibraries=Schema1,Schema2

==================================
MORE INFORMATION ON THIS TOPIC
==================================

Visit the ITKnowledge Exchange and get answers to your DB2 questions fast.

Check out this Search400.com Featured Topic: Expert advice on DB2

Search400.com's targeted search engine: Get relevant information on DB2/400.

The Best Web Links: Tips, tutorials and more.

Dig Deeper on DB2 UDB (universal databases)

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close