You can manually update the Knowledge Center database by running scripts on the database server before you run the installer to upgrade the web server.

 

To update an existing Oracle schema for Knowledge Center and all the objects, two scripts are run. One script, AlterSystemObjects, requires system administrator privileges. It updates the tablespace, the schema owner and the application user schema that has access to the schema where the Knowledge Center objects are created. The second script, AlterSchemaObjects, updates the schema objects necessary to run Knowledge Center. This script should be run by the schema owner account created from the previous installation of Knowledge Center.

 

If you are using a Microsoft SQL Server, the SQL scripts are intended to be run by an SQL administrator with either sysadmin or a combination of securityadmin and dbcreator privileges. The database objects creation does not necessarily require these privileges and could be performed by the user with db_owner privileges of the database. This would require modifications to the SQL scripts.

Warning: It is necessary to run the SQLPlus command line application for Oracle and the SQLCmd command line application for Microsoft SQL from the folder location that contains the script you are running. 


ProcedureTo upgrade the Oracle database manually before you upgrade the server:
 

  1. From the Windows Start menu, open a Command Prompt window.
     
  2. Using the cd command, change into the folder where the scripts are located in the software installation files; for example, if the files are located on the C: drive in a temp folder:
     
    cd c:\temp\setup\db scripts\ORACLE\KnowledgeCenter\Upgrade
       
  3. To update the schema using the AlterSchemaObjects.sql script, enter the following at the command prompt:
     
    Standard SQL*Plus syntax:
    sqlplus -s <ORACLE_ADMINISTRATOR>/<ORACLE_ADMINISTRATOR_PASSWORD>@<SERVER_INSTANCE> @"<SCRIPT_LOCATION>\<SCRIPT_NAME>" variable_value1 variable_value2 ... variable_valueN
     
    Note: The -s parameter runs SQL*Plus without SQL*Plus messaging.
     
    Run the following:
     
    sqlplus -s <ORACLE_ADMINISTRATOR>/<ORACLE_ADMINISTRATOR_PASSWORD>@<SERVER_INSTANCE> @"AlterSystemObjects.sql" <SCHEMA_OWNER> <SCHEMA_USER>
     
    The variables that need to be replaced are:
    <ORACLE_ADMINISTRATOR> - administrator user login with credentials to create tablespace, user, and so on.
    <ORACLE_ADMINISTRATOR_PASSWORD> - password for the Oracle administrator
    <SERVER_INSTANCE> - name of the Oracle server instance where the tablespace and users will be created
    <SCHEMA_OWNER> - user to be created that is the schema owner
    <SCHEMA_USER> - the application user that is create to have access to the Developer schema
     
    Example with default install parameters:
    sqlplus -s system/password@xe @CreateSystemObjects.sql KServer KServer_app
     
  4. Confirm the parameters and run the script. After the schema is created, enter exit and press ENTER to return to the prompt in the Command Prompt window.
     
  5. Next update the schema objects by running the AlterSchemaObjects.sql script. The script contains variables that are replaced with the text supplied for the values.
     
    Warning! The values must be in this order to run correctly.
     
    Standard SQL*Plus syntax:
    sqlplus -s <SCHEMA_OWNER>/<SCHEMA_OWNER_PASSWORD>@<SERVER_INSTANCE> @"<SCRIPT_LOCATION>\<SCRIPT_NAME>" variable_value1 variable_value2 ... variable_valueN
     
    Note: The -s parameter runs SQL*Plus without SQL*Plus messaging.
     
    Run the following:
     
    sqlplus -s <SCHEMA_OWNER>/<SCHEMA_OWNER_PASSWORD>@<SERVER_INSTANCE> @"AlterSchemaObjects.sql" <SCHEMA_OWNER> <SCHEMA_USER>
     
    The variables that need to be replaced are:
    <SCHEMA_OWNER> - user created that is the schema owner
    <SCHEMA_OWNER_PASSWORD> - password set for the schema owner
    <SERVER_INSTANCE> - name of the Oracle server instance where the tablespace and users are created
    <SCHEMA_OWNER> - user created that is the schema owner
    <SCHEMA_USER> - the application user that has access to the Developer schema
     
    Example with default install parameters:
    sqlplus -s KServer/password@xe @"CreateSchemaObjects.sql" KServer KServer_app
     
  6. Confirm the parameters and run the script. After the script runs, enter exit and press ENTER to return to the prompt in the Command Prompt window.
     
  7. Enter exit and press ENTER to exit the Command Prompt window.

ProcedureTo upgrade the Microsoft SQL Server database manually before you upgrade the server: 

  1. From the Windows Start menu, open a Command Prompt window.
     
  2. Using the cd command, change into the folder where the scripts are located in the software installation files; for example, if the files are located on the C: drive in a temp folder:
     
    cd c:\temp\setup\db scripts\MSSQL\KnowledgeCenter
       
  3. To upgrade the database using the AlterDBObjects.sql script. The script contains variables that are replaced with the text supplied for the values. 
     
    Warning! All variable names must be referenced for the script to run successfully.
     
    Standard sqlcmd syntax:
    sqlcmd -E -S <SERVER_NAME> -i <SCRIPTFILE> –v VARIABLE1="<VALUE1>" -v VARIABLE2="<VALUE2>"
     
    Note: The -E parameter means use an entrusted connection to the SQL Server. To use a login and password, use -U <LOGINID> and -P <PASSWORD> parameters.
     
    Run the following:
    sqlcmd -E -S <SERVER_NAME> -i AlterDBObjects.sql -v DBName="<DATABASE_NAME>"
     
    The variables that need to be replaced are:
    <SERVER_NAME> - the server instance to connect to
    <DATABASE_NAME> - the name of the database to be created that contains the tables, procedures, etc.
      
    Example with default install parameters:
    sqlcmd -E -S "sqlserver" -i "AlterDBObjects.sql" -v DBName="KMaster" 
       
  4. Confirm the parameters and run the script.
     
  5. Enter exit and press ENTER to exit the Command Prompt window.

Table of Contents  Back

Upgrade_KCenter_dbase_manually