Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2003
    Posts
    42

    Unanswered: RENAME TABLE A.T TO B.T not allowed?

    It seems that db2 v8 and v9 do not allow renaming table into different schema. I can't see any good reason for that restriction.
    Anyway, is there any decent way to workaround it? Using export/import/load is not an option - the downtime it requires is not well justified.

    Thanks for any hints.

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    create a synonym for this table
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  3. #3
    Join Date
    Nov 2005
    Location
    IL
    Posts
    557
    Quote Originally Posted by akaraivanov
    It seems that db2 v8 and v9 do not allow renaming table into different schema. I can't see any good reason for that restriction.
    Anyway, is there any decent way to workaround it? Using export/import/load is not an option - the downtime it requires is not well justified.

    Thanks for any hints.
    You are not really renaming a table, are you?

    If you MUST do this and do not want to recreate this table under a new schema, maybe you should look into ALIAS.
    --
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows

    DB2 v9.7.0.6 os 6.1.0.0

  4. #4
    Join Date
    Sep 2004
    Location
    Belgium
    Posts
    1,126
    Quote Originally Posted by akaraivanov
    It seems that db2 v8 and v9 do not allow renaming table into different schema. I can't see any good reason for that restriction.
    Anyway, is there any decent way to workaround it? Using export/import/load is not an option - the downtime it requires is not well justified.
    You may of course also create a view with the new name, pointing to the original table, and make that old table "invisible" through removal of authorizations.
    --_Peter Vanroose,
    __IBM Certified Database Administrator, DB2 9 for z/OS
    __IBM Certified Application Developer
    __ABIS Training and Consulting
    __http://www.abis.be/

  5. #5
    Join Date
    Nov 2003
    Posts
    42
    Thank you all! Using aliases seems my best shot.

    regards,
    Alexander

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •