Attribute Management > Execute the Load Switch Attribute Utility
  
Version 10.0.01
Execute the Load Switch Attribute Utility
Before You Begin
Bulk Load utilities must be run in SQLPLUS as user APTARE. The load_package utility is located in:
/opt/aptare/database/stored_procedures (Linux)
\opt\oracle\database\stored_procedures (Windows)
To assign attributes to application databases
1. Create a table in a spreadsheet, as shown in Create a CSV File of Switches, Attributes, and Values.
2. Save the table as a comma-separated file (for example, SwitchAttributes.csv).
3. Log in to the Portal server.
4. At the command line:
su - aptare
5. At the command line, launch sqlplus:
sqlplus <pwd>/<pwd>
Example: sqlplus portal/portal
6. Execute the following at the SQL prompt:
SQL> Execute load_package.loadSwitchAttributeFile('pathname_and_filename','domain_name',
san_name_col_num,switch_name_col_num,
'log_path_name',
'log_file_name','check_valid_value');
Where:
'pathname_and_filename'
Full path + filename (enclosed in single straight quotes) of the CSV file
Windows Example: 'c:\config\SwitchAttributes.csv'
Linux Example: '/config/SwitchAttributes.csv'
'domain_name'
Name (enclosed in single straight quotes) of the domain in which the host groups and hosts reside; Example: 'DomainEMEA'
san_name_column_num
Column number in the csv file where the SAN Name is listed; Example: 1
Note that the SAN Name and the Switch Name can be either column 1 or 2 of the CSV. This parameter tells the utility in which column the SAN Name will be found.
switch_name_column_num
Column number in the csv file where the Switch Name is listed; Example: 2
'log_path_name'
Full path (enclosed in single straight quotes) where the log file will be created/updated; verify that you have write access to this directory.
Optional: If a log path and filename are not specified, log records are written to scon.log and scon.err. To omit this parameter, enter: ''
Example: 'c:\config'
'log_file_name'
Log file name enclosed in single straight quotes.
Optional: If a log path and filename are not specified, entries are written to scon.log and scon.err. To omit this parameter, enter: ''
Example: 'SwitchAttributes.log'
'check_valid_value'
'Y' or 'N' enclosed in single straight quotes.
Y - Checks if the attribute value exists. If the utility determines that the attribute value is not valid, it skips this row and does not assign the attribute value to the switch object.
N - Updates without checking that the attribute value exists. This option is seldom chosen, but it is available for certain customer environments where attributes may have been created without values (with scripts that bypass the user interface).
Example:
SQL> Execute load_package.loadSwitchAttributeFile('/config/SwitchAttributes.csv', 'DomainEMEA', 1, 2,'/config/logs', 'SwitchAttributes.log', 'Y');
7. Check the log file for status and errors.
8. Restart the Portal services so that the newly added attributes become available in the Dynamic Template Designer.
9. Go to Verify the Switch Attributes Load.