Quantcast
Channel: SCN : Document List - SAP IQ
Viewing all 123 articles
Browse latest View live

Switch to disallow checkout of any optional graced license

$
0
0

SAP IQ server optional license features:

 

  • IQ_CORE
  • IQ_UDA
  • IQ_LOB
  • IQ_SECURITY
  • IQ_VLDBMGMT
  • IQ_UDF
  • IQ_IDA
  • IQ_URIDA
  • IQ_TS_FSF
  • ALL

 

SAP IQ server, on attempted usage of  any optional feature would try to check out corresponding license.  If license was available, that license feature becomes available. This caused problems with unintended usage, specially during installation grace period. With this new switch implemented in SAP IQ 16 sp08 and above,  SAP IQ server will not attempt to checkout any grace license unless  it have been 'authorized' by the DBA. DBA will have to authorize using sp_iqlmconfig system stored procedure.

 

 

Syntax:

 

    sp_iqlmconfig 'allow', <license_name> [,quantity]

 

                 and

    sp_iqlmconfig 'disallow', <license_name>

 

 

  • <license_name> can be any one of above listed license optional features.
  • 'quantity'  parameter is only required to change number of available  IQ_VLDBMGMT  licenses.
  • 'ALL'  enables or disables all optional features except IQ_VLDBMGMT

 

Example:

 

   sp_iqlmconfig 'allow',  'IQ_VLDBMGMT',6 --------increase IQ_VLDBMGMT license quantity by 6

   sp_iqlmconfig 'disallow',  'IQ_VLDBMGMT' -------sets the IQ_VLDBMGMT license quantity to 0

 

 

For documentation:

 

sp_iqlmconfig Procedure - Reference: Building Blocks, Tables, and Procedures - SAP Library


Creating remote connection to MSSQL Server

$
0
0

On Linux, for creating remote connection to MSSQL Server, you will need to install unixodbc driver and MSSQL odbc driver.

 

1. download unixODBC-2.3.0.tar.gz from:

 

 

http://www.unixodbc.org/download.html

 

2.as root gunzip unixODBC-2.3.2.tar.gz

 

3. tar -xvf unixODBC-2.3.0.tar

 

4. It will create unixODBC-2.3.0 directory with all source files inside.

 

5. As root install unixODBC drivers

 

  sudo ./configure --prefix=/usr --libdir=/usr/lib64 --sysconfdir=/etc --enable-gui=no
--enable-drivers=no --enable -iconv --with-
iconv-char-enc=UTF8 --with-iconv-ucode-enc=UTF16LE

 

 

checking for a BSD-compatible install...
/usr/bin/install -c

 

checking whether build environment is sane...
yes

  checking for a thread-safe mkdir -p...
/bin/mkdir -p

 

...

...

...

   config.status: creating Makefile

config.status: creating config.h

config.status: executing depfiles commands

config.status: executing libtool commands

      

[unixODBC-2.3.0]$ sudo make

 

make
all-recursive

 

make[1]: Entering directory
`/download/unixODBC-2.3.0'

  Making all in extras

...

...

...

  make[2]: Leaving directory
`/download/unixODBC-2.3.0'

  make[1]: Leaving directory
`/download/unixODBC-2.3.0'

  [unixODBC-2.3.0]$ sudo make install

 

Making install in extras

  make[1]: Entering directory
`/download/unixODBC-2.3.0/extras'

 

...

...

...

 

make[2]: Entering directory
`/download/unixODBC-2.3.0'

  make[2]: Nothing to be done for
`install-exec-am'.

  touch /etc/odbcinst.ini

   touch /etc/odbc.ini

   mkdir -p /etc/ODBCDataSources

  /usr/bin/odbc_config --header >
/usr/include/unixodbc_conf.h

   make[2]: Leaving directory
`/download/unixODBC-2.3.0'

   make[1]: Leaving directory
`/download/unixODBC-2.3.0'

 

6. download Microsoft ODBC driver and install odbc driver as root:

 

http://www.microsoft.com/en-us/download/details.aspx?id=36437

 

 

7.tar xvzf msodbcsql-11.0.2270.0.tar.gz

 

msodbcsql-11.0.2270.0/

msodbcsql-11.0.2270.0/include/

msodbcsql-11.0.2270.0/include/msodbcsql.h

msodbcsql-11.0.2270.0/bin/

msodbcsql-11.0.2270.0/bin/SQLCMD.rll

msodbcsql-11.0.2270.0/bin/BatchParserGrammar.dfa

msodbcsql-11.0.2270.0/bin/BatchParserGrammar.llr

 

...

...

...

 

 

msodbcsql-11.0.2270.0/LICENSE

msodbcsql-11.0.2270.0/README

msodbcsql-11.0.2270.0/docs/

msodbcsql-11.0.2270.0/docs/en_US.tar.gz

 

 

8. To discover location of odbcinst.ini, execute

odbc_config --odbcinstini

 

 

  /etc/odbcinst.ini

 

 

9. sudo ./install.sh verify

   Microsoft ODBC Driver 11 for SQL Server Installation Script

  Copyright Microsoft Corp.

  Starting install for Microsoft ODBC Driver 11 for SQL Server

  Checking for 64 bit Linux compatible OS
..................................... OK

  Checking required libs are installed
........................................ OK

  unixODBC utilities (odbc_config and odbcinst)
installed ..................... OK

  unixODBC Driver Manager version 2.3.0
installed ............................. OK

...

...

...

 

10. sudo ./install.sh install

 

Microsoft ODBC Driver 11 for SQL Server Installation Script

  Copyright Microsoft Corp.

Starting install for Microsoft ODBC Driver 11 for SQL Server

...

...

...


Microsoft ODBC Driver 11 for SQL Server registered ................... INSTALLED

