Professional Documents
Culture Documents
SAP IQ 16.0 SP 11
Document Version: 1.0 2015-12-21
Content
1.1
1.2
1.3
PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.
The SAP IQ Quick Start shows you how to deploy a single server, convert the server to multiplex, and run a
query that distributes processing across all nodes in the multiplex.
Tasks in this guide are sequential and progressive. Complete the tasks in one sequence before you progress to
the next. The time required to complete all tasks is about 20 minutes.
1.1
The first set of tasks describes how to deploy the demo database in a single-server environment.
1. Setting the Environment Variables [page 4]
SAP IQ environment variables point to different directories and file locations. Normally, the installer
automatically sets many of these variables, but if you work in a new terminal or console, you must
manually set these variables.
2. Creating the Demo Database [page 5]
The SAP IQ demo database includes sample data about a fictional company that sells athletic clothing.
Scripts that create and load the demo database are installed as part of SAP IQ Server Suite.
3. Starting SAP IQ Cockpit Server [page 6]
SAP IQ Cockpit is a Web-based tool for managing and monitoring SAP IQ servers. Run the cockpit
command to start SAP IQ Cockpit.
4. Starting the SAP IQ Cockpit Console [page 6]
Start SAP IQ Cockpit console and connect to your server.
5. Running a Sample Query [page 7]
Run a sample query against the demo database.
PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.
Procedure
1. Open a console or terminal.
2. Set <$SYBASE> to the parent installation directory.
Shell
Command
tcsh or C (csh)
SYBASE=<directory name>;
export SYBASE
Shell
tcsh or C (csh)
source $SYBASE/IQ-16_0/IQ-16_0.csh
$SYBASE/IQ-16_0/IQ-16_0.sh
Note
For additional information about environment variables, see Reference: Building Blocks, Tables, and
Procedures > File Locations and Installation Settings > Environment Variables.
PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.
Context
These instructions differ from those in the Installation and Configuration Guide. This task creates the demo
database with an absolute path in a temporary directory named myiqdemo.
Procedure
1. Change to the $SYBASE directory.
2. Create a subdirectory named myiqdemo.
This is the temporary directory for the demo database. The full path to this directory is:
$SYBASE/myiqdemo
3. Change to myiqdemo.
4. Enter:
$IQDIR16/demo/mkiqdemo.sh -absolute
The -absolute switch creates the demo database with an absolute path, which is required to convert the
demo database to multiplex. For other options, enter:
$IQDIR16/demo/mkiqdemo.sh -help
5. Start the demo database:
start_iq @iqdemo.cfg iqdemo.db
PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.
Procedure
1. Open a console or terminal.
2. Enter:
cockpit.sh
Messages on the progress of the launch appear in a command window. When SAP IQ Cockpit runs, the
command window becomes the SAP IQ Cockpit console; you can issue commands to get status
information for SAP IQ Cockpit and its ports, plug-ins, and services.
Prerequisites
Install Adobe Flash Player in the browser you will use for SAP IQ Cockpit.
Context
This Quick Start uses the placeholder <localhost> to identify the host. When you see this placeholder in any
instruction, substitute your host name.
PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.
Procedure
1. Open a Web browser and enter this address:
https://<localhost>:4283/cockpit/#
2. Select <localhost>_iqdemo from the list.
3. Enter the user name DBA or dba (case-insensitive) and the password sql (case-sensitive) and click Log In.
Procedure
1. In SAP IQ Cockpit, click the EXPLORE tab.
2. In the left pane, click IQ Servers.
3. In the right pane, select <localhost>_iqdemo, click the arrow to the right of the name, and select
Execute SQL.
4. In the SQL Statements window, enter:
SELECT
SalesOrders.ID,
SalesOrders.OrderDate,
Customers.CompanyName
FROM SalesOrders
KEY JOIN Customers
WHERE OrderDate > '1994/01/01'
ORDER BY OrderDate
5. Click Execute to run the query.
Multiple rows of data are returned.
6. Click Close.
PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.
1.2
Prerequisites
Register and authenticate your <localhost>_iqdemo> server in SAP IQ Cockpit.
Procedure
1. Click the arrow to the right of <localhost>_iqdemo and select Add Secondary Servers.
2. Type a name for the new multiplex. For this Quick Start, use <localhost>_iqdemo_mpx>.
3. On the Server Definitions page, click Add and specify options.
Option
Description
Server name
PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.
Option
Description
Database path
myiqdemo/w1/iqdemo_w1.db .
SAP IQ Cockpit agent port
Role
Status
Raw device
myiqdemo/w1/iqdemo_w1.iqtmp . Deselecting
Raw device automatically populates the field with the
required path.
Local temp dbspace size (MB)
PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.
The secondary server definition appears on the list and the definition is validated. If the definition contains
any error, a red "X" appears. To determine the cause of the errors, position the mouse over the red "X."
Details of the error appear. To correct the errors, select the definition and click Edit. Correct the errors
and click OK; the definition is revalidated. When the definition is error free, a green checkmark appears,
and the Next button becomes available.
5. On the Execution page, click Execute.
6. Click Close.
7. Log out and back in. Select <localhost>_iqdemo_mpx> from the list. Use the same credentials as for
the original <localhost>_iqdemo>.
Related Information
Starting the SAP IQ Cockpit Console [page 6]
Prerequisites
The coordinator and writer are running.
Context
Because we want to load the same data we used to create the demo database, the sample LOAD scripts
include a TRUNCATE statement, which deletes all rows in the target table before loading the data.
Procedure
1. Enter the dbisql command to start Interactive SQL.
2. On the Connect dialog, enter:
10
PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.
Tab Name
Field
Value
Identification
Authentication
Database
User ID
Password
sql (case-sensitive)
Action
Server name
<localhost>_iqdemo>
Database name
Leave blank
3. Click Connect.
4. Enter and execute:
TRUNCATE TABLE Contacts;
LOAD TABLE Contacts (ID, Surname,GivenName,
Title, Street, City, State, Country, PostalCode,
Phone, Fax, CustomerID)
USING FILE '../IQ-16_0/demo/adata/contact.dat'
ROW DELIMITED BY '|'
ESCAPES OFF;
COMMIT;
Enter the full path to the data file on a single line. The Contacts table is loaded on the coordinator.
5. Disconnect from <localhost>_iqdemo.
6. Connect to the writer. On the Connect dialog, enter:
Tab Name
Field
Value
Identification
Authentication
Database
User ID
Password
sql (case-sensitive)
Action
Server name
<localhost>_iqdemo_w1>
PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.
11
1.3
In a multiplex environment, the query optimizer breaks complex queries into fragments and distributes the
fragments to different nodes for processing.
Distributing a query involves a leader node and one or more worker nodes. A query originates on the leader
node. A worker node can be any node in the multiplex that can accept some of the query processing work. Any
multiplex node type (reader, writer, or coordinator) can be a leader or a worker node.
The query optimizer determines whether to distribute the query. To distribute the query, the leader node
breaks the query into parallel fragments and assigns the fragments to the worker nodes. The workers process
the fragments and return the intermediate results. Queries that are unlikely to scale appropriately or degrade
performance are not distributed; they are executed on a single node in the multiplex.
This part of the Quick Start shows how to change the multiplex to accommodate a large volume of data and
run a distributed query.
Prerequisites
You are logged in to <localhost>_iqdemo_mpx in SAP IQ Cockpit as DBA user.
12
PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.
Context
This Quick Start uses the placeholder <localhost> to identify the host. When you see this placeholder in any
instruction, substitute your host name.
Procedure
1. In SAP IQ Cockpit, click the EXPLORE tab.
2. In the left pane, expand
IQ Servers
Space Management
Description
Logical name
Raw device
Click to deselect.
Path to the physical file on disk. Accept the path displayed when Raw device is unse
lected.
<pathname>/myiqdemo/shared_temp.iqtmp.
File size
300MB.
Reserve size
90MB.
Mode
Select Read/Write.
PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.
13
Procedure
1. In SAP IQ Cockpit, click the EXPLORE tab.
2. In the left pane, expand
IQ Servers
Space Management
3. In the right pane, select IQ_SYSTEM_MAIN, click the arrow to the right of the name and select Properties.
4. On the Properties page, change the Modify file size to 200.
5. Click Apply, then OK.
Context
This task includes two scripts that load and query a significant amount of sample data (10 million rows). The
first script creates and loads a fact table and a dimension table. The second script runs a query that fetches 3
rows, and generates a query plan in the coordinator and write server directories.
Note
Depending on your system configuration and amount of data, SAP IQ may choose a query plan that does
not distribute to the write server.
14
PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.
Procedure
1. Enter the dbisql command to start Interactive SQL.
2. On the Connect dialog, enter:
Tab Name
Field
Value
Identification
Authentication
Database
User ID
Password
sql (case-sensitive)
Action
Server name
<localhost>_iqdemo>
Database name
iqdemo
Host
<localhost>
Port
2638
Network
3. Click Connect.
4. In Interactive SQL, click
File
Open .
File
Open .
PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.
15
Query Tree
A query tree represents the querys data flow, and the query tree consists of nodes that represent a stage of
work. Each node has a name and a data flow operator (DFO) number. All nodes in the tree are hyperlinked to
more detailed information.
The lowest nodes on the tree are leaf nodes. Each leaf node represents a table or a prejoin index set in the
query. At the top of the plan is the root of the operator tree. Information flows up from the tables and through
any operators representing joins, sorts, filters, stores, aggregation, and subqueries.
The three vertical bars that connect the query operators indicate distribution. For example, between the group
by node and the join, the three bars indicate that this operation occurs over parallel threads and is distributed
over multiple servers. The operation between the join and leaf #01 is also distributed.
Note
For additional information about query plans, see the Performance and Tuning Guide.
16
PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.
Coding Samples
Any software coding and/or code lines / strings ("Code") included in this documentation are only examples and are not intended to be used in a productive system
environment. The Code is only intended to better explain and visualize the syntax and phrasing rules of certain coding. SAP does not warrant the correctness and
completeness of the Code given herein, and SAP shall not be liable for errors or damages caused by the usage of the Code, unless damages were caused by SAP
intentionally or by SAP's gross negligence.
Accessibility
The information contained in the SAP documentation represents SAP's current view of accessibility criteria as of the date of publication; it is in no way intended to be
a binding guideline on how to ensure accessibility of software products. SAP in particular disclaims any liability in relation to this document. This disclaimer, however,
does not apply in cases of wilful misconduct or gross negligence of SAP. Furthermore, this document does not result in any direct or indirect contractual obligations of
SAP.
Gender-Neutral Language
As far as possible, SAP documentation is gender neutral. Depending on the context, the reader is addressed directly with "you", or a gender-neutral noun (such as
"sales person" or "working days") is used. If when referring to members of both sexes, however, the third-person singular cannot be avoided or a gender-neutral noun
does not exist, SAP reserves the right to use the masculine form of the noun and pronoun. This is to ensure that the documentation remains comprehensible.
Internet Hyperlinks
The SAP documentation may contain hyperlinks to the Internet. These hyperlinks are intended to serve as a hint about where to find related information. SAP does
not warrant the availability and correctness of this related information or the ability of this information to serve a particular purpose. SAP shall not be liable for any
damages caused by the use of related information unless damages have been caused by SAP's gross negligence or willful misconduct. All links are categorized for
transparency (see: http://help.sap.com/disclaimer).
PUBLIC
2015 SAP SE or an SAP affiliate company. All rights reserved.
17
www.sap.com/contactsap