Administration: Database SAP Sybase IQ 16.0 SP04 DOCUMENT ID: DC01771-01-1604-01 LAST REVISED: May 2014 Copyright © 2014 by SAP AG Or an SAP Affiliate Company
Total Page:16
File Type:pdf, Size:1020Kb
Administration: Database SAP Sybase IQ 16.0 SP04 DOCUMENT ID: DC01771-01-1604-01 LAST REVISED: May 2014 Copyright © 2014 by SAP AG or an SAP affiliate company. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. National product specifications may vary. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries. Please see http://www.sap.com/corporate-en/legal/copyright/ index.epx#trademark for additional trademark information and notices. Contents Database Administration Workflow .....................................1 Guidelines for Scheduling Data Definition Tasks ............1 System Privileges for Data Definition .............................2 Device Selection .............................................................2 Run Database Servers ...........................................................3 Starting Servers ..............................................................3 The Server Startup Utility ......................................4 The Server as a Windows Service ........................5 Command Line Switches .......................................6 Server Activity Logs ......................................................31 Naming the Server Log File .................................33 UNIX Log Files .....................................................34 Database Server Shutdown ..........................................34 When to Stop and Restart the Server ..................34 Stopping Servers .................................................34 Permissions Required to Stop the Server ............37 Operating System Session Shutdown .................38 Starting and Stopping Databases .................................38 Database Startup Guidelines ...............................38 Stopping Databases ............................................39 Starting the iqdemo Database ......................................40 Connect to Servers and Databases ...................................41 Roadmap for Connections ............................................41 Ways to Connect ...........................................................42 Connecting to the Demo Database from Interactive SQL ................................................43 How Database Status Affects Local Connections ....................................................43 Connecting to a Running Database on a Local Server ..............................................................43 Administration: Database iii Contents Connecting to a Database from Interactive SQL on UNIX ...........................................................44 Connecting from a UNIX System .........................44 Connecting from a Windows System ...................45 Connections to Embedded Databases ................46 TCP/IP protocol ...................................................47 Connecting Using a Data Source ........................50 Default Connection Parameters ...........................51 Connecting from SAP Sybase IQ Utilities ............51 Supported Connection Interfaces .................................52 Connection Status ........................................................53 How Connection Parameters Work ...............................54 Format for Connection Strings .............................55 How Applications Pass Connection Parameters .........................................................................55 Connection Parameters in ODBC Data Sources ..........55 Interactive SQL Connections ........................................56 The Connect Dialog .............................................57 Opening the Connect dialog (Interactive SQL) ....58 Drivers for Connections .......................................58 File Data Sources .........................................................58 Creating a File Data Source Using the ODBC Administrator ...................................................59 File Data Sources and Text Editors ......................59 Connections from Other Databases .............................60 Avoiding Port Number Conflicts on UNIX ............61 How to Test Connections ..............................................61 Integrated Logins ..........................................................62 Using Integrated Logins .......................................63 Security Concerns: Unrestricted Database Access .............................................................65 Temporary Public Options Provide Added Security ...........................................................66 Network Aspects of Integrated Logins .................66 Default Integrated Login Users ............................67 iv SAP Sybase IQ Contents Connection Pooling .......................................................67 Temporary Connections ................................................69 Logical Server Configuration ........................................ 70 Connections in Simplex .......................................71 Connections in Multiplex ......................................71 How to End Connections ..............................................71 Connection Logging ......................................................72 Create and Manage Databases ...........................................75 Create Databases .........................................................75 Database Creation with SQL ...............................75 IQ Main Store and IQ Temporary Store Space Management ................................................... 83 Dropping a Database ....................................................84 Disconnecting Other Users From a Database ..............84 Disconnecting from a Database in Embedded SQL .....84 Disconnecting All Connections from a Database in Interactive SQL .........................................................85 Showing System Objects in Interactive SQL ................ 85 Setting Database Options in Interactive SQL ...............85 Manage Data Storage ..........................................................87 Space Allocation ...........................................................87 Types of Dbspaces....................................................... 87 Catalog Store .......................................................89 IQ_SYSTEM_MAIN Dbspace ..............................89 Other User Main Dbspaces ................................. 90 IQ Temporary Dbspace ........................................90 IQ Shared Temporary Dbspace ...........................90 IQ Message File Dbspace ................................... 92 Space for Databases ....................................................92 Space Requirements for IQ Stores and Temporary Stores .......................................................................92 Sizing Guidelines for Main and Temporary Stores ........93 Setting Up Windows Access to Raw Devices ...............95 Viewing Access Permissions of a RAW Device ............96 Setting Permissions to a RAW Device ..........................96 Administration: Database v Contents Setting Up Symbolic Links for Raw Devices on Windows ...................................................................98 Estimating Space and Dbspaces Required ..................98 Dbspace Management Example ...................................99 Data Storage ...............................................................105 Dbfile Attributes and Operations ........................105 Dbspace Attributes and Operations ...................107 Read-only and Read-write Dbspaces and Files .......................................................................110 Cache Dbspace for Direct-Attached Storage ..............117 Creating the Cache Dbspace .............................118 Dropping the Cache Dbspace ............................119 Adding Storage to the Cache Dbspace .............119 Removing Storage from the Cache Dbspace ....120 Disabling and Reenabling the Cache Dbspace . 120 Changing the Readonly/Readwrite Status of a Cache Dbspace Dbfile ...................................121 Monitoring the Cache Dbspace .........................121 Manage Database Objects ................................................125 SAP Sybase IQ Database Design ..............................125 View Management ......................................................125 Creating Views ...................................................126 Guidelines for Using Views ................................127 Guidelines for Modifying Views ..........................128 Permissions on Views ........................................128 How to Delete Views ..........................................129 View Information in System Views .....................129 Table Management .....................................................129