Install log created at/tmp/msodbcsql.24576.20698.22397/install.log.

One or more steps may have an *. See README for more information regarding these steps.

 

11. Edit /etc/odbc.ini and add mssqlserver

 

e.g

  [SQLEXPRESS]

     Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2270.0

     Server=myhost,9856

     Database=master

     Threading=1

     UsageCount=1

 

12. set LD_LIBRARY_PATH  environment variable  to MSSQL server libraries in IQ-16_0.csh

         

    setenv LD_LIBRARY_PATH "/opt/microsoft/msodbcsql/lib64:$LD_LIBRARY_PATH"

 

 

13. set ODBCINI and ODBCHOME Environment variables

 

  setenv ODBCINI "/etc/odbc.ini"

    setenv ODBCHOME "/etc/"

 

14. Restart IQ Server

 

15. dbisql -c 'dsn=redhead_iq1603smx' -nogui

 

(DBA)> create server SQLEXPRESS class 'MSSODBC' using 'dsn=SQLEXPRESS'

  Execution time: 0.043 seconds

 

(DBA)> create externlogin DBA to SQLEXPRESS remote login "sa" identified by "mssqlpass"

Execution time: 0.008 seconds

 

(DBA)> forward to SQLEXPRESS

  0 row(s) affected

  Execution time: 0.006 seconds

(DBA)> select @@version

  expr_1

 

--------------------------------------------------------------------------------

 

Microsoft SQL Server 2008 R2 (SP2) -
10.50.4000.0 (X64)

      
Jun 28 2012 08:36:30

      
Copyright (c) Microsoft Corporation

     
Express Edition with Advanced Services (64-bit) on Windows NT 6.1
<X64>

  (Build 7601: Service Pack 1)

 

   (1 rows)

 

Execution time: 1.902 seconds

 

(DBA)> create existing table t1 at 'SQLEXPRESS.master..t1'

 

Execution time: 7.31 seconds

 

(DBA)> select * from t1

       
col1

  -----------

      
1

        
2

(2 rows)

 

Execution time: 0.159 seconds

Problem about installation an IQ16 on AIX.

$
0
0

I have a customer who has a problem to install IQ16 SP08 on AIX.

Ct tried to install with other version and machine.

 

But it’s returned same errors like below.

 

Os : oslevel –r : 7100-03

 

[Error]

 

  • Start_iq –v2

       16.0.0.656  Unknown version – IQ library could not be loaded

  • Dbisql –c xxxx

         Unable to start specified database: Could not find or load the physical store DLL.

[Solution]

 

Please refer to below KBA.

2011336 - SAP Sybase IQ gets an error Unable to start specified database: Could not find or load the physical store DLL


Thanks

Gi-Sung Jang

Problem about installation an IQ16 on AIX.

[SAP IQ] A sub-capacity license problem in IQ.

$
0
0
Symptom

 

IQ failed to check-out due to invalid hostid error event though license file has a correct hostid.
[Error]
  Failed to obtain license(s) for IQ_CORE feature from license file(s) or server(s).
  Invalid host. The hostid of this system does not match the hostid specified in the license file. Unserved licenses can only be used on the
host for which the license was generated.
  If the license is intended for use on this machine then you need to check-in the license and regenerate it using the host id for this machine.
 
The hostid of this system does not match the hostid
specified in the license file.
  License feature name:  IQ_CORE
  License hostid:        PARTITION-ID=8000054CC0700002
  License search path:   /sybase/iq15/SYSAM-2_0/licenses/DBPACR01_CORE.lic:/sybase

Reproducing the Issue

 

 

There are steps to reproduce.

 

1. To get partition-level information, enter:

     -> sysamcap PARTITION

 

2. Set the SYBASE_SAM_CAPACITY environment variable to the value reported by sysamcap without set or export.
  [.profile]
   SYBASE_SAM_CAPACITY=PARTITION:5BE2710DC0A499FF1A074D9CBA94788E1DE271F04D8007FC1FCE93A5E8306A12E40913367DAA8CDA26572F4066E5C03310

3. Generate with partition id
    - PARTITION-ID=8000054CC0700002

 

4. IQ failed to checkout even though license has a correct host id.

 

Cause

 

In case of sub-capacity license, set the SYBASE_SAM_CAPACITY environment variable to the value reported by sysamcap correctly.
We can see the information of diagnosis using sysam utility when SYBASE_SAM_CAPACITY variable is not defined correctly.

 

[sysam diag]
    "IQ_CORE" v2016.05310, vendor: SYBASE    uncounted nodelocked license, locked to Vendor-defined "PARTITION-ID=8000054CC0700002"

     starts: 1-jan-1990,  no expiration date
     ...
  This license cannot be checked out because: Everything is okay except possibly the hostid, which is a non-standard,

   vendor-defined hostid, that lmdiag can't verify

 

Resolution

 

The SYBASE_SAM_CAPACITY environment variable should be defined by set or export like below.

 

ex) export SYBASE_SAM_CAPACITY=PARTITION:5BE2710DC0A499FF1A074D9CBA94788E1DE271F04D8007FC1FCE93A5E8306A12E40913367DAA8CDA26572F4066E5C03310

If it does support sub-capacity then IQ should report the same message as cpuinfo when the environment variable is set, i.e.

 

[cpuinfo -v ]
   ...
    Licensing capacity set to PARTITION  licensing. All product instances running on acrdbp01  (HOSTID=PARTITION-ID=8000054cc0700002)

    will share   licenses. License quantities are based on 88 logical processor(s), 22 core(s) in 3 chip(s).
   ,,,

 

Thanks

Gi-Sung Jang

Configuring PAM User Authentication

$
0
0

