Creating a Database for Oracle. Sage SalesLogix Sage SalesLogix 8.0
广告
广告
Appendix A
Creating a Database for Oracle
Before beginning this chapter...
Verify you have installed the prerequisites and created and shared the logging folders as
described in Chapter 2, “Preparing Your Environment”
.
Sage recommends having an experienced Oracle database administrator (DBA) to properly administer, tune, and maintain the Sage SalesLogix database, especially in a UNIX environment. The Sage SalesLogix Planning Guide provides a discussion of the Oracle database platform and implementation considerations.
The instructions in this chapter are provided as an example of creating an Oracle database for Sage SalesLogix. This information can be safely used in a demonstration environment. For production systems, your Oracle DBA may use the information in the Sage SalesLogix scripts as an example, but the database should be created by your DBA specifically for your environment.
To create a database for Oracle, you must do the following:
1. Create an Oracle database instance
2. Create a Net Service Name
3. Configure the Oracle database
4. Import the database structure
5. Index the database
6. Add database views
Creating an Oracle Database Instance
Refer to your Oracle documentation to create a database on UNIX. In a demonstration environment, you can accept the Oracle defaults for the Sage SalesLogix database.
Ensure the Sage SalesLogix database is placed in its own instance.
Creating a Net Service Name
After creating the database instance, you must create a Net Service Name (also called database alias).
Refer to the Oracle documentation for instructions to create a database alias.
Configuring the Oracle Database
After creating the database instance and Net Service Name, you must configure the database for Sage SalesLogix. This process is automated using scripts provided by Sage SalesLogix.
Depending on your Oracle version, use SQL *Plus Worksheet or SQL Developer to perform the following tasks:
• Create permanent, temporary, and index tablespace and data files.
Sage SalesLogix Implementation Guide v8.0
125
Creating a Database for Oracle
• Create an Oracle database login.
You must run the scripts used to complete these tasks in a specific order. If you do not run the scripts in the order outlined in the following sections, they do not work.
When running the scripts, you must log on with the Oracle sysdba option. Log on as “sys” with the Connect as option set to sysdba.
Due to legacy requirements of an earlier database platform, the name of the Sage
SalesLogix schema owner is sysdba.
Creating Tablespaces and Data Files
A tablespace logically organizes data in an Oracle database, while physically storing the data in one or more associated data files. To use Oracle with Sage SalesLogix, you must create the permanent (SLX_DATA), temporary (SLX_TEMP), and index (SLX_INDEX) data files.
The CreateOracleSpace.sql script must be run as the sys user using the sysdba role.
To create
1. Open the CreateOracleSpace.sql script.
The script is located in the Database\Oracle folder on the Sage SalesLogix media.
2. Modify the Tempfile and Datafile paths as appropriate for your environment.
If necessary, you can also modify the script to ensure that tablespace and data files are sized correctly.
3. Log on to SQL *Plus Worksheet or SQL Developer.
4. In the Login Information dialog box: a. In the Username box, type sys.
b. In the Password box, type the corresponding system password.
c. In the Service box, type the name of the database instance.
d. Verify that Connect As is set to sysdba.
e. Click OK.
5. On the File menu, click Open.
6. Browse to the CreateOracleSpace.sql script.
7. To load the script into the Query section, click Open.
8. To run the script, click Execute.
9. Run the script as described in the following section to create the database login.
Creating the Database Login
To connect to an Oracle database, a user must have a login name in the database and privileges to perform specific database operations. Since Sage SalesLogix uses sysdba to log on to the Oracle database, you must create a new login for the sysdba user and grant the appropriate privileges.
The CreateOracleUser.sql script must be run as the sys user using the sysdba role.
126 Sage SalesLogix Implementation Guide v8.0
Creating a Database for Oracle
To create
1. Open Oracle SQL *Plus Worksheet or SQL Developer.
2. On the File menu, click Open.
3. Browse to the CreateOracleUser.sql script.
The script is located in the Database\Oracle folder on the Sage SalesLogix media.
4. To load the script into the Query section, click Open.
5. To run the script, click Execute.
After creating the database login, you must import the database structure. Do not change the sysdba password before importing the database structure. If you change the password prior to importing the database structure, the import fails.
Importing the Database Structure
Sage SalesLogix uses a DMP file to import the database structure into the Oracle database.
The DMP file copies the default views, pick lists, reports, plugins, and other system information to the Oracle database. The DMP files are located in the Database\Oracle folder on the Sage SalesLogix media.
The SLX_Blank.dmp file creates the blank Sage SalesLogix database. To create an evaluation database, run the SLX_Eval.dmp file.
Before importing the database structure, do the following:
• If running Oracle on UNIX, FTP the DMP file(s) to the Oracle Server.
• If running Oracle on Windows, copy the DMP file(s) to the Oracle Server.
To import
1. On the Oracle Server, open a command window.
2. Type imp USERID='sys/sys_password@database_instance_name AS SYSDBA' fromuser=sysdba touser=sysdba grants=n statistics=none ignore=y file=absolute path to the location of the .dmp file\SLX_Blank.dmp.
For example, if the database instance name is SLX, and it is located in the
C:\Oracle\Databases folder, the command line would be imp USERID=’sys/sys_password@SLX AS SYSDBA’ fromuser=sysdba touser=sysdba grants=n statistics=none ignore=y:
FILE=C:\Oracle\Databases\SLX_Blank.dmp
Indexing the Database
After importing the database using the DMP file, you must create Oracle-centric indexes in the appropriate tablespace. The CreateOracleIndexes file used to create the indexes can be modified as your database changes to drop or rebuild indexes as necessary.
The CreateOracleIndexes.sql script can be run as the sys user or the Sage SalesLogix user “sysdba”.
To index
1. Open Oracle SQL *Plus Worksheet or SQL Developer.
2. On the File menu, click Open.
3. Browse to the CreateOracleIndexes.sql script.
The script is located in the Database\Oracle folder on the Sage SalesLogix media.
4. To load the script into the Query section, click Open.
Sage SalesLogix Implementation Guide v8.0
127
Creating a Database for Oracle
5. To run the script, click Execute
Adding Database Views
After indexing the database, you must add database views for Sage SalesLogix. The
CreateOracleViews script creates new views to improve performance. Running this script allows you to create the necessary Sage SalesLogix views without extra permissions for the sysdba user.
The CreateOracleViews.sql script must be run as the sys user using the sysdba role.
To add
1. Open Oracle SQL *Plus Worksheet or SQL Developer.
2. On the File menu, click Open.
3. Browse to the CreateOracleViews.sql script.
The script is located in the Database\Oracle folder on the Sage SalesLogix media.
4. To load the script into the Query section, click Open.
5. To run the script, click Execute.
The next step...
If you are completing task 5 of the “Required Tasks” checklist, refer to
to install Sage SalesLogix.
128 Sage SalesLogix Implementation Guide v8.0
广告