Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2004
    Posts
    57

    Unanswered: How can I change the implicit schema?

    When I install db2 the server name became the host name, as I noticed.
    My computer is STEFAN and when I install DB2 I was forced to give the same name to DB2 server and to accept the user and the password same as in the network (in am in a Windows 2000 network).
    More than that, installing creates a schema too named STEFAN.
    My problem is the following.
    I made some sql files where I create the database and, after that, the database objects: tables, procedures etc. After I create the database and the tablespaces I create a schema which I would like to became the implicit schema for all the objects without being necessary to name it. AT the begginng of a sql file I write the instructions set current schema = 'x'.
    But when I create new stored procedures in development center if I forgot to name the schema DB2 always associate unnamed objects with STEFAN schema although I would like to use my x schema.
    Tekll me please, how can I change the implicit schema so all new objects to be associated with this schema I want (x schema)?
    Thanks in advanced.

  2. #2
    Join Date
    Mar 2004
    Location
    Toronto, ON, Canada
    Posts
    513
    Quote Originally Posted by AStefan
    When I install db2 the server name became the host name, as I noticed.
    My computer is STEFAN and when I install DB2 I was forced to give the same name to DB2 server and to accept the user and the password same as in the network (in am in a Windows 2000 network).
    More than that, installing creates a schema too named STEFAN.
    My problem is the following.
    I made some sql files where I create the database and, after that, the database objects: tables, procedures etc. After I create the database and the tablespaces I create a schema which I would like to became the implicit schema for all the objects without being necessary to name it. AT the begginng of a sql file I write the instructions set current schema = 'x'.
    But when I create new stored procedures in development center if I forgot to name the schema DB2 always associate unnamed objects with STEFAN schema although I would like to use my x schema.
    Tekll me please, how can I change the implicit schema so all new objects to be associated with this schema I want (x schema)?
    Thanks in advanced.
    db2 set current schema <myschema>
    --
    Jonathan Petruk
    DB2 Database Consultant

Posting Permissions

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