SAP IQ 16 sp08 and above now supports PAM User Authentication(PAMUA). Pluggable Authentication Module(PAM) is an centralized authentication system available on most Unix and Linux platforms and it provides a generic common interface to multiple low-level authentication schemes.  To configure PAM on your system,  you will need see your operating system documentation. The libpam.so[a] dynamic library must be installed on your system. SAP IQ sp08 documentation does provide sample pam authentication program(pamclient) for setting up and and testing PAM authentication on your system without SAP IQ Server.


Sample PAM Authorization Program - Administration: User Management and Security - SAP Library

 

pamclient program can be compiled and then tested on your system.

 

Two executables pamtest.so(PAM Server Authentication Module) and pamclient(sample test program, which can be used to test pamtest.so,  to confirm that is installed correctly).

 

Linux;
pamtest.so must be copied to /lib64/security/pamtest.so

 

and as root create pamtest file in /etc/pam.d

 

[pam.d]$ cat pamtest

auth    required        pamtest.so

account required        pamtest.so

 

Test:

 

[root@myhost pam.d]# echo + bob bobspwd > /tmp/pamtest.ctl

[root@myhost pam.d]#  pamclient bob bobspwd pamtest

#0 Authenticated user "bob" using service pamtest.

[root@myhost pam.d]# cat  /tmp/pamtest.ctl

+ bob bobspwd

[root@myhost pam.d]# rm /tmp/pamtest.ctl

 

For passwd service, make sure passwd service has correct entries:

 

[@hostname pam.d]$ cat passwd

#%PAM-1.0

auth       include      system-auth

account    include      system-auth

password   substack     system-auth

#-password   optional    pam_gnome_keyring.so


Configure PAM authentication in SAP IQ Server:

 

[@myhost  pam.d]$ dbisql -c 'uid=DBA;pwd=sql;eng=demo0801' -nogui

(DBA)> create login policy usepam pam_service_name = sshd pam_failover_to_std=on;
Execution time: 0.105 seconds

(DBA)> create user myuser login policy usepam
Execution time: 0.026 seconds

(DBA)> exit
[@myhostpam.d]$ dbisql -c 'uid=myuser;pwd=xxxxxxx;eng=demo0801' -nogui

(myuser)> quit

 

 

Note: login_mode option should be set as temporary option , every time you (re)start the database the login_mode will be reset back to its public setting…. So if you are setting login_mode to include PAMUA using a temporary setting then you will need to (re)set the temporary login_mode setting each time you start the database.  (This is precisely the point of using a temporary option when using PAMUA, Kerberos, integrated login, etc – it gives added security so that someone that gets a copy of your database cannot force a login into the database since they will not have DBA permissions to set the login_mode).

Login Redirection

$
0
0

Login Redirection feature in SAP IQ 16 allows load balancing by redirecting login connecting to overloaded node to less node in the same logical server. Login Redirection can be controlled by using login server policy options:

 

                    - LOGIN_REDIRECTION

                    - REDIRECTION_WAITERS_THRESHOLD

 

For information related to these options see:

 

 

                 http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc01839.1602/doc/html/jan1292624444594.html

 

         

                 http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc01839.1602/doc/html/jan1328621506262.html

           

Steps to setup Login Redirection:


In my setup, I have iq1602c, iq1602q1, iq1602q2, and iq1602q1 and iq1602q2 are members of logical server ls1

 

[sybase@myhost]$ dbisql -c 'dsn= iq1602c' -nogui

 

(DBA)> CREATE LOGICAL SERVER ls1 MEMBERSHIP (iq1602q1,iq1602q2);

 

  Execution time: 0.062 seconds

  (DBA)> alter ls policy root TEMP_DATA_IN_SHARED_TEMP=ON login_redirection = On dqp_enabled = 1 redirection_waiters_threshold = 5

   Execution time: 0.106 seconds

 

[sybase@myhost]$ dbisql -c 'dsn= iq1602c' -nogui

 

(DBA)> alter login policy root add logical server ls1

  Execution time: 0.059 seconds

 

we have iq1602q1 and iq1602q2 in  logical server ls1.  Now if we connect to Coordinator iq1602c,  login will be redirected to either iq1602q1
or iq1602q2.

 

dbisql -c 'uid=DBA;pwd=sql;eng= iq1602c;LS=ls1;NODETYPE=WRITER' -nogui

 

(DBA)> select @@servername

 

@@servername

 

    --------------------------------------------------------------------------------

 

iq1602q1

 

(1 rows)

   Execution time: 0.043 seconds

 

    Now for testing shutdown iq1602q1,  connection will be redirected to iq1602q2

 

dbisql -c 'uid=DBA;pwd=sql;eng= iq1602c;LS=ls1;NODETYPE=WRITER' -nogui

 

(DBA)> select @@servername

 

@@servername

     --------------------------------------------------------------------------------

 

iq1602q2


if connection redirection is enabled and login/connection  will redirect connections when:

 

  • If the connection is being made to a server which is not member of thespecified logical server
  • If there are more waiters at the gate than the specified threshold of waiters in the -iqgovern queue.
  • If the specified node type does have role different than that requested.

 

 

 

 

 

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc01839.1602/doc/html/jan1328621506262.html

Suggestions in using FP NBit Index

$
0
0

I want to share test results on FP NBit index with you and give some suggestions in using FP NBit index in IQ 16.0.

This document was written to guide our customers to be able to maintain the NEW FP NBit indexes more efficiently.

 

[ FP NBit ]

Continuous NBit dictionary compression replaces 1, 2, and 3 byte dictionary compression as the default column storage mechanism in 16.0.

All datatypes except LOB (character and binary) and BIT datatypes can be NBit columns.

 

[ Test Scenario ]

 

Checked the FP index type on the l_orderkey & l_partkey column depending on specifying IQ Unique Constraint.

