Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2007

    Unanswered: SQL1013N The database alias name or database name "S

    hi all,

    i m new guy for DB2, here i written java code for database connection, i got on error like SQL1013N The database alias name or database name "SAMPLE" could not be found. SQLSTATE=42705

    how to rectify the error, anyone help to me...

  2. #2
    Join Date
    Jan 2007
    Jena, Germany
    Create a database named SAMPLE - or catalog the database in your DB2 instance if it already exists and is not cataloged for some reason.

    You can also get an explanation for each SQL error message by issuing the following command.
    $ db2 "? SQL1013"
    Just replace the SQL message code with whatever you got. You can omit the trailing N, W, I, or C letter. It just classifies errors as "normal", "warning", "informational", or "critical", respectively. You can also omit leading 0's after the "SQL", e.g. SQL104 is the same as SQL0104.

    In your case, you get:
    SQL1013N The database alias name or database name "<name>" could
    not be found.


    The database name or alias specified in the command is not an
    existing database or the database could not be found in the
    (client or server) database directories.

    User Response:

    Ensure that the specified database name exists in the system
    database directory. If the database name does not exist in the
    system database directory, then the database either does not
    exist or the database name has not been cataloged.

    If the database name appears in the system database directory
    and the entry type is INDIRECT, ensure that the database exists
    in the specified local database directory. If the entry type is
    REMOTE, then ensure that the database exists and is cataloged on
    the database directories of the server node.

    For CREATE DATABASE with the AT NODE clause, ensure that the
    database name is in the system database directory with an entry
    type of INDIRECT and with a catalog node number that does not
    equal -1.

    Federated system users: in addition to the above, verify that
    the database names specified in SYSCAT.SERVERS are all valid.
    Correct any SYSCAT.SERVERS entry for which the database specified
    in that entry does not exist.

    sqlcode : -1013

    sqlstate : 42705
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

Posting Permissions

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