Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6717559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:52:00+00:00 2026-05-26T08:52:00+00:00

Part of a reporting toolkit we use for our development is configured to always

  • 0

Part of a reporting toolkit we use for our development is configured to always use the same schema (say XYZZY).

However, certain customers have stored their data in a different schema PLUGH. Is there any way within DB2/z to alias the entire schema XYZZY to refer to the objects in schema PLUGH?

The reporting toolkit runs on top of ODBC using the DB2 Connect Enterprise Edition or Personal Edition 9.1 drivers.

I know I can set up individual aliases for tables and views but we have many hundreds of these database objects and it will be a serious pain to do the lot. It would be far easier to simply have DB2 auto-magically translate the whole schema.

Keep in mind we’re not looking for being able to run with multiple schemas, we just want a way to redirect all requests for database objects to a single, differently named, schema.

Of course, if there’s a way to get multiple schemas on a per-connection basis, that would be good as well. But I’m not helpful.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:52:00+00:00Added an answer on May 26, 2026 at 8:52 am

    I am guessing that by DB/2 schema you mean the qualifying name in some two part object name. For
    example, if a two
    part table name is: PLUGH.SOME_TABLE_NAME. You want to do define XYZZY as an
    alias name for PLUGH so the reporting program can refer to the table as XYZZY.SOME_TABLE_NAME.

    I don’t know how to directly do that (schema names don’t take on aliases as far as I am aware).
    The objection you have to defining individual alias names
    using something like:

    CREATE ALIAS XYZZY.SOME_TABLE_NAME FOR PLUGH.SOME_TABLE_NAME 
    

    is that there are hundreds of them to do making it a real pain. Have you thought about
    using a SELECT against the DB/2 catalogue to generate CREATE ALIAS statements for
    each of the objects you need to refer to? Something like:

    SELECT 'CREATE ALIAS XYZZY.' || NAME || ' FOR PLUGH.' || NAME
    FROM SYSIBM.SYSTABLES
    WHERE CREATOR = 'PLUGH'
    

    Capture the output into a file then execute it. Might be hundreds of commands,
    but at least you didn’t have to write them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have developed a project (employee management system), now I am on reporting part.
Part of our website is protected with .htaccess style password protection. When you try
As part of a reporting setup, I have a SQL query fetching the number
I’m currently working on a reporting library as part of a large project. It
I am executing several long-running SQL queries as part of a reporting module. These
I currently have a reporting services project that is displayed as part of an
I created a report as part of a C# application using Reporting Services and
I have a following XML (part of a .rdl report): <Report xmlns:rd=http://schemas.microsoft.com/SQLServer/reporting/reportdesigner xmlns=http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition> <DataSources>
Our logs are reporting ThreadAbortException s that are stopping our Quartz.NET jobs at seemingly
As part of an effort to automate starting/stopping some of our NServiceBus services, I'd

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.