Investigated the FP index type after changing values of the NBIT FP options and executing DML operations.

The test table was dropped and recreated whenever each test were completed.

 

[ Table Information ]

Test Outline.PNG

Initial loading.png

 

[ Error ]

An error was occurred when :
Setting FP_NBIT_ENFORCE_LIMITS Option to 'ON' and value of IQ UNIQUE constraint of a column was bigger than FP_NBIT_AUTOSIZE_LIMIT option.
Above values are commonly less than the cardinality of the column as well.

 

I. 08/11 02:24:51. 0000007077 [20897]:  9000000 Rows, 1 Seconds
I. 08/11 02:24:51. 0000007077 Exception Thrown from slib/s_dpNBit.cxx:3054, Err# 303, tid 181 origtid 181
I. 08/11 02:24:51. 0000007077    O/S Err#: 0, ErrID: 4098 (db_sqlexception); SQLCode: -1013124, SQLState: 'QDD32', Severity: 14
I. 08/11 02:24:51. 0000007077 [22154]: NBIT Column l_partkey exceeded token limit of 1980000
-- (slib/s_dpNBit.cxx 3054)

 

Even if a column has a FP NBit index, the above error can be occurred when the cardinality of the column become greater than the value of IQ Unique constraint.

 

[ Suggestions ]

 

1. In order to create FP NBit Indexes, you should satisfy one of following condistions.
          ● Without regarding to FP_NBIT_ENFORCE_LIMITS Option, the value of IQ UNIQUE constraint or FP_NBIT_AUTOSIZE_LIMIT Option is greater than the real cardinality of a column.
          ● FP_NBIT_ENFORCE_LIMITS is set to ‘OFF' and the value of IQ UNIQUE constraint is greater than FP_NBIT_AUTOSIZE_LIMIT
          ● A table is created without specifying IQ UNIQUE constraints and FP_NBIT_AUTOSIZE_LIMIT Option is greater than the real cardinality of a column,  and Dictionary Size of the column is less than FP_NBIT_LOOKUP_MB Option.

 

     You can see the dictionary size on a column by running sp_iqindexmetadata procedure as below.

 

sp_iqindexmetadata.PNG

 

 

2. Please keep an imporatant thing in manual below in mind when you specify an IQ UNIQUE constraint.

"Using IQ UNIQUE with an n value less than the FP_NBIT_AUTOSIZE_LIMIT is not necessary.
Auto-size functionality automatically sizes all low or medium cardinality columns as NBit.
Use IQ UNIQUE in cases where you want to load the column as Flat FP or when you want to load a column as NBit when the number of distinct values exceeds the FP_NBIT_AUTOSIZE_LIMIT."

 

3. I think it is desirable to set FP_NBIT_ENFORCE_LIMITS Option to 'OFF' so that you could avoild the error "s_dpNBit.cxx:3054".
For columns having integer family data types which do not have special meaning for indexing, such as (unsigned)bigint, numeric and float, it's good to use IQ UNIQUE(0) in order to create a flat FP index from the beginning.


4. You should also consider the value of "-iqlm" switch in a configuration file.
In case there are so many FP NBit indexes running in memory, you may encounter an error below.

 

I. 8/15 02:47:49. 0000000013 Exception Thrown from slib/s_dpNBit.cxx:252, Err# 13, tid 2 origtid 2
I. 8/15 02:47:49. 0000000013 O/S Err#: 0, ErrID: 517 (hos_memexception); SQLCode: -1013130, SQLState: 'QBC75', Severity: 14
I. 8/15 02:47:49. 0000000013 [22160]: All IQ large memory has been used, allocation canceled [size: 11430208]

 

If there are many concurrent DML transaction running, it will be better to lower the value of FP_NBIT_LOOKUP_MB option so that the large memory could not be exhausted.

 

[ See also ]

 

Please refer to the manual pages for details about database options below related to FP NBit maintenance.


● FP_NBIT_AUTOSIZE_LIMIT limits the number of distinct values that load as NBit
http://help.sap.com/saphelp_iq1608_iqrefso/helpdata/en/a8/73755184f21015a76ff1329f851c5d/content.htm


● FP_NBIT_LOOKUP_MB sets a threshold for the total NBit dictionary size
http://help.sap.com/saphelp_iq1608_iqrefso/helpdata/en/a8/73a52f84f2101588a9c5a2df1d1389/content.htm


● FP_NBIT_ROLLOVER_MAX_MB sets the dictionary size for implicit NBit rollovers from NBit to Flat FP
http://help.sap.com/saphelp_iq1608_iqrefso/helpdata/en/a8/73d4b984f2101592ac80c2eed3effc/content.htm


● FP_NBIT_ENFORCE_LIMITS enforces NBit dictionary sizing limits. This option is OFF by default
http://help.sap.com/saphelp_iq1608_iqrefso/helpdata/en/a8/74045684f21015abbbd6b7d63613e5/content.htm

 

If you find an incorrect information or you have different opinions on this item,  please let me know.

 

Thanks

Jerry

[SAP IQ] How to get the full command of grant.

$
0
0

Hi,

 

We some times need to get the full command of grant not one by one.

 

Here is a procedure to get the full command of grant.

 

Steps to get the full sentences from procedures.

 

1) Create procedure "grant_all_tables"

2) Execute a procedure with parameters.

    Get the full commands of "grant select on the DBA's tables to user gjang":

 

    Ex) call grant_all_tables('select','DBA','%','gjang');

 

3) copy the grant command and execute a grant command.

 

* grant type : 'select, insert, update, delete, all'

* table pattern : % -> all tables

 

I uploaded a procedure "grant_all_tables".

I have tested in IQ12.7/15.x/16.x.

 

Thanks

Gi-Sung Jang


IQ_VLDBMGMT not showin in sp_iqlmconig.

$
0
0

1. Problem

 

A IQ_VLDBMGMT license is not shown in sp_iqlmconfig in spite of purchased proper VLDB licenses.

 

[sp_iqlmconfig]

...

Optional license in use: IQ_VLDBMGMT

    > No

IQ_VLDBMGMT License Count in use

    > 0

 

So customer tried to enable the IQ_VLDBMBMT license using sp_iqlmconfig, but customer is getting the error.

   > sp_iqlmconfig 'allow', 'IQ_VLDBMGMT', 10

 

[Error]

   Could not execute statement.

   Wrong number of parameters to function 'sp_iqlmconfig'

   SQLCODE=-154, ODBC 3 State="42000"

   Line 1, column 1

 

2. Cause

 

 

A "sp_iqlmconfig" you executed is not upgraded yet  to support the IQ16 SP08 new syntax.

Because customer forgot to execute a "alter database upgrade" command.

 

 

The ALTER DATABASE statement upgrades databases created with earlier versions of the software. This applies to maintenance releases as well as major releases.

When you upgrade a database, SAP Sybase IQ makes these changes:

1) Upgrades the system tables to the current version.

2) Adds any new database options.

3) Enables new features in the current version

 

3. Resolution

 

Need to execute an "alter database upgrade" when upgrading an IQ.

We can see the upgrade history through syshistory like below.

 

[syshistory]

operation,object_id,sub_operation,version,platform,first_time,last_time,details

'UPGRADE',0,'','16.0.0.807','Linux 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:3','2014-09-03 09:31:59.000','2014-09-03 09:32:34.000',CA=1FE38EF000D001FEDFF7FDD;

Step to Install IQ16.0 SP08 64bit on OS Windows Server Enterprise 2007 64bit Service Pack2 :

$
0
0

Hi Team,

 

This document may be necessaryfor those whohave problemswithinstallation IQ16.0 SP08 64bitonWIndows.

 

 

Attach files: Step to Install IQ16.0 SP0864bit

This ispart of the installbecause youcan choose to continue and installSAPControl Centeror Cockpit Server

 

After you can directlyapplythe update e.g:PL03

 

Regards,

Claude

How to see the current IQ database version and migration history since initialization?

$
0
0

Context:

 

 

Sometimes after new IQ server upgrade, we experience unusual errors or uncommon behavior when trying to execute a system procedure or setting an option.

 

For example, you may get unexpected syntax errors,  system procedure doesn't
exist, or option doesn't exist.

 

If you are in that case, then you first need to check whether the database is actually migrated to IQ server level where the commands in question are
supported and expected to work.

 

Follow steps below:

 

1- Connect to database as DBA

 

2- Get the current server full version : select @@version

 

2- Execute query

 

select substring(operation,1, 12) as operation, substring(version,1, 12)
as version,  first_time, last_time, substring(platform,1, 20) as platform
from SYSHISTORY
order by  last_time ;

 

3- See "version" values. If 'UPGRADE "version" and 'LAST_START' "version" are
not the same, then the database is not upgraded to current server version.

 

If  no 'UPGRADE' in the result, then compare INIT with LAST_START.

 

INIT : Information about when the database was created.

 

START :  Information about when the database was started using a specific
version of the database server on a particular operating system.

 

UPGRADE : Information about when the database was upgraded.

 

LAST_START : Information about the most recent time the database server was
started. A LAST_START operation is converted to a START operation when the
database is started with a different version of the database server and/or on a
different operating system than those values currently stored in the LAST_START
row.

 

4- If the database is NOT migrated, then it belongs to DBA to decide to
migrate or not. The reason of keeping the database could be the need to
start/use it with previous server version in other environments or ability of
rolling upgrade.

 

5- To migrate the database go though Migrating database steps from SAP IQ
manuals or in SP/EBF readme .

 

 

Example from iqdemo 16 on Linux:

 

select @@version

 

SAP IQ/16.0.0.807/140507/P/sp08/Enterprise Linux64 - x86_64
- 2.6.18-194.el5/64bit/2014-05-07 18:02:42

 

select substring(operation,1, 12) as operation, substring(version,1, 12)
as version,  first_time, last_time, substring(platform,1, 20) as platform

from SYSHISTORY
order by  last_time

 

operation,version,first_time,last_time,platform
'INIT','16.0.0.653','2014-02-13
13:54:16.000','2014-02-13 13:54:16.000','Linux
2.6.32-131.0.1'
'START','16.0.0.653','2014-02-13 05:54:18.000','2014-08-08
09:12:21.000','Linux 2.6.32-131.0.1'
'START','16.0.0.807','2014-08-08
09:12:21.000','2014-08-08 09:12:21.000','Linux
2.6.32-131.0.1'
'LAST_START','16.0.0.807','2014-08-08
09:12:21.000','2014-08-08 09:12:21.000','Linux
2.6.32-131.0.1'
'UPGRADE','16.0.0.807','2014-08-08
09:13:50.000','2014-08-08 09:13:50.000','Linux 2.6.32-131.0.1'

 

In this example, the database is created with IQ version
16.0.0.353 at '2014-02-13 13:54:16'.

 

It was last started on '16.0.0.807'   IQ
server at '2014-08-08 09:12:21'

 

then migrated to same version '16.0.0.807'  at '2014-08-08
09:13:50'

How to add new accounts with special characters.

$
0
0

1. Problem

 

A users failed to add a new accounts with special character password using sp_iqaddlogin after upgrading from IQ12.7 to IQ15.4.

> sp_iqaddlogin 'testuser_03', '+abcd#123'

  

   [Error]

   : Syntax error near '+' on line 1

 

2. Cause

 

IQ 12.X is using SA 7 where as IQ 15.x is using SA 11.

SA changed the rules on what characters one can use in an identifier without having to enclose the identifier in double quotes.

 


3. Solution

 

A user can add new accounts with password which includes special characters like below.

Password and User ID must be enclosed in double quotes or square brackets from IQ15.x.

 

 

- sp_iqaddlogin 'testuser_01', '[+abcd123]'

- sp_iqaddlogin 'testuser_04', '"+abcd123"'

 

Thanks

Gi-Sung Jang

[SAP IQ] How to enable and disable users to connect in multiplex.

$
0
0

Hi,


You can enable and disable users to connect to a specific multiplex server.

It's a different way to control the connection by version. (IQ15.2 and below versus IQ15.4 and above)

 

Login policies control the capabilities of users and connections to a database.


1. In case of IQ15.2 and below.

    The following statement creates a login policy called Reader1OnlyPolicy.

    By default, this policy prohibits access to servers:


     1) This statement allows holders of Reader1OnlyPolicy to access only server Reader1:

          - CREATE LOGIN POLICY Reader1OnlyPolicy

             LOCKED=ON;

      2) UserA is allowed to log in only on Reader1 and not on any other server in the multiplex:

         - ALTER LOGIN POLICY Reader1OnlyPolicy

           LOCKED=OFF MULTIPLEX SERVER Reader1;

          

           ALTER USER UserA LOGIN POLICY

           Reader1OnlyPolicy ;


2. In case of IQ15.4 and above.

   

    In a multiplex, login policies control access to logical servers.

    All users of a login policy can only access those multiplex servers that are effective members of the assigned logical servers.

    When you connect to a multiplex server, logical server context of the connection is determined based on the effective logical server assignment of the

    user's login policy and the current node.

   

    1) creates a user-defined logical server TEST_LS with multiplex nodes as its members:

        In case of coordinator, ... MEMBERSHIP (FOR LOGICAL COORDINATOR)

         - CREATE LOGICAL SERVER TEST_LS MEMBERSHIP (MPX154_W1);

   

    2) creates the login policy with locked is "off".

         - create login policy test_login_policy

            locked=off;

   

    3) This statement allows access of logical servers TEST_LS from login policy test_login_policy.

         - alter login policy test_login_policy set logical server TEST_LS;


    4) UserA is allowed to log in only on Reader1 and not on any other server in the multiplex:

   

         4-1)  If UserA is not created,

  - sp_iqaddlogin 'UserA', 'sybase','OFF', 'test_login_policy';

 

         4-2)  If UserA is created,

  - sp_iqmodifylogin 'UserA','test_login_policy';


See Also


1. Logical Server Configuration
  - http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc01771.1603/doc/html/san1283555365297.html

 

2. Multiplex extensions to login policy DDL
  - http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc00802.1520/html/iqmpx/iqmpx44.htm

 

3. Creating a Login Policy for a Multiplex
  - http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc01267.0327/doc/html/jcu1281720659819.html

 

4. Related System Tables
    - SYSIQLOGICALSERVER
    - SYSIQLSMEMBERS
    - SYSLOGINPOLICY
    - SYSLOGINPOLICYOPTION
    - SYSIQLSLOGINPOLICIES

 

Thanks,

Gi-Sung Jang

[MPX] Failed to drop multiplex node due to error.

$
0
0

1. Problem

 

[Environment]

    - SAP IQ16 (MPX)

 

A User failed to drop multiplex server due to below error.

 

DBA) drop multiplex server Writer1;

 

[Error]

 

SQL Anywhere Error -198: Primary key for row in table 'ISYSIQMPXSERVER'

  is referenced by foreign key 'ISYSIQMPXSERVER' in table 'ISYSIQMPXSERVERAGENT'

 

 

2. Cause

 

ISYSIQMPXSERVERAGENT table stores agent connection definitions for the specified multiplex server.

 

  Constraints :

 

  - Primary key(server_id)

  - Foreign key(server_id) references SYS.SYSIQMPXSERVER

 

 

Primary key(server_id) for row in table 'ISYSIQMPXSERVER' is referenced by foreign key 'ISYSIQMPXSERVER' in table 'ISYSIQMPXSERVERAGENT'.

 

3. Solution

 

If agent exists, Need to drop the agent before drop the multiplex server.

 

DBA) select * from SYSIQMPXSERVERAGENT.

 

  DROP AGENT Statement

  : Deletes an SAP Sybase IQ agent for SAP Control Center.

 

[syntax]

 

  DROP AGENT FOR MULTIPLEX SERVER server-name;

  Ex) Drop agent for multiplex server Writer1;

 

Thanks

 

Gi-Sung Jang

Configuring Logical Server Policies

$
0
0


In this doc we will discuss two scenario. In first scenario Coordinator is not a member of logical server and in second scenario, we Coordinator  as member in the logical Server.

 

1. First Scenario:

 

   

            Vicky_iq0801c(Coordinator) , Vicky_iq0801q1 and Vicky _iq0801q2 Writers.

 

 

$ dbisql -c 'uid=DBA;pwd=sql;eng=vicky_iq0801c' -nogui

 

 

(DBA)> create user testusr1 identified by sql

 

 

Execution time: 0.141 seconds

 

 

(DBA)> create logical server ls1 membership(vicky_iq0801q1,vicky_iqsp0801q2)  ------Create logical server ls1

 

 

(DBA)> create ls policy lsp1  REDIRECTION_WAITERS_THRESHOLD=3 LOGIN_REDIRECTION=ON ; -------Create ls policy lsp1

 

Execution time: 0.138 seconds

 

(DBA)> alter logical server ls1 policy lsp1 ----------> Assign ls policy lsp1 to logical server ls1

 

Execution time: 0.148 seconds

 

