Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2004
    Posts
    111

    Arrow Unanswered: Nickname on Local DB

    Can we create a nickname for local databases?

    For example:
    SourceA and TargetB are two databases on same instance.

    SourceA has a table x.EMP

    ON TARGETB db...
    1) Created a server

    connect to TARGETb;

    create server db_SOURCEA type db2/eee version 8.1
    wrapper drda
    authorization tester1
    password "tester1"
    options(dbname 'SOURCEA');

    2) CREATE NICKNAME ON TARGETB
    connect to TARGETb;
    create nickname x.n_emp for db_sourcea.x.emp;

    ERROR:
    DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned:
    SQL1101N Remote database "sourcea" on node "" could not be accessed with the specified authorization id and password. SQLSTATE=08004

    3)db2 list db directory
    Database 8 entry:

    Database alias = TARGETB
    Database name = TARGETB
    Local database directory = /targetb_db
    Database release level = a.00
    Comment =
    Directory entry type = Indirect
    Catalog database partition number = 0
    Alternate server hostname =
    Alternate server port number =

    Database 9 entry:

    Database alias = SOURCEA
    Database name = SOURCEA
    Local database directory = /sourcea_db
    Database release level = a.00
    Comment =
    Directory entry type = Indirect
    Catalog database partition number = 0
    Alternate server hostname =
    Alternate server port number =


    Please let me the command which will allow nickname to create successful.

    Thanks
    -R

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Did you "CREATE USER MAPPING" first. TargetB needs to know how to connect to SourceA.

    HTH

    Andy

  3. #3
    Join Date
    Sep 2004
    Posts
    111

    Arrow

    Thanks Andy.

    My previous user mapping had wrong password (a typo).

    It works.

    Cheers:-)

    -R

Posting Permissions

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