(DBA)> create login policy lp1 DEFAULT_LOGICAL_SERVER=SERVER MAX_CONNECTIONS=100;  ---------Create login policy lp1

 

Execution time: 0.161 seconds

 

(DBA)> alter login policy lp1  add logical server ls1 --------assign logical server ls1 to login policy lp1

 

Execution time: 0.129 seconds

 

$ dbisql -c 'uid=testusr1;pwd=sql;eng=vicky_iq0801c' -nogui

 

(testusr1)>

 

[q2]$ dbisql -c 'uid=testusr1;pwd=sql;eng=vicky_iq0801c;Ls=ls1;NODETYPE=WRITER'  –nogui

 

Could not connect to the database.---------------Expected error, because login policy lp1 haven't assigned user testusr1

 

Connection disallowed by login policy for this user

 

SQLCODE=-1212, ODBC 3 State="HY000"

 

 

---Now assign login policy lp1 to testusr1

 

 

dbisql -c 'uid=DBA;pwd=sql;eng=vicky_iq0801c' -nogui

 

(DBA)> alter user testusr1 login policy lp1

 

Execution time: 0.182 seconds

 

(DBA)>

 

 

dbisql -c 'uid=testusr1;pwd=sql;eng=vicky_iq0801c;Ls=ls1;NODETYPE=WRITER'  -nogui

 

 

(testusr1)> quit

 

 

2. Second Scenario

 

                     Vicky_iq0801c(Coordinator) , Vicky_iq0801q1

 

(DBA)> create user testusr4 identified by sql
Execution time: 0.187 seconds


(DBA)> create logical server ls3 membership (vicky_iq0801c,vicky_iq0801q1) -------create logical server ls3
Execution time: 0.149 seconds


(DBA)> create ls policy lsp3 REDIRECTION_WAITERS_THRESHOLD=3 LOGIN_REDIRECTION=ON;--------create login policy lsp3
Execution time: 0.136 seconds


(DBA)> alter logical server  ls3 policy lsp3--------assign ls policy lsp3 to logical server ls3
Execution time: 0.138 seconds

 

(DBA)> create login policy lp3 DEFAULT_LOGICAL_SERVER=SERVER MAX_CONNECTIONS=100 ---------create login policy lp3

Execution time: 0.135 seconds


(DBA)> alter login policy lp3 add logical server ls3-------Assign logical server ls3 to login policy lp3
Execution time: 0.151 seconds


(DBA)> alter user testusr4 login policy lp3-------Assign login policy lp3 to user testusr4
Execution time: 0.203 seconds


$ dbisql -c 'uid=testusr4;pwd=sql;eng=vicky_iq0801c;Ls=ls3;NODETYPE=WRITER' -nogui

(testusr4)> quit


CREATING ODBC DSN FOR LOGICAL SERVER

$
0
0


1. Launch ODBC Administrator. click Add

             

           odbclg.PNG

 

2. Select Sybase IQ click Finish

 

               odbclga.PNG

 

3.  Add ODBC Data Source Name

 

                  ocbclg1.PNG

 

 

4. On Login Tab, add Login, Host , Port and Server Name

 

 

                     odbclg2.PNG

 

5.  On advanced tab, specify Logical server connection parameters LS and NODETYPE

 

 

                       odbclg3.PNG

 

6.  Click Test Connection

 

                         odbclg4.PNG

 

7. Test Connection

 

                 

                           odbclg5.PNG

 

      

8. Select Login tab and verify logical server connection

 

 

                                odbclg6.PNG

sp_iqsysmon: Large Memory Allocator(LMA) Statistics

$
0
0

sp_iqsysmon system stored procedure monitors multiple components of SAP IQ, including the management of Buffer allocations, Buffer manager, Buffer pool, Catalog statistics, CPU utilization , Free list management, Memory management,  Prefetch management, IQ RLV-Memory Store statistics , Large Memory Allocator(LMA) statistics,  Server context statistics, Thread management and Transaction management.

 

Large Memory Allocator has been added in SAP IQ 16 and is responsible for enforcing large memory allocation.  Large memory is used by load and query engine.

 

Example:  Starts sp_iqmonitor in the file mode and write statistics for Large Memory Allocator(LMA) to the log file

 

sp_iqsysmon start_monitor,'filemode' , '-section lma'

sp_iqsysmon stop_monitor

 

Large Memory Allocator (Statistics)

 

Large Memory Space 8421m

Large Memory Max Flexible  2105mb

Large Memory Num Flex Allocations  0

Large Memory Flexible %     50%

Large Memory Flexible used 0 mb

Large Memory Inflexible %  90%

Large Memory Inflexible used  0 MB

Large Memory Anti-Starvation %  50%

Large Memory Num Connections 0

 

Large Memory Space” – Maximum Large Memory configured size (-iqlm value from params.cfg)

“Large Memory Max Flexible” -  Maximum memory granted for flexible  operators. (e.g Load Engine(hash sort merge for hash/has-range partitioned table and hash sort merge cursor)).

“Large Memory Num Flex Allocations” – This is the count of memory chunks allocated as flex memory.

“Large Memory Flexible %” – percentage of large memory used for flexible operators.

“Large Memory Flexible used” –   This is the total amount of memory allocated to flex users.

“Large Memory Inflexible %” –  Percentage of large memory used for inflexible operators(N-bit metadata structures, data buffer of column vector in load ).

“Large Memory Inflexible used” – Large memory used  by inflexible operators

“Large Memory Anti-Starvation %” – This only applies to flexible operators.

“Large Memory Num Connections” – This only applies to flexible operators and is the number of clients using lma.  Internal concept only – has nothing to do with DB connections or users.  There could be unregistered users too so this is not an accurate count of users.

[MPX] How to change the port number in MPX.

$
0
0

A user sometimes needs to change port number in mpx environment.

 

Environment


SAP IQ15.x, IQ16.x all (MPX)

 

If user wants to change the port number of coordinator, Here are steps to change the port number.

 

1. ALTER MULTIPLEX SERVER iq154MPX_C HOST '10.34.193.108' PORT 2649; --> new port number (2649)

 

2. Coordinator is shutdowned because of configuration change.

              I. 10/07 16:34:26. 0000000188 Warning : Multiplex server changed configuration: 'Connection Info' which needs Shutdown.

              I. 10/07 16:34:26. 0000000188 Warning : Multiplex server iq154MPX_C is shutting down because of configuration change.

 

3. change the port number from old to new port number in cfg file.

 

4. restart coordinator

 

5. check the consistency using sp_iqmpxvalidate

 

[Cautions]

         ** I recommend to shutdown all secondary nodes because DDL/DML is not working before change the port number.

 

[Files to be changed]

1. odbc file
2. cfg file
3. interfaces file
...

 

Thanks

Gi-Sung Jang

[SAP IQ] How to use multiple IPs/Ports in IQ16.

$
0
0

Dear All,

 

[Problem]

 

I could use multiple IPs/Ports in Previous Version(IQ12.x/IQ15.x).


-x tcpip(host=xxx;port=xxx;host=xxx;port=xxx)

 

But It's not able to startup with above configuration in IQ16.

 

[Solution]

 

I have tried to test with below Scenario.

 

[Test Scenario]

 

1. -x tcpip{host=IP_Address_1;port=Port_Number_1;host=IP_Address_2;port=Port_Number_2} --X

    -x tcpip(host=IP_Address_1;port=Port_Number_1;host=IP_Address_2;port=Port_Number_2)

 

2. -x tcpip{MyIP=IP_Address_1, IP_Address_2 ;Port=Port_Number_1,Port_Number_2} --O

    -x tcpip(MyIP=IP_Address_1, IP_Address_2 ;Port=Port_Number_1,Port_Number_2)

 

3. -x tcpip{MyIP=IP_Address_1:Port_Number_1,IP_Address_1:Port_Number_2} --X

    -x tcpip(MyIP=IP_Address_1:Port_Number_1,IP_Address_1:Port_Number_2)

 

Here are my results of test with above Scenario.

 

  1) 1,3 Fail

  2) 2 Success(IQ is able to startup and be connected)

 

HTH

 

Thanks

Gi-Sung Jang

 

This document was generated from the following discussion: [Question] How to use multiple IPs/Ports in IQ16.

SAP IQ Cockpit - Creating Technical User

$
0
0
  • SAP IQ cockpit available in SAP IQ 16 sp08 is a web interface tool,  SAP IQ cockpit administration does support SAP IQ versions 15.3 or later.   For SAP IQ 15.3 and 15.4 authority based security is used, while SAP IQ 16 uses role-based security.

 

Technical User is a dedicated account used for creating and scheduling collection jobs and monitoring, and triggering alerts based on predefined thresholds.

There are two parts to the account: the SAP IQ part and the SAP IQ Cockpit part. Both parts are created using the Create  User wizard. The technical user account must have a password and be assigned to the IQC_TECHNICAL_USER_POLICY login policy. Technical user can be created authority-based or role-based depending on  your  SAP IQ version.

 

CREATE USER statement should not used for creating Technical User,  as it will not create SAP IQ cockpit part.  Technical user can not  be deleted and should not be modified,  as modifications are not updated to the SAP IQ Cockpit part.

 

For complete details:

 

Technical User - About SAP IQ Cockpit - SAP Library

 

Steps:

 

  • For creating Technical User,  run cockpit_monitor script ($SYBASE/COCKPIT-4/plugins/IQ-CMAP/cockpit_monitor_role_based_privileges_setup.sql or $SYBASE/COCKPIT-4/plugins/IQ-CMAP/cockpit_monitor_authority_based_privileges_setup.sql) in the SAP IQ server

 

 

 

         [IQ-CMAP]$ dbisql -c "uid=DBA;pwd=sql;eng=vicky_iqdemo0830" -nogui  cockpit_monitor_role_based_privileges_setup.sql

 

 

         Execution time: 0.462 seconds

       

 

  • Launch SAP IQ Cockpit and login to your system

    cockpittechusr1.PNG

 

  • Click on Explore Tab

 

        cockpitexlore.PNG

  • Click on Security -> Role-Based -> Users -> New

 

         cockpittechusr3.PNG

 

  • Select Resource

 

        cockpittechusr4.PNG

 

           cockpittechusr5.PNG

 

  • Specify Technical User Name

 

 

         cockpittechusr6.PNG 

 

  • Check  option to Create Technical User

 

        cockpittechusr7.PNG

 

  • Assign Password and new login policy to the New user.  Optional Check 'Require Password change on next login' , if you want user to change his password on next login.

 

        cockpittechusr8.PNG

 

  • Grant roles to the Technical User(Optional)

 

        cockpittechusr9.PNG

 

  • Assign System Privileges(Optional)

 

       cockpittechusr10.PNG

 

  • Add Comment for Technical User

 

        cockpittechusr11.PNG

 

           cockpittechusr12.PNG

 

  • Click Finish

 

        cockpittechusr13.PNG

 

  • You can monitor and manage alerts in a SAP IQ simplex or Multiplex systems.  For monitoring and resolving alerts, setting alerts, managing alerts, adjusting the monitoring interval of key performance areas and configuring Alerts:

 

        Alerts in SAP IQ - About SAP IQ Cockpit - SAP Library

 

       cockpittechusr14.PNG

     

  •   Configure email notifications

          cockpittechusr15.PNG

 

  • Configure Monitoring Interval and Threshold

 

        cockpittechusr16.PNG

Viewing all 123 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>