<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dobler Consulting &#187; Sybase Tips</title>
	<atom:link href="http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.doblerconsulting.com</link>
	<description>Sybase DBA &#124; Oracle DBA &#124; SQL Server DBA &#124; SAP</description>
	<lastBuildDate>Tue, 21 May 2013 21:57:09 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Sybase IQ Versioning and Locks</title>
		<link>http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/sybase-iq-versioning-and-locks/</link>
		<comments>http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/sybase-iq-versioning-and-locks/#comments</comments>
		<pubDate>Mon, 17 Sep 2012 11:15:01 +0000</pubDate>
		<dc:creator>Jeff Younce</dc:creator>
				<category><![CDATA[Sybase Tips]]></category>
		<category><![CDATA[Technology Tips & Tricks]]></category>
		<category><![CDATA[Asa]]></category>
		<category><![CDATA[Error Code 21]]></category>
		<category><![CDATA[Message File]]></category>
		<category><![CDATA[Sessions]]></category>
		<category><![CDATA[Severity]]></category>
		<category><![CDATA[Sqlstate]]></category>
		<category><![CDATA[Sybase Error]]></category>
		<category><![CDATA[Sybase Iq]]></category>
		<category><![CDATA[Sybase Locks]]></category>
		<category><![CDATA[Versioning]]></category>

		<guid isPermaLink="false">http://www.doblerconsulting.com/?p=1864</guid>
		<description><![CDATA[<p>In Sybase IQ no two users can modify data in the same table at the same time. When you try to do this you will get an error in your application, as well as in the IQ message file. In IQ you can also run into problems when your transaction tries to modify something but [...]</p><p>The post <a href="http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/sybase-iq-versioning-and-locks/">Sybase IQ Versioning and Locks</a> appeared first on <a href="http://www.doblerconsulting.com">Dobler Consulting</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>In Sybase IQ no two users can modify data in the same table at the same time. When you try to do this you will get an error in your application, as well as in the IQ message file. In IQ you can also run into problems when your transaction tries to modify something but hits an object or data that has been created after you started your transaction. Confusing? Read on and you will understand.</p>
<h2>Transactions and Versioning</h2>
<p><a id="Conflicting_transactions" name="Conflicting_transactions"></a></p>
<h3>Conflicting transactions</h3>
<p>To see how IQ works with transactions and versioning open two sessions to IQ and run the following set of commands:</p>
<pre>Session-1: create table t1(a int)
Session-1: begin tran
Session-2: create table t2(a int)
Session-1: insert into t2 values(1)</pre>
<p>The following error is then raised:</p>
<pre>ASA Error -1000011: Transaction 156593 attempted to access an object created by transaction 156608.
-- (db_txnInfo.cxx 690)
Sybase error code=21, SQLState=”QDA11”</pre>
<p>In the IQ message file the error is also reported:</p>
<pre>I. 01/07 14:55:58. 0000000563 Exception Thrown from db_txnInfo.cxx:690, Err# 0, tid 478 origtid 478
I. 01/07 14:55:58. 0000000563    O/S Err#: 0, ErrID: 1025 (db_catalogException); SQLCode: -1000011, SQLState: 'QDA11', Severity: 14
I. 01/07 14:55:58. 0000000563 [20671]: Transaction 156593 attempted to access an object created by transaction 156608. 
-- (db_txnInfo.cxx 690)</pre>
<p>This error happened because IQ works with table level versioning. Every transaction in IQ gets a number and that transaction can not deal with data from transactions that have started later (have a higher number). In the example, table t2 is created within a transaction with a higher number than the transaction in session 1 that tried to insert a row into table t2. Under normal situations you will not often hit this problem, but it can happen when you run multiple sessions in IQ updating data at the same time.</p>
<p><a id="Coding_around_conflicting_transactions" name="Coding_around_conflicting_transactions"></a></p>
<h3>Coding around conflicting transactions</h3>
<p>To make an application resilient for this you can use error trapping, as in the following example. Again, open two sessions to IQ and run the following set of commands:</p>
<pre>Session-1: create table t1(a int);
Session-1: begin tran;
Session-2: create table t2(a int);</pre>
<p>Then run a command in Session-1 that traps for the error and give a message. Run the following piece of code in one batch.</p>
<pre>begin
  declare tran_error exception for SQLSTATE 'QDA11';
  insert into t2 values(1);
  message 'Everyting ok, no conflicting transaction' to client;
  exception
    when tran_error then message 'You hit a conflicting transaction' to client;
    when others then resignal;
end;</pre>
<p><a id="Locking" name="Locking"></a></p>
<h2>Locking</h2>
<p>In Sybase IQ only a single session can write to a particular table at any given time. There can be multiple update sessions going at the same time, but each session should update a different table. When you try to break this rule the following error message is raised:</p>
<pre>Msg 8405, Level 21, State 0:
SQL Anywhere Error -210: User 'Joe' has the row in 'myTable' locked</pre>
<p>In the IQ message log the following is raised:</p>
<pre>I. 02/16 16:29:53. 0000000898 Txn 114153 0 114153
I. 02/16 16:29:53. 0000000898    sqlcode -210
I. 02/16 16:29:53. 0000000898    string_id 2169
I. 02/16 16:29:53. 0000000898    _sqlstate 67792968
I. 02/16 16:29:53. 0000000898    odbc30state 67108865
I. 02/16 16:29:53. 0000000898    sybcode 8405
I. 02/16 16:29:53. 0000000898    severity 21
I. 02/16 16:29:53. 0000000898    odbc20state 67108865
I. 02/16 16:29:53. 0000000898 Exception Thrown from db_catalog.cxx:717, Err# 0, tid 1979 origtid 1979
I. 02/16 16:29:53. 0000000898    O/S Err#: 0, ErrID: 5122 (st_sacbexception); SQLCode: 0, SQLState: '00000', Severity: 10
I. 02/16 16:29:53. 0000000898 [2000]: 
I. 02/16 16:29:53. 0000000898 Rbck
I. 02/16 16:29:53. 0000000898 PostRbck
I. 02/16 16:30:10. 0000000950 Txn 114155 0 114155
I. 02/16 16:30:10. 0000000950 Cmt 114156
I. 02/16 16:30:10. 0000000950 PostCmt 0</pre>
<p>In Sybase IQ 15 the &#8220;lock table&#8221; command can now be used to request a lock on a table and when the lock cannot be granted just wait until it can. An example of this is:</p>
<pre>lock table &lt;table-name&gt; in write mode wait "00:10:00"</pre>
<p>he commands request a lock for a table and when it is granted no other processes can write to the same table. When the lock cannot be granted the lock command will wait 10 minutes as specified with &#8220;00:10:00&#8243;.</p>
<p>By preceding each insert/update/delete or load table command by a &#8220;lock table&#8221; the error message can be easily prevented when the application requires it.</p>
<p>The post <a href="http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/sybase-iq-versioning-and-locks/">Sybase IQ Versioning and Locks</a> appeared first on <a href="http://www.doblerconsulting.com">Dobler Consulting</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/sybase-iq-versioning-and-locks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reverse Engineer Sybase IQ dbspaces Without an ER Tool!</title>
		<link>http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/reverse-engineer-sybase-iq-dbspaces-without-a-er-tool/</link>
		<comments>http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/reverse-engineer-sybase-iq-dbspaces-without-a-er-tool/#comments</comments>
		<pubDate>Sun, 09 Sep 2012 16:53:19 +0000</pubDate>
		<dc:creator>Jeff Younce</dc:creator>
				<category><![CDATA[Sybase Tips]]></category>
		<category><![CDATA[Technology Tips & Tricks]]></category>
		<category><![CDATA[163]]></category>
		<category><![CDATA[Attempt]]></category>
		<category><![CDATA[Chunk Size]]></category>
		<category><![CDATA[D Store]]></category>
		<category><![CDATA[Database Space]]></category>
		<category><![CDATA[Database Tool]]></category>
		<category><![CDATA[Declare Cursor]]></category>
		<category><![CDATA[Handy]]></category>
		<category><![CDATA[Iq System]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[Msg]]></category>
		<category><![CDATA[Regard]]></category>
		<category><![CDATA[Reverse Engineer]]></category>
		<category><![CDATA[Seq]]></category>
		<category><![CDATA[Sqlstate]]></category>
		<category><![CDATA[Sybase]]></category>
		<category><![CDATA[Sybase Database]]></category>
		<category><![CDATA[System Temp]]></category>
		<category><![CDATA[Tool]]></category>

		<guid isPermaLink="false">http://www.doblerconsulting.com/?p=1856</guid>
		<description><![CDATA[<p>For Sybase IQ it is sometimes handy to reverse engineer the statements that were used to create the various IQ dbspaces. You can do this with Power Designer but not everybody has access to the tool. Below you will find a script that does a basic attempt to reverse engineer the statements for the &#8220;create [...]</p><p>The post <a href="http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/reverse-engineer-sybase-iq-dbspaces-without-a-er-tool/">Reverse Engineer Sybase IQ dbspaces Without an ER Tool!</a> appeared first on <a href="http://www.doblerconsulting.com">Dobler Consulting</a>.</p>]]></description>
				<content:encoded><![CDATA[<p id="firstHeading">For Sybase IQ it is sometimes handy to reverse engineer the statements that were used to create the various IQ dbspaces. You can do this with Power Designer but not everybody has access to the tool.</p>
<p>Below you will find a script that does a basic attempt to reverse engineer the statements for the &#8220;create database&#8221; and &#8220;create dbspace&#8221; commands. The script is not complete with regard to all the possible options for these statements. Feel free to make adjustments or mail the author when you miss something.</p>
<p>NB: Written specifically for IQ 15 !</p>
<pre>begin
declare @db_file        long varchar;
declare @iq_file        long varchar;
declare @msg_file       long varchar;
declare @temp_file      long varchar;
declare @block_size     unsigned int;
declare @chunk_size     unsigned int;
declare @reserve_size   rowid;
declare @user_dbspace   long varchar;
declare @user_dbfile_name long varchar;
declare @user_file_name long varchar;
declare @counter        int;

declare local temporary table #statement(
        seq             int             not null default autoincrement,
        statement_txt   long varchar    null);

declare end_of_cursor exception for SQLSTATE '02000';

declare user_dbspaces cursor for
        select  dbspace_name
                from sysdbspace
                where   store_type      = 2
                and     dbspace_name    not in ('IQ_SYSTEM_MAIN', 'IQ_SYSTEM_TEMP', 'IQ_SYSTEM_MSG');

declare user_dbfiles cursor for
        select  f.dbfile_name,
                f.file_name
                from    sysdbfile f,
                        sysdbspace d
                where   d.store_type    = 2
                and     d.dbspace_name  = @user_dbspace
                and     d.dbspace_id    = f.dbspace_id
                order   by dbfile_id;

select  file_name into @db_file
        from    sysdbfile
        where   dbspace_id      = 0;

select  file_name into @iq_file
        from    sysdbfile
        where   dbfile_name     = 'IQ_SYSTEM_MAIN';

select  file_name into @msg_file
        from    sysdbfile
        where   dbfile_name     = 'IQ_SYSTEM_MSG';

select  file_name into @temp_file
        from    sysdbfile
        where   dbfile_name     = 'IQ_SYSTEM_TEMP';

select  block_size, chunk_size into @block_size, @chunk_size
        from    sysiqinfo;

select  reserve_size into @reserve_size
        from    sysiqdbfile
        where   dbfile_id       = 16384;

insert  into #statement(statement_txt)
        select  'create database <strong> + @db_file + '</strong> +
        ' IQ PATH <strong> + @iq_file + '</strong> +
        ' IQ PAGE SIZE ' + convert(varchar,@block_size * @chunk_size) +
        ' IQ RESERVE ' + convert(varchar,convert(int,(@reserve_size * 1024)/ @block_size)) +
        ' BLOCK SIZE ' + convert(varchar,@block_size) +
        ' MESSAGE PATH <strong> + @msg_file + '</strong> +
        ' TEMPORARY PATH <strong> + @temp_file + </strong>;' as "statement";

insert  into #statement(statement_txt)
        select  'alter dbspace ' + d1.dbfile_name +
                ' add file ' + d2.dbfile_name + ' <strong> + d2.file_name + </strong>;' as "statement"
                from    sysdbfile d1,
                        sysdbfile d2
                where   d1.dbfile_name  in ('IQ_SYSTEM_MAIN', 'IQ_SYSTEM_TEMP')
                and     d1.dbfile_id    = d1.dbspace_id
                and     d2.dbspace_id   = d1.dbspace_id
                and     d2.dbfile_id    != d2.dbspace_id;

open    user_dbspaces;

user_dbspace_loop:
LOOP
        fetch   next user_dbspaces into @user_dbspace;
        if      SQLSTATE = end_of_cursor then
                leave user_dbspace_loop;
        end if;

        insert  into #statement(statement_txt)
                select  'create dbspace ' + @user_dbspace + ' using ';

        set     @counter = 0;

        open    user_dbfiles;

        user_dbfiles_loop:
        LOOP
                fetch   next user_dbfiles into @user_dbfile_name, @user_file_name;
                if      SQLSTATE = end_of_cursor then
                leave   user_dbfiles_loop;
        end if;

        if      @counter = 0 then
                insert  into #statement(statement_txt)
                        select  'file ' + @user_dbfile_name + '<strong> + @user_file_name + '</strong> as statement;

                set     @counter = @counter + 1;
        else
                insert  into #statement(statement_txt)
                        select  ',file ' + @user_dbfile_name + ' <strong> + @user_file_name + '</strong> as statement;
        end if;

        end loop user_dbfiles_loop;
        close user_dbfiles;

        insert  into #statement(statement_txt)
                select 'iq store;' as "statement";
end loop user_dbspace_loop;

close   user_dbspaces;

insert  into #statement(statement_txt)
        select  'alter dbspace ' + d.dbspace_name +
                ' striping ' + case sb.striping_on when 'T' then 'on' else 'off' end +
                ' stripesizeKb ' + convert(varchar,stripe_size_kb) + ';' as "statement"
                from    sysiqdbspace sb,
                        sysdbspace d
                where   d.dbspace_id    = sb.dbspace_id
                and     d.store_type    = 2
                and     d.dbspace_name  != 'IQ_SYSTEM_MSG';

select  statement_txt
        from    #statement
        order   by seq;
end;</pre>
<p>The post <a href="http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/reverse-engineer-sybase-iq-dbspaces-without-a-er-tool/">Reverse Engineer Sybase IQ dbspaces Without an ER Tool!</a> appeared first on <a href="http://www.doblerconsulting.com">Dobler Consulting</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/reverse-engineer-sybase-iq-dbspaces-without-a-er-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Optimizing and exploiting Sybase IQ Distributed Query Processing (DPQ Tips N Hints)</title>
		<link>http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/optimizing-and-exploiting-sybase-iq-distributed-query-processing-dpq/</link>
		<comments>http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/optimizing-and-exploiting-sybase-iq-distributed-query-processing-dpq/#comments</comments>
		<pubDate>Tue, 04 Sep 2012 01:45:29 +0000</pubDate>
		<dc:creator>Jeff Younce</dc:creator>
				<category><![CDATA[Sybase Tips]]></category>
		<category><![CDATA[Technology Tips & Tricks]]></category>
		<category><![CDATA[Column Definitions]]></category>
		<category><![CDATA[Cpu Cores]]></category>
		<category><![CDATA[Cursors]]></category>
		<category><![CDATA[Database Operations]]></category>
		<category><![CDATA[Database Option]]></category>
		<category><![CDATA[Database Options]]></category>
		<category><![CDATA[Iq]]></category>
		<category><![CDATA[Loading Data]]></category>
		<category><![CDATA[Lookup Tables]]></category>
		<category><![CDATA[Optimizer]]></category>
		<category><![CDATA[Parallel Query]]></category>
		<category><![CDATA[Query Engine]]></category>
		<category><![CDATA[Query Operators]]></category>
		<category><![CDATA[Query Parallelism]]></category>
		<category><![CDATA[Query Plans]]></category>
		<category><![CDATA[Scalability]]></category>
		<category><![CDATA[Storage Requirements]]></category>
		<category><![CDATA[Temporary Storage]]></category>
		<category><![CDATA[Test Cases]]></category>
		<category><![CDATA[Upper Bound]]></category>

		<guid isPermaLink="false">http://www.doblerconsulting.com/?p=1848</guid>
		<description><![CDATA[<p>Prerequisites: Assuming you know how to decipher IQ Query Plans and understanding how Indexes use the query Engine, Parallelism and output from the Index Advisor. &#160; What You Can Do to Influence DQP Scalability and Effectiveness. There are various server and database operations that affect parallelism and performance of a query. After you have maximized [...]</p><p>The post <a href="http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/optimizing-and-exploiting-sybase-iq-distributed-query-processing-dpq/">Optimizing and exploiting Sybase IQ Distributed Query Processing (DPQ Tips N Hints)</a> appeared first on <a href="http://www.doblerconsulting.com">Dobler Consulting</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><strong>Prerequisites: Assuming you know how to decipher IQ Query Plans and understanding how Indexes use the query Engine, Parallelism and output from the Index Advisor.</strong></p>
<p>&nbsp;</p>
<p><strong>What You Can Do to Influence DQP Scalability and Effectiveness.</strong></p>
<p>There are various server and database operations that affect parallelism and performance of a query. After you have maximized Indexes using the Sybase IQ Index Advisor, there are several database options which will exploit Parallel Query processing which I listed below. I have used the below “options” in a variety of test cases and are all dependent on numerous variables which are to numerous to mention. If you meet the above prerequisites, try them and see how you may benefit from their usefulness. Some are just Best Practices which should be included as default and some are data dependent, Hardware related and other factors.</p>
<p>&nbsp;</p>
<p><strong>• Max_Query_Parallelism: </strong>this database option sets an upper bound which limits how parallel the optimizer will permit query operators, such as joins, GROUP BY and ORDER BY. The default value is 64. Systems with more than 64 CPU cores often benefit from a large value — up to the total number of CPU cores on the system to a maximum of 512.<strong></strong></p>
<p><strong><br />
• Minimize_Storage: </strong>set this database option to ‘on’ prior to loading data into tables, or utilize IQ_UNIQUE on column definitions. FP(1), FP(2) and FP(3) indexes that use lookup tables will be created instead of flat FP indexes. These take up less space and decrease I/O (although FP(3) indexes consume a lot of memory, so utilize them judiciously). This database option is almost always set as a default.</p>
<p><strong> • Force_No_Scroll_Cursors: </strong>if you do not need backwards scrolling cursors, set this database option to ‘on’ to reduce temporary storage requirements. Almost always used!</p>
<p><strong>• Max_IQ_Threads_Per_Connection: </strong>controls the number of threads for each connection. With large systems, you may see some performance benefit by increasing this value.</p>
<p><strong>• Max_IQ_Threads_Per_Team: </strong>controls the number of threads allocated to perform a single operation (such as a LIKE predicate on a column). With large systems, you may see some performance benefit by increasing this value.</p>
<p><strong>• Max_Hash_Rows: </strong>set this database option to 2.5 million for each 4GB RAM on the host. For example, set it to 40 million on a 64GB system. This will encourage the query optimizer to utilize hash based join and group by algorithms, which scale better. However, there is a caveat here: with very large hash tables, it is possible for performance to regress when distributed due to the time required to flush hash tables on one node and reconstitute them on another. DQP will attempt to compensate for this and not distribute hash based operators when the hash table becomes prohibitively large, even if memory can accommodate it.</p>
<p><strong>• -iqgovern: </strong>this server option specified the number of concurrent queries on a particular server. By specifying the –iqgovern switch, you can help IQ maintain throughput by giving queries adequate resources to commit quickly. The default value is (2 x number of CPUs) + 10. For sites with large numbers of active connections, you might want to set this value lower.</p>
<p><strong>• -iqtc: </strong>this server option sets the temp cache size. Temp cache is used by both the local and shared temporary stores. DQP must utilize IQ_SHARED_TEMP in order to do its processing, and therefore requires adequate temp cache. You may want to allocate more memory to it than main cache for DQP workloads. There are a couple of DQP specific database options that are offered as well. There to lengthy to discuss in this session.</p>
<p><strong>• MPX_Work_Unit_Timeout: </strong>when a worker node does not complete processing of its query fragment within the mpx_work_unit_timeout value, the work is passed back to the leader to retry. If you find that timeouts are occurring and adversely affecting the performance of DQP, you can increase the timeout value to allow a worker to complete. Generally, though, you are unlikely to hit a timeout issue unless you have some other underlying problem.</p>
<p><strong>• DQP_Enabled: </strong>this is an option you can set for a database connection. If DQP is occurring, but you are not seeing benefits from it, you can turn it off.</p>
<p><strong> </strong></p>
<p><strong>Sizing Shared Temporary Storage</strong></p>
<p>An adequate amount of shared temporary space on fast storage hardware is critical for the performance of distributed queries. While it is difficult to calculate in advance how much shared temporary storage you will need for a distributed query, there are some trends that have been observed:</p>
<p>• Use of shared temporary space can vary widely among nodes in the PlexQ grid as they are executing a distributed query</p>
<p>• The amount of shared temporary space used does not correlate with the scalability of the query. Queries that do not scale well may use as much or more shared temporary space as queries that do scale well.</p>
<p>• Queries that use more temporary cache/space when running on a single node will tend to use more shared temporary space when running distributed, but there is not an obvious multiplier that can be derived.</p>
<p>The post <a href="http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/optimizing-and-exploiting-sybase-iq-distributed-query-processing-dpq/">Optimizing and exploiting Sybase IQ Distributed Query Processing (DPQ Tips N Hints)</a> appeared first on <a href="http://www.doblerconsulting.com">Dobler Consulting</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/optimizing-and-exploiting-sybase-iq-distributed-query-processing-dpq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sybase IQ Multiplex Nodes and Server Overview</title>
		<link>http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/sybase-iq-multiplex-nodes-server-overview/</link>
		<comments>http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/sybase-iq-multiplex-nodes-server-overview/#comments</comments>
		<pubDate>Tue, 28 Aug 2012 20:00:04 +0000</pubDate>
		<dc:creator>Jeff Younce</dc:creator>
				<category><![CDATA[Sybase Tips]]></category>
		<category><![CDATA[Technology Tips & Tricks]]></category>
		<category><![CDATA[Acts]]></category>
		<category><![CDATA[Application Server]]></category>
		<category><![CDATA[Business Edition]]></category>
		<category><![CDATA[Failover]]></category>
		<category><![CDATA[First Choice]]></category>
		<category><![CDATA[Global Catalog]]></category>
		<category><![CDATA[Global Transaction]]></category>
		<category><![CDATA[Iq System]]></category>
		<category><![CDATA[Multiplex]]></category>
		<category><![CDATA[Nbsp]]></category>
		<category><![CDATA[Node]]></category>
		<category><![CDATA[Object Versions]]></category>
		<category><![CDATA[Reader Writer]]></category>
		<category><![CDATA[Schema Changes]]></category>
		<category><![CDATA[Secondary Servers]]></category>
		<category><![CDATA[Server Edition]]></category>
		<category><![CDATA[Server Overview]]></category>
		<category><![CDATA[Shared Servers]]></category>
		<category><![CDATA[Sql]]></category>
		<category><![CDATA[Storage Management]]></category>
		<category><![CDATA[Sybase Iq]]></category>
		<category><![CDATA[Synchronization]]></category>
		<category><![CDATA[System Temp]]></category>
		<category><![CDATA[Writ]]></category>

		<guid isPermaLink="false">http://www.doblerconsulting.com/?p=1825</guid>
		<description><![CDATA[<p>IQ_SYSTEM_MAIN, IQ_SHARED_TEMP, and IQ user main dbspaces are shared by all multiplex servers, and all servers need access to the same physical file. Data managed by SQL Anywhere is not shared. Each node requires a separate copy of such data.  Each server has its own set of files in IQ_SYSTEM_TEMP and IQ_SYSTEM_MSG. Note: It is always recommended to [...]</p><p>The post <a href="http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/sybase-iq-multiplex-nodes-server-overview/">Sybase IQ Multiplex Nodes and Server Overview</a> appeared first on <a href="http://www.doblerconsulting.com">Dobler Consulting</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>IQ_SYSTEM_MAIN, IQ_SHARED_TEMP, and IQ user main dbspaces are shared by all multiplex servers, and all servers need access to the same physical file. Data managed by SQL Anywhere is not shared. Each node requires a separate copy of such data.  Each server has its own set of files in IQ_SYSTEM_TEMP and IQ_SYSTEM_MSG.</p>
<address><strong>Note:</strong> It is always recommended to create a DEFAULT DB space to store objects and data on and not on the IQ_SYSTEM_MAIN Dbspace.</address>
<address> </address>
<h3>Coordinator Node</h3>
<p>Each multiplex configuration requires a coordinator node. When you convert an existing simplex server to multiplex, it becomes the coordinator node.</p>
<h4>The coordinator node:</h4>
<ul>
<li>Runs read-only and read-write operations against shared IQ objects.</li>
<li>Manages IQ main dbspaces.</li>
<li>Manipulates local data in SQL Anywhere system and user tables.</li>
</ul>
<h4>Coordinates all read-write operations on shared IQ objects, including:</h4>
<ul>
<li>Shared IQ table locking</li>
<li>Shared IQ storage management</li>
<li>Providing global transaction IDs for read-write transactions involving shared IQ objects</li>
<li>Maintaining the global catalog</li>
<li>Controls catalog synchronization for secondary servers</li>
<li>Performs schema changes on shared IQ store objects</li>
<li>Performs schema changes on SQL Anywhere store objects</li>
<li>Maintains and cleans up object versions</li>
</ul>
<h3>Secondary NODES.. ie (reader/writer)</h3>
<p>One or more secondary nodes may participate in a Sybase IQ multiplex configuration. One secondary node acts as a designated failover node, the first choice node to assume the coordinator role if the current coordinator is unable to continue.</p>
<h4>The number of secondary nodes supported depends on the license purchased, as follows:</h4>
<ul>
<li><strong>Demo/Trial Edition:</strong> Unlimited secondary nodes</li>
<li><strong>Small Business Edition:</strong> None (multiplex not allowed)</li>
<li><strong>Single Application Server Edition:</strong> One secondary node</li>
<li><strong>Enterprise Edition:</strong> Unlimited secondary nodes (license needed for each)</li>
</ul>
<h4>Secondary nodes:</h4>
<ul>
<li>Can be either read-only nodes (reader nodes) or read-write nodes (writer nodes).</li>
</ul>
<h4>Writer nodes:</h4>
<ul>
<li>Can run read-only and read-write operations against shared IQ objects.</li>
<li>Can manipulate local data in temporary and SA base tables.</li>
</ul>
<h4>Reader nodes:</h4>
<ul>
<li>Can run read-only operations against shared IQ objects.</li>
<li>Can manipulate local data in temporary and SA base tables.</li>
</ul>
<p>&nbsp;</p>
<p>The post <a href="http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/sybase-iq-multiplex-nodes-server-overview/">Sybase IQ Multiplex Nodes and Server Overview</a> appeared first on <a href="http://www.doblerconsulting.com">Dobler Consulting</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/sybase-iq-multiplex-nodes-server-overview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sybase IQ Index Tips and Tricks</title>
		<link>http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/sybase-iq-index-tips-and-tricks/</link>
		<comments>http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/sybase-iq-index-tips-and-tricks/#comments</comments>
		<pubDate>Fri, 24 Aug 2012 23:08:20 +0000</pubDate>
		<dc:creator>Jeff Younce</dc:creator>
				<category><![CDATA[Sybase Tips]]></category>
		<category><![CDATA[Technology Tips & Tricks]]></category>
		<category><![CDATA[Algorithm]]></category>
		<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[Delete]]></category>
		<category><![CDATA[Deletions]]></category>
		<category><![CDATA[Distinct Rows]]></category>
		<category><![CDATA[Distinct Values]]></category>
		<category><![CDATA[Earth]]></category>
		<category><![CDATA[Hg]]></category>
		<category><![CDATA[Holy Grail]]></category>
		<category><![CDATA[Indexes]]></category>
		<category><![CDATA[Lt]]></category>
		<category><![CDATA[Optimization Options]]></category>
		<category><![CDATA[Parallel Option]]></category>
		<category><![CDATA[Predicate]]></category>
		<category><![CDATA[Predicates]]></category>
		<category><![CDATA[Set Option]]></category>
		<category><![CDATA[Sybase Iq]]></category>
		<category><![CDATA[Tips And Tricks]]></category>

		<guid isPermaLink="false">http://www.doblerconsulting.com/?p=1728</guid>
		<description><![CDATA[<p>Parallel = the holy grail of speed! Sometimes, but in this case it does. Why on Earth does IQ only allow you to create indexes with parallel option? Ask Sybase! BEGIN PARALLEL CREATE  HG index idx_1_HG ON &#60;table&#62; (column_1); CREATE LF index idx_2_LF ON &#60;table&#62; (column_2); CREATE HG index idx_3_HG ON &#60;table&#62; (column_3); ...... on [...]</p><p>The post <a href="http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/sybase-iq-index-tips-and-tricks/">Sybase IQ Index Tips and Tricks</a> appeared first on <a href="http://www.doblerconsulting.com">Dobler Consulting</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Parallel = the holy grail of speed! Sometimes, but in this case it does.</p>
<p>Why on Earth does IQ only allow you to create indexes with parallel option? Ask Sybase!<br />
<code><br />
BEGIN PARALLEL<br />
CREATE  HG index idx_1_HG ON &lt;table&gt; (column_1);<br />
CREATE LF index idx_2_LF ON &lt;table&gt; (column_2);<br />
CREATE HG index idx_3_HG ON &lt;table&gt; (column_3);<br />
...... on and on<br />
END PARALLEL<br />
</code></p>
<p><code></code><br />
I have a  300 million row table joined to 1.2 million row table and have some records I want to delete and was wondering why it&#8217;s taking longer than it should . How can I coax some more speed out of my deletes? Auh, IQ Optimization options fills this need.  Specifying predicates on columns that have HG indexes greatly improves costing. In order for the HG costing to pick an algorithm other than large delete, it must be able to determine the number of distinct values (groups) affected by deletions.  1st their has to be a HG index on the column in the predicate which is usually the case. IQ chooses three algorithms to process deletes.<br />
<code><br />
set option HG_DELETE_METHOD = 1;  &lt;------------'Small' delete' for a few distinct  rows or 1 row<br />
set option HG_DELETE_METHOD = 2; &lt;------------ 'Large delete'  100000+ rows<br />
set option HG_DELETE_METHOD = 3; &lt;------------' Mid delete' 100 to 10000 rows<br />
</code></p>
<p>The post <a href="http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/sybase-iq-index-tips-and-tricks/">Sybase IQ Index Tips and Tricks</a> appeared first on <a href="http://www.doblerconsulting.com">Dobler Consulting</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/sybase-iq-index-tips-and-tricks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sybase IQ 15.x Fast Projection Index Overview and Practical Usage</title>
		<link>http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/sybase-iq-15-x-fast-projection-index-overview-and-practical-usage/</link>
		<comments>http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/sybase-iq-15-x-fast-projection-index-overview-and-practical-usage/#comments</comments>
		<pubDate>Sat, 11 Aug 2012 22:15:54 +0000</pubDate>
		<dc:creator>Jeff Younce</dc:creator>
				<category><![CDATA[Sybase Tips]]></category>
		<category><![CDATA[Technology Tips & Tricks]]></category>
		<category><![CDATA[Bitmap Indexes]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Byte]]></category>
		<category><![CDATA[Cardinality]]></category>
		<category><![CDATA[Creating A Table]]></category>
		<category><![CDATA[Data Extraction]]></category>
		<category><![CDATA[Data Loading]]></category>
		<category><![CDATA[Flat Index]]></category>
		<category><![CDATA[Fp Index]]></category>
		<category><![CDATA[Index]]></category>
		<category><![CDATA[Index Overview]]></category>
		<category><![CDATA[Optimization]]></category>
		<category><![CDATA[Output Html]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Query Output]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[Sybase Dba]]></category>
		<category><![CDATA[Sybase Iq]]></category>
		<category><![CDATA[Sybase Software]]></category>
		<category><![CDATA[Syntax]]></category>
		<category><![CDATA[Trees]]></category>

		<guid isPermaLink="false">http://www.doblerconsulting.com/?p=1639</guid>
		<description><![CDATA[<p>Most Sybase IQ indexes use a bitmap to store data compared to other indexes like B-trees .e.t.c,  Bitmap indexes can be built very fast in IQ and even faster when using the &#8220;Parallel IQ&#8221; function&#8221; which I posted the syntax on a previous blog. This also speeds up data loading and extraction as you don&#8217;t have to drop, [...]</p><p>The post <a href="http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/sybase-iq-15-x-fast-projection-index-overview-and-practical-usage/">Sybase IQ 15.x Fast Projection Index Overview and Practical Usage</a> appeared first on <a href="http://www.doblerconsulting.com">Dobler Consulting</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Most Sybase IQ indexes use a bitmap to store data compared to other indexes like B-trees .e.t.c,  Bitmap indexes can be built very fast in IQ and even faster when using the &#8220;Parallel IQ&#8221; function&#8221; which I posted the syntax on a previous blog. This also speeds up data loading and extraction as you don&#8217;t have to drop, disable indexes and even Sybase highly recommends leaving the indexes in place. You can also place multiple indexes on a column.  Another plus is when data is added, deleted or updated the index does not need to be rebuilt like traditional RDBMS indexes. In simple terms it&#8217;s faster to search/retrieved  a zero or one than  searching for a char value and only one column needs to be searched versus the whole row. This is what makes IQ unique and perhaps a leader  in the new world of &#8220;Big Data&#8221;.</p>
<p>This overview is for IQ 15.x only, so lets talk about the FP index in some detail.</p>
<p>IQ has 9 types of indexes but only three are highly used and a couple are considered useless in 15x. In this Blog, I will only discuss the most frequently used which is the FP and explain it&#8217;s usages.</p>
<p>&#8212;FAST PROJECTION (FP)</p>
<p>When creating a table, IQ creates this type for free (By default) but you can optimize them accordingly.  There are 4 types of FP indexes, 1 byte, 2 byte, 3 byte and flat. You want to avoid going flat because that means the index is not optimized. These types are dependent on 2 factors</p>
<p>&#8211; The cardinality of the data</p>
<p>&#8211; The value of IQ unique given in the &#8216;create table &#8216; statement or if the, set option  MINIMIZE_STORAGE=&#8217;ON&#8217; which is    like declaring IQ UNIQUE (255) on every column. Many times you will see this option hint if you use the INDEX_ADVISOR. If you see this recommendation when you analyze the query output html, you know your flat (No FP optimization) I&#8217;ll explain</p>
<p>The space  used to store the index is dependent on the type of the FP index used and the data type being stored.</p>
<p>A flat index stores the data as it&#8217;s being loaded with no storage optimization. For example, a char(20) will store 20 bytes of storage per value. As mentioned before, we want to use the 1,2 or 3 byte FP index and logic says the lower the byte the faster.</p>
<p>The 1 and 2 byte FP indexes are known as optimized FP indexes because they read faster from disk, use less disk space and are used by the query optimizer to obtain information about the data being stored in the column.</p>
<p>The 3 byte is the same as 1 and 2 byte except it holds between 65k and 16 million unique values. Again, It&#8217;s easier to sort through zeros and ones than a bunch of characters.</p>
<p>In Order to create an Optimized index you must either specify a value for IQ UNIQUE in a create table statement or set the MINIMIZE_STORAGE database option to ON. MINIMIZE_STORAGE = Guess, compression which another feature IQ uses to speed things up. If you intend on setting the MINIMIZE_STORAGE option, you must do this prior to creating the table where you want the IQ UNIQUE value to defaulted to.</p>
<p>Example;</p>
<p><code>CREATE TABLE order_entry<br />
(<br />
order_id        int   IDENTITY,<br />
customer_id     int   IQ UNIQUE (255)   NOT NULL,<br />
sales_id        int   IQ UNIQUE (10000)   NOT NULL,<br />
product_id      int   IQ UNIQUE (5000)   NOT NULL<br />
)<br />
SET OPTION MINIMIZE_STORAGE='ON';</code></p>
<p>CREATE TABLE statement</p>
<p>In a flat FP index a column of raw data is compressed but their is no storage optimization used. 1,2 and 3 byte indexes convert via look up tables.. ) zeros and ones.  Minus pictures I hope I explained  how IQ utilizes FP indexes and the DBA control over their optimization.</p>
<p>&nbsp;</p>
<p>The post <a href="http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/sybase-iq-15-x-fast-projection-index-overview-and-practical-usage/">Sybase IQ 15.x Fast Projection Index Overview and Practical Usage</a> appeared first on <a href="http://www.doblerconsulting.com">Dobler Consulting</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/sybase-iq-15-x-fast-projection-index-overview-and-practical-usage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating IQ Connections to ASE to Import Data</title>
		<link>http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/creating-iq-connections-to-ase-to-import-data/</link>
		<comments>http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/creating-iq-connections-to-ase-to-import-data/#comments</comments>
		<pubDate>Thu, 09 Aug 2012 18:55:37 +0000</pubDate>
		<dc:creator>Jeff Younce</dc:creator>
				<category><![CDATA[Sybase Tips]]></category>
		<category><![CDATA[Technology Tips & Tricks]]></category>
		<category><![CDATA[White Papers]]></category>
		<category><![CDATA[Ase]]></category>
		<category><![CDATA[Linux Servers]]></category>
		<category><![CDATA[Sybase Iq]]></category>
		<category><![CDATA[Sybase Software]]></category>

		<guid isPermaLink="false">http://www.doblerconsulting.com/?p=1635</guid>
		<description><![CDATA[<p>These Examples assume your using Linux (2.6.32-220.el6.x86_64 GNU/Linux) and IQ 15.4 Sybase IQ can create CIS connections to ASE, for example to access ASE data through an IQ-to-ASE proxy table. This can be done in two ways: through JDBC and ODBC. JDBC is easier to set up, but ODBC tends to be significantly faster. In addition, the JDBC connectivity class has been deprecated (If [...]</p><p>The post <a href="http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/creating-iq-connections-to-ase-to-import-data/">Creating IQ Connections to ASE to Import Data</a> appeared first on <a href="http://www.doblerconsulting.com">Dobler Consulting</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>These Examples assume your using Linux (2.6.32-220.el6.x86_64 GNU/Linux) and IQ 15.4</p>
<p>Sybase IQ can create CIS connections to ASE, for example to access ASE data through an IQ-to-ASE proxy table.<br />
This can be done in two ways: through JDBC and ODBC. JDBC is easier to set up, but ODBC tends to be significantly faster. In addition, the JDBC connectivity class has been deprecated (If you try to use CLASS &#8216;asejdbc&#8217;, You will receive a message box error via ISQL &#8221;asejdbc has been deprecated&#8221;)   in IQ 15.4 on Linux.</p>
<p>With IQ running on Linux, as is this case, setting up ODBC connections to ASE can be tricky, to say the least. What it doesn&#8217;t help is that the IQ documentation isn&#8217;t exactly a concise example of clarity on this point, either. Below is what I found out the hard way about setting up IQ-to-ASE ODBC connectivity on Linux</p>
<p><strong>IQ versions covered</strong><br />
The information about IQ-to-ASE ODBC connections below applies to IQ 15.4. As for OpenClient, I&#8217;ve used OCS 15.4, though it should also work for OpenClient 15.0 + (wasn&#8217;t tested). If you run into problems, (go to www.sybase.com -&gt; Support -&gt; EBFs/Maintenance -&gt; Software Developer Kit).</p>
<p><strong>IQ-to-ASE ODBC connections &#8211; basic syntax</strong><br />
To set up an ODBC connection from IQ to ASE, you need to use the following IQ statement:</p>
<p><code>create server MY_ASE_ODBC class 'aseodbc' using 'MY_ASE'</code></p>
<p>Precisely what to specify in the USING &#8216;&#8230;&#8217; clause depends on which of these two variations is chosen:</p>
<ol start="1">
<li>Specify the ODBC connection attributes directly in the IQ create server statement;</li>
<li>Use an ODBC Data Source Name (DSN), which is defined outside IQ and holds the ODBC connection attributes.</li>
</ol>
<p>We&#8217;ll look at both of these.</p>
<p>In the examples below, I&#8217;m assuming we&#8217;re on Linux and we&#8217;re trying to connect from IQ to an ASE server named &#8216;MY_ASE&#8217; running on port 5000 on host &#8216;ASE_15&#8242;.<br />
An IQ proxy table is then created to an ASE table named my_tab (owned by dbo) in databases my_db.</p>
<p><strong>The IQ-to-ASE ODBC driver &#8211; three vital setup steps</strong><br />
But first, and before going into either of the ODBC variations above, you need to get the following three things right:</p>
<ol start="1">
<li>You need to have the correct ODBC driver library installed: the filename of the driver lib is libsybdrvodb.so.<br />
However, this driver may not be bundled with your IQ installation. If it is not, the driver is included with ASE as well as with the OpenClient connectivity libraries (downloadable from www.sybase.com -&gt; Support -&gt; EBFs/Maintenance -&gt; Software Developer Kit).<br />
You must make sure you have this driver installed. It is OK, and perhaps even best, to install it in its own $SYBASE directory (it does not need to be in the IQ installation directory tree) . I copied the file and pasted it in several directories so I knew the ENV path would recognize it.</li>
<li>The second important thing is that you need the 64-bit version of the ODBC driver if your IQ server is 64-bit, and the 32-bit driver if you&#8217;re still running 32-bit IQ.<br />
It is vital to get this right. On the IQ side, you can find the IQ server&#8217;s bitness (if that&#8217;s considered a word) with a simple <code>select @@version or iqsrv15 -v Sybase<br />
IQ/15.4.0.6567/111107/P/GA/Enterprise Linux64 - x86_64 - 2.6.9-67.0.4.ELsmp/64bit/2011-11-07 00:40:24</code><br />
For the ODBC driver, the pathname tells you whether it&#8217;s 32- or 64-bit: the location is usually $SYBASE/DataAccess/ODBC/lib/libsybdrvodb.so or /opt/sybase/ASE_15_5/DataAccess64/ODBC/lib</li>
<li>The third essential requirement is that the pathname of the directory containing the ODBC driver file is in the IQ server&#8217;s $LD_LIBRARY_PATH environment variable (or equivalent on other platforms). This means you need to run the following <span style="text-decoration: underline;">before</span> starting the IQ server:<br />
<code>export LD_LIBRARY_PATH=<br />
/opt/sybase/ASE_15_5/DataAccess64/ODBC/lib:$LD_LIBRARY_PATH</code></li>
</ol>
<p>With these points covered, you can now start your IQ server&#8230;</p>
<p><strong>IQ-to-ASE ODBC connection, without DSN</strong><br />
Now, let&#8217;s look at defining an ODBC connection from IQ to ASE with declaring the ODBC attributes directly in the IQ create server statement (i.e. without using an ODBC DSN).</p>
<ul>
<li>&#8211; create remote server mapping through ODBC<br />
<code>create server MY_ASE_ODBC_1 class 'aseodbc'</code><br />
using &#8216;Driver=libsybdrvodb.so;Server=bigbox;Port=5000;Database=my_db;PacketSize=16384;EnableServerPacketSize=0&#8242;<span style="text-decoration: underline;">Important:</span>The Driver= clause must specify the ODBC driver&#8217;s filename (libsybdrvodb.so). It may also specify the full pathname to the ODBC driver file, but the driver&#8217;s directory pathname must still be included in the IQ server&#8217;s $LD_LIBRARY_PATH.Note that this also configures -optionally- a network packet size of 16KB; the ASE server must be able to handle this size, or the connection will fail (don&#8217;t ask me why EnableServerPacketSize=0 is needed &#8212; the PacketSize keyword was ignored without it).<br />
Also note that the contents of the using &#8216;&#8230;&#8217; clause are not checked at this stage; any errors will only be raised once IQ tries to make an actual connection.</li>
</ul>
<ul>
<li>&#8211; create external login for the IQ &#8216;dba&#8217; user<br />
&#8211; let&#8217;s assume it maps to the ASE &#8216;sa&#8217; user; adjust as needed<br />
<code>CREATE EXTERNLOGIN dba to MY_ASE_ODBC_1<br />
REMOTE  login sa IDENTIFIED BY sql;</code><span style="text-decoration: underline;">Important:</span> You <span style="text-decoration: underline;">must</span> create an external login: even though it looks as if you can specify the remote login name+password directly with using &#8216;&#8230;;UID=sa;Password=sql; the specified password is ignored (for some reason, with using &#8216;&#8230;;UserID=sa;&#8230;&#8217;, the specified username is ignored as well).</li>
</ul>
<ul>
<li>&#8211; test the connection; if there is any error in the setup, error messages will be raised now:<br />
<code>forward to MY_ASE_ODBC_1 { select @@servername, db_name(), @@version };</code></li>
</ul>
<ul>
<li>&#8211; if the connection works, create the proxy table:<br />
<code>create existing table ase_proxy_tab at 'MY_ASE_ODBC_1.my_db.dbo.my_tab';select * from ase_proxy_tab;</code></li>
</ul>
<p>&nbsp;</p>
<p>The post <a href="http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/creating-iq-connections-to-ase-to-import-data/">Creating IQ Connections to ASE to Import Data</a> appeared first on <a href="http://www.doblerconsulting.com">Dobler Consulting</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/creating-iq-connections-to-ase-to-import-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installation Errors with Sybase IQ 15.4 on CentOS</title>
		<link>http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/installation-errors-sybase-iq-15-4-on-centos/</link>
		<comments>http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/installation-errors-sybase-iq-15-4-on-centos/#comments</comments>
		<pubDate>Wed, 18 Jul 2012 15:43:36 +0000</pubDate>
		<dc:creator>Peter Dobler</dc:creator>
				<category><![CDATA[Sybase Tips]]></category>
		<category><![CDATA[Technology Tips & Tricks]]></category>
		<category><![CDATA[Graphical Installers]]></category>
		<category><![CDATA[Installation Resources]]></category>
		<category><![CDATA[Invocation]]></category>
		<category><![CDATA[Invocationtargetexception]]></category>
		<category><![CDATA[Java Application]]></category>
		<category><![CDATA[Java Awt Component]]></category>
		<category><![CDATA[Java Lang]]></category>
		<category><![CDATA[Java Security]]></category>
		<category><![CDATA[Jre]]></category>
		<category><![CDATA[Lib]]></category>
		<category><![CDATA[Lt]]></category>
		<category><![CDATA[Nbsp]]></category>
		<category><![CDATA[Red Hat Linux]]></category>
		<category><![CDATA[Rpm]]></category>
		<category><![CDATA[Shared Object]]></category>
		<category><![CDATA[Stack Trace]]></category>
		<category><![CDATA[Sun Security]]></category>
		<category><![CDATA[Sybase Iq]]></category>
		<category><![CDATA[Unknown Source]]></category>
		<category><![CDATA[Unsatisfiedlinkerror]]></category>
		<category><![CDATA[Vm]]></category>

		<guid isPermaLink="false">http://www.doblerconsulting.com/?p=1538</guid>
		<description><![CDATA[<p>Sybase IQ officially only supports Red Hat Linux and SuSe Linux. However, it will run on CentOS just fine. There are a couple of things that need to be configured to make this happen. After installing CentOS you need to install these additional rpm packages. libXext libXtst You can find the latest download versions for [...]</p><p>The post <a href="http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/installation-errors-sybase-iq-15-4-on-centos/">Installation Errors with Sybase IQ 15.4 on CentOS</a> appeared first on <a href="http://www.doblerconsulting.com">Dobler Consulting</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Sybase IQ officially only supports Red Hat Linux and SuSe Linux. However, it will run on CentOS just fine. There are a couple of things that need to be configured to make this happen.</p>
<p>After installing CentOS you need to install these additional rpm packages.</p>
<ul>
<li>libXext</li>
<li>libXtst</li>
</ul>
<p>You can find the latest download versions for these packages at <a href="http://rpmfind.net">http://rpmfind.net</a></p>
<p>&nbsp;</p>
<p>Failing to install these packages <strong>before</strong> running setup.bin will result in these errors:</p>
<p><strong><em>Graphical installers</em> are <em>not supported by the VM</em> </strong></p>
<p><code>./setup.bin<br />
Preparing to install...<br />
Extracting the JRE from the installer archive...<br />
Unpacking the JRE...<br />
Extracting the installation resources from the installer archive...<br />
Configuring the installer for this system's environment...<br />
Launching installer...<br />
Graphical installers are not supported by the VM. The console mode will be used instead...<br />
Invocation of this Java Application has caused an InvocationTargetException. This application will now exit. (LAX)<br />
Stack Trace:<br />
<strong>java.lang.UnsatisfiedLinkError: /tmp/install.dir.27720/Linux/resource/jre/lib/i386/xawt/libmawt.so: libXext.so.6: cannot open shared object file: No such file or directory</strong><br />
at java.lang.ClassLoader$NativeLibrary.load(Native Method)<br />
at java.lang.ClassLoader.loadLibrary0(Unknown Source)<br />
at java.lang.ClassLoader.loadLibrary(Unknown Source)<br />
at java.lang.Runtime.load0(Unknown Source)<br />
at java.lang.System.load(Unknown Source)<br />
at java.lang.ClassLoader$NativeLibrary.load(Native Method)<br />
at java.lang.ClassLoader.loadLibrary0(Unknown Source)<br />
at java.lang.ClassLoader.loadLibrary(Unknown Source)<br />
at java.lang.Runtime.loadLibrary0(Unknown Source)<br />
at java.lang.System.loadLibrary(Unknown Source)<br />
at sun.security.action.LoadLibraryAction.run(Unknown Source)<br />
at java.security.AccessController.doPrivileged(Native Method)<br />
at sun.awt.NativeLibLoader.loadLibraries(Unknown Source)<br />
at sun.awt.DebugHelper.&lt;clinit&gt;(Unknown Source)<br />
at java.awt.Component.&lt;clinit&gt;(Unknown Source)<br />
at com.zerog.ia.installer.util.BidiUtilImpl.setDefaultLocale(DashoA10*..)<br />
at ZeroGbd.a(DashoA10*..)<br />
at com.zerog.ia.installer.LifeCycleManager.s(DashoA10*..)<br />
at com.zerog.ia.installer.LifeCycleManager.b(DashoA10*..)<br />
at com.zerog.ia.installer.LifeCycleManager.a(DashoA10*..)<br />
at com.zerog.ia.installer.Main.main(DashoA10*..)<br />
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br />
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br />
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br />
at java.lang.reflect.Method.invoke(Unknown Source)<br />
at com.zerog.lax.LAX.launch(DashoA10*..)<br />
at com.zerog.lax.LAX.main(DashoA10*..)<br />
This Application has Unexpectedly Quit: Invocation of this Java Application has caused an InvocationTargetException. This application will now exit. (LAX)<br />
</code></p>
<p>Respectively&#8230;.</p>
<p><code> ./setup.bin<br />
Preparing to install...<br />
Extracting the JRE from the installer archive...<br />
Unpacking the JRE...<br />
Extracting the installation resources from the installer archive...<br />
Configuring the installer for this system's environment...<br />
Launching installer...<br />
Graphical installers are not supported by the VM. The console mode will be used instead...<br />
Invocation of this Java Application has caused an InvocationTargetException. This application will now exit. (LAX)<br />
Stack Trace:<br />
<strong>java.lang.UnsatisfiedLinkError: /tmp/install.dir.32049/Linux/resource/jre/lib/i386/xawt/libmawt.so: libXtst.so.6: cannot open shared object file: No such file or directory</strong><br />
at java.lang.ClassLoader$NativeLibrary.load(Native Method)<br />
at java.lang.ClassLoader.loadLibrary0(Unknown Source)<br />
at java.lang.ClassLoader.loadLibrary(Unknown Source)<br />
at java.lang.Runtime.load0(Unknown Source)<br />
at java.lang.System.load(Unknown Source)<br />
at java.lang.ClassLoader$NativeLibrary.load(Native Method)<br />
at java.lang.ClassLoader.loadLibrary0(Unknown Source)<br />
at java.lang.ClassLoader.loadLibrary(Unknown Source)<br />
at java.lang.Runtime.loadLibrary0(Unknown Source)<br />
at java.lang.System.loadLibrary(Unknown Source)<br />
at sun.security.action.LoadLibraryAction.run(Unknown Source)<br />
at java.security.AccessController.doPrivileged(Native Method)<br />
at sun.awt.NativeLibLoader.loadLibraries(Unknown Source)<br />
at sun.awt.DebugHelper.&lt;clinit&gt;(Unknown Source)<br />
at java.awt.Component.&lt;clinit&gt;(Unknown Source)<br />
at com.zerog.ia.installer.util.BidiUtilImpl.setDefaultLocale(DashoA10*..)<br />
at ZeroGbd.a(DashoA10*..)<br />
at com.zerog.ia.installer.LifeCycleManager.s(DashoA10*..)<br />
at com.zerog.ia.installer.LifeCycleManager.b(DashoA10*..)<br />
at com.zerog.ia.installer.LifeCycleManager.a(DashoA10*..)<br />
at com.zerog.ia.installer.Main.main(DashoA10*..)<br />
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br />
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br />
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br />
at java.lang.reflect.Method.invoke(Unknown Source)<br />
at com.zerog.lax.LAX.launch(DashoA10*..)<br />
at com.zerog.lax.LAX.main(DashoA10*..)<br />
This Application has Unexpectedly Quit: Invocation of this Java Application has caused an InvocationTargetException. This application will now exit. (LAX)</code></p>
<p>The post <a href="http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/installation-errors-sybase-iq-15-4-on-centos/">Installation Errors with Sybase IQ 15.4 on CentOS</a> appeared first on <a href="http://www.doblerconsulting.com">Dobler Consulting</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/installation-errors-sybase-iq-15-4-on-centos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrade Sybase ASE to Sybase ASE Cluster Edition &#8211; Step by Step</title>
		<link>http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/upgrade-sybase-ase-to-sybase-ase-cluster-edition-step-by-step/</link>
		<comments>http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/upgrade-sybase-ase-to-sybase-ase-cluster-edition-step-by-step/#comments</comments>
		<pubDate>Thu, 16 Dec 2010 03:54:27 +0000</pubDate>
		<dc:creator>Peter Dobler</dc:creator>
				<category><![CDATA[Sybase Tips]]></category>
		<category><![CDATA[Technology Tips & Tricks]]></category>
		<category><![CDATA[Adaptive Server]]></category>
		<category><![CDATA[Ase]]></category>
		<category><![CDATA[Backup Server]]></category>
		<category><![CDATA[Cluster Edition]]></category>
		<category><![CDATA[Database Integrity]]></category>
		<category><![CDATA[Database Server]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Discipline]]></category>
		<category><![CDATA[Edition Software]]></category>
		<category><![CDATA[Failure]]></category>
		<category><![CDATA[File Structure]]></category>
		<category><![CDATA[Filesystem]]></category>
		<category><![CDATA[Focus]]></category>
		<category><![CDATA[Lead]]></category>
		<category><![CDATA[Node]]></category>
		<category><![CDATA[Prerequisites]]></category>
		<category><![CDATA[Server Monitor]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Single Point]]></category>
		<category><![CDATA[Sybase Software]]></category>

		<guid isPermaLink="false">http://www.techtipsntrick.com/?p=191</guid>
		<description><![CDATA[<p>Install the Sybase ASE Cluster Edition Software Shared Installation With the new 15.5 version, you have to option to install the software either as shared installation or private installation. If you use the shared installation, you need to have access to a shared filesystem that is accessible from every node in the cluster. Although the [...]</p><p>The post <a href="http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/upgrade-sybase-ase-to-sybase-ase-cluster-edition-step-by-step/">Upgrade Sybase ASE to Sybase ASE Cluster Edition &#8211; Step by Step</a> appeared first on <a href="http://www.doblerconsulting.com">Dobler Consulting</a>.</p>]]></description>
				<content:encoded><![CDATA[<h2>Install the Sybase ASE Cluster Edition Software</h2>
<h3>Shared Installation</h3>
<p>With the new 15.5 version, you have to option to install the software either as shared installation or private installation. If you use the shared installation, you need to have access to a shared filesystem that is accessible from every node in the cluster. Although the shared installation is more convenient, it presents other risks like a single point of failure if the shared filesystem goes offline.</p>
<h3>Private Installation</h3>
<p>The private installation provides a dependency separation between nodes for added stability and protection. The private installation installs the Sybase software on each node, and does not require a shared filesystem. You need to maintain a strict file structure and placement discipline, because every node must access the software identically.</p>
<h3>Pre-Upgrade Steps</h3>
<p>Once you completed the prerequisites, you need to shift your focus to preparing the databases, and the database server.</p>
<ol>
<li>If you are upgrading Adaptive Server, the previously installed version of the server must be running. If you are upgrading Backup Server, Historical Server, Monitor Server, or XP Server, those servers must not be running. </li>
<li>Stored procedure text in the syscomments table is required for the upgrade. If you deleted the text, you must add it back again.
<p><strong>Note</strong>: As a best practice: if you don&#8217;t want to display the text, hide it by using the sp_hide_text stored procedure instead of deleting it.</p>
</li>
<li>Resolve reserved words using quoted identifiers. This is a simple check by installing the upgrade package and then executing sp_checkreswords.
<p><strong>Caution</strong>: This step is simple enough, but if omitted, can lead to serious issues during the upgrade process.</p>
</li>
<li>Perform some standard tasks that apply to any database server upgrade.
<ol type="a">
<li>Verify users are logged off. </li>
<li>Check for database integrity. Run DBCC commands to complete this step. </li>
<li>Back up the databases. As mentioned before, this will be your lifeline in case of a failed upgrade. </li>
<li>Ensure that master is the default database for the &#8220;sa&#8221; user. </li>
</ol>
</li>
<li>Prepare the database and devices for upgrade by following these steps:
<ol type="a">
<li>Disable auditing </li>
<li>Disable Job Scheduler by ensuring the &#8220;enable Job Scheduler&#8221; is off. </li>
<li>Archive auditing data and truncate auditing tables. </li>
<li>Disable disk mirroring.
<p><strong>Note</strong>: Sybase ASE Cluster Edition 15.5 does not support disk mirroring. This is important if you used the disk mirror approach to move your local database devices to the SAN. Please make sure that all device mirrors have been disabled.</p>
</li>
<li>Verify that your $SYBASE environment variable points to the location of the new Adaptive Server software files you just installed. </li>
</ol>
</li>
</ol>
<p> </p>
<h2>Manual Upgrade of an Existing ASE Server</h2>
<p>Your upgrade approach will be completely different based on the various upgrade options. I want to focus on the manual upgrade from a non-cluster ASE server to the ASE Cluster Edition 15.5.</p>
<p>For the full details of the manual upgrade, please review the Sybase ASE Cluster Edition Upgrade manual. The summary of the steps is:</p>
<ol>
<li>In order for Sybase ASE Cluster Edition to work and communicate, the unified agent must be running on each node of the cluster.
<p>Note: Now is a good time to get into the habit of starting, and verifying the unified agent before starting any database server.</p>
<p>Start the Unified Agent:</p>
<pre>$SYBASE/UAF-2_5/bin/uafstartup.sh &amp;</pre>
</li>
<li>Start your existing Sybase ASE server. Change the $SYBASE and $SYBASE_ASE variables to reflect the new location of the software. This process must be repeated when a restart of the existing Sybase ASE server is required.
<p> </p>
</li>
<li>Execute the $SYBASE/$SYBASE_ASE/upgrade/preupgrade command from the new software location to prepare your server for the upgrade. If there are errors reported, correct them and restart your existing Sybase ASE server. Repeat this step until no errors are displayed.
<p> </p>
</li>
<li>Check your existing Sybase ASE databases for new &#8220;reserved words&#8221; by installing and executing the sp_checkreswords stored procedure. Correct any errors prior to continuing the upgrade process.
<p><strong>Caution</strong>: Omitting this step can lead to serious problems during the upgrade process.</p>
<p> </p>
</li>
<li>One important part of installing a Sybase ASE Cluster Edition server is the requirement to have at least 2 network connections; 3 connections are even better. The additional network connections are needed for the server to interconnect via a primary private network and an optional secondary private network. In our example, we are using 2 private interconnects. Plus the public network access.
<p> </p>
</li>
<li>After shutting down the old server, you need to proceed with the cluster preparation. The first step is creation of a new cluster input file that describes your cluster environment. The first instance of the cluster must be the old server name. For this example, the filename mycluster.inp has been chosen.
<p>In addition, you need to have the network interconnect working. This is the back bone connection between the cluster nodes.</p>
<p>Here is an example of the mycluster.inp file, based on a shared installation:</p>
<pre>#all input files must begin with a comment

[cluster]
name = mycluster
max instances = 2
master device = /dev/raw/raw1
interfaces path = /sybase/
traceflags =
primary protocol = udp
secondary protocol = udp

[management nodes]
hostname = syb1
hostname = syb2

[instance]
id = 1
name = syb1
node = syb1
primary address = syb1-ppriv
primary port start = 38456
secondary address = syb1-spriv
secondary port start = 38466
errorlog = /sybase/ASE-15_0/install/syb1.log
interfaces path = /sybase/
traceflags =
additional run parameters =

[instance]
id = 2
name = syb2
node = syb2
primary address = syb2-ppriv
primary port start = 38556
secondary address = syb2-spriv
secondary port start = 38566
errorlog = /sybase/ASE-15_0/install/syb2.log
interfaces path = /sybase/
traceflags =
additional run parameters = </pre>
</li>
<li>Create the quorum device with the input file create in step 6. This is the core of the share disk cluster.
<p>Start the new instance with the old master device:</p>
<pre>$SYBASE/$SYBASE_ASE/bin/dataserver
--instance=server_name
--cluster-input=mycluster.inp
--quorum-dev=/dev/raw/raw102
--buildquorum
-M$SYBASE</pre>
<p> </p>
</li>
<li>You&#8217;re ready to run the upgrade utility. instance_name is the first instance in your cluster that has the same name as the server from which you are upgrading:
<pre>$SYBASE/$SYBASE_ASE/upgrade/upgrade  -S instance_name –Ppassword
  </pre>
</li>
<li>Create a tempdb for each instance in the cluster.
<p><strong>Note</strong>: This step is important. Without having the global temporary database for the second node in place, the cluster won&#8217;t start.</p>
<pre>1&gt;create system temporary database tempdb1 for instance syb1 on tempdb1 = 100
2&gt;go
1&gt;create system temporary database tempdb2 for instance syb2 on tempdb2 = 100
2&gt;go</pre>
<p>tempdb1 and tempdb2 are new raw devices on the SAN, accessible by both nodes. The size of the tempdb is arbitrary.</p>
</li>
<li>Restart the cluster with the quorum device in the run file:
<pre> $SYBASE/$SYBASE_ASE/bin/dataserver 
 --instance=server_name
 --quorum-dev=/dev/raw/raw102
 -M$SYBASE</pre>
<p> </p>
</li>
<li>Finish the upgrade with running a few scripts as described in the Sybase ASE Cluster Edition installation manual.
<p><strong>Note</strong>: This is an abbreviated version of the entire install procedure, but it demonstrates how straight-forward the upgrade actually is. As always, please review the Sybase ASE Cluster Edition Upgrade manual for details, as the configurations may be different for your environment.</p>
</li>
</ol>
<p>Once you upgraded your existing Sybase ASE server, you can add new nodes and convert your non-clustered ASE server into a multi node cluster with ease.</p>
<p> </p>
<h2>Conclusion</h2>
<p>Upgrading your existing Sybase ASE server to Sybase ASE Cluster Edition is pretty straight forward. Especially if your ASE Server is on release 15.x. Keep in mind that with the 15.x release, a new query optimizer was introduced, and extra steps to mitigate possible performance degradation have to be exercised. Once you upgraded your ASE server, you now have access to new tools and methods to address availability and scalability challenges.</p>
<p>In my humble opinion, this is possibly the easiest upgrade path from a non-cluster database system to a shared disk cluster. Sybase ASE Cluster Edition brings your organization better database resources, uses less hardware, and strengthens your computer applications.</p>
<p>The post <a href="http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/upgrade-sybase-ase-to-sybase-ase-cluster-edition-step-by-step/">Upgrade Sybase ASE to Sybase ASE Cluster Edition &#8211; Step by Step</a> appeared first on <a href="http://www.doblerconsulting.com">Dobler Consulting</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/upgrade-sybase-ase-to-sybase-ase-cluster-edition-step-by-step/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sybase ASE 15 Cluster Edition Step-By-Step Installation &#8211; Part 5</title>
		<link>http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/sybase-ase-15-cluster-edition-step-by-step-installation-part-5/</link>
		<comments>http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/sybase-ase-15-cluster-edition-step-by-step-installation-part-5/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 16:58:52 +0000</pubDate>
		<dc:creator>Peter Dobler</dc:creator>
				<category><![CDATA[Sybase Tips]]></category>
		<category><![CDATA[Technology Tips & Tricks]]></category>
		<category><![CDATA[Cluster Edition]]></category>
		<category><![CDATA[Hosts]]></category>
		<category><![CDATA[Installation Description]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux Environment]]></category>
		<category><![CDATA[Linux Install]]></category>
		<category><![CDATA[Linux Servers]]></category>
		<category><![CDATA[Network Adapters]]></category>
		<category><![CDATA[Node]]></category>
		<category><![CDATA[Raw Device]]></category>
		<category><![CDATA[Raw Devices]]></category>
		<category><![CDATA[Raw Filesystem]]></category>
		<category><![CDATA[Raw4]]></category>
		<category><![CDATA[Raw7]]></category>
		<category><![CDATA[Sdf1]]></category>
		<category><![CDATA[Sybase Dba]]></category>
		<category><![CDATA[Sybase Software]]></category>
		<category><![CDATA[System Requirements]]></category>
		<category><![CDATA[Tempdb]]></category>
		<category><![CDATA[Test Setup]]></category>
		<category><![CDATA[Vmware Server]]></category>

		<guid isPermaLink="false">http://www.techtipsntrick.com/?p=146</guid>
		<description><![CDATA[<p>Part 5 is the final part of the series and shows how to add an additional node to an existing Sybase cluster.</p><p>The post <a href="http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/sybase-ase-15-cluster-edition-step-by-step-installation-part-5/">Sybase ASE 15 Cluster Edition Step-By-Step Installation &#8211; Part 5</a> appeared first on <a href="http://www.doblerconsulting.com">Dobler Consulting</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Part 5 is the final part of the series and shows how to add an additional node to an existing Sybase cluster.</p>
<p>The 5 parts of this series are:</p>
<p>
<ul>
<li><a href="http://www.techtipsntrick.com/2009/11/22/sybase-ase-15-ce-step-by-step-installation-part-1/">Part 1: System Requirements and Test Setup Concept</a></li>
<li><a href="http://www.techtipsntrick.com/2009/11/25/sybase-ase-15-ce-step-by-step-installation-part-2-vmware/">Part 2: Setup of the VMWare Server and the Linux Servers</a></li>
<li><a href="http://www.techtipsntrick.com/2009/12/17/sybase-ase-15-cluster-edition-step-by-step-installation-part-3/">Part 3: Install of the Sybase Software</a></li>
<li><a href="http://www.techtipsntrick.com/2010/01/10/sybase-ase-15-cluster-edition-step-by-step-installation-part-4/">Part 4: Setup and test the Sybase Cluster </a></li>
<li><a href="http://www.techtipsntrick.com/2010/01/10/sybase-ase-15-cluster-edition-step-by-step-installation-part-5/">Part 5: Add an additional node to the cluster</a></li>
</ul>
<p>The instructions designed that non-Sybase DBA can perform these tasks. Sybase DBA will find that the steps are very similar to your standard ASE installation.</p>
<p>Please <a href="http://www.techtipsntrick.com/2010/01/10/sybase-ase-15-cluster-edition-step-by-step-installation-part-4/">click here</a> to read about how to setup and test the Sybase Cluster.</p>
<p><strong>Add an Additional Node to the Sybase Cluster</strong></p>
<p><strong>Preparation</strong></p>
<p>The process adding a node to the cluster can be executed when the cluster is active. The steps are very simple and non-intrusive.</p>
<p>Note: As a pre-requisite the steps to setup the Linux environment for the original nodes must be followed before actually adding a node to the Sybase ASE cluster. The new node should already be configured with all network adapters, all the disks should have be mounted with right permissions etc.. Since the /sybase filesystem is a NFS share no other extra steps are needed for this preparation step. Simply follow the steps in the installation description. The only new raw filesystem that will be added is the temp device for the tempdb on the new node. This will be the new raw device raw 9 and must be mounted to all nodes.</p>
<p>The new /etc/raw looks like this and has to be the same in all nodes (asece1,asece2,asece3):</p>
<p><code>sybase@asece3:~&gt; cat /etc/raw<br />
  # /etc/raw<br />
  #<br />
  # sample configuration to bind raw devices<br />
  # to block devices<br />
  #<br />
  # The format of this file is:<br />
  # raw:<br />
  #<br />
  # example:<br />
  # ---------<br />
  # raw1:hdb1<br />
  #<br />
  # this means: bind /dev/raw/raw1 to /dev/hdb1<br />
  #<br />
  # ...<br />
  raw1:sdb1<br />
  raw2:sdc1<br />
  raw3:sdd1<br />
  raw4:sde1<br />
  raw5:sdf1<br />
  raw6:sdg1<br />
  raw7:sdh1<br />
  raw8:sdi1<br />
  raw9:sdj1<br />
sybase@asece3:~&gt;</code></p>
<p>Please make sure that the /dev/raw/raw9 is owned by the sybase user.</p>
<p>The new /etc/hosts looks like this:<br />
  <code>asece1:~ # cat /etc/hosts<br />
  #<br />
  # hosts This file describes a number of hostname-to-address<br />
  # mappings for the TCP/IP subsystem. It is mostly<br />
  # used at boot time, when no name servers are running.<br />
  # On small systems, this file can be used instead of a<br />
  # "named" name server.<br />
  # Syntax:<br />
  #<br />
  # IP-Address Full-Qualified-Hostname Short-Hostname<br />
  #<br />
127.0.0.1 localhost<br />
# special IPv6 addresses<br />
  ::1 localhost ipv6-localhost ipv6-loopback<br />
fe00::0 ipv6-localnet<br />
ff00::0 ipv6-mcastprefix<br />
  ff02::1 ipv6-allnodes<br />
  ff02::2 ipv6-allrouters<br />
  ff02::3 ipv6-allhosts<br />
# Public IP Addresses<br />
  192.168.1.210 asecenfs.localhost.org asecenfs<br />
  192.168.1.211 asece1.localhost.org asece1<br />
  192.168.1.212 asece2.localhost.org asece2<br />
  192.168.1.213 asece3.localhost.org asece3<br />
# Rpimary Private Network<br />
  192.168.159.211 asece1-ppriv.localhost.org asece1-ppriv<br />
  192.168.159.212 asece2-ppriv.localhost.org asece2-ppriv<br />
  192.168.159.213 asece3-ppriv.localhost.org asece3-ppriv<br />
# Secondary Private Network<br />
  192.168.207.211 asece1-spriv.localhost.org asece1-spriv<br />
  192.168.207.212 asece2-spriv.localhost.org asece2-spriv<br />
  192.168.207.213 asece3-spriv.localhost.org asece3-spriv<br />
  asece1:~ #</code></p>
<p>This is pretty much all the prep work that needs to be done to add a node to an existing Sybase ASE cluster.</p>
<p><strong>Installation Steps</strong></p>
<p>1. Increase the number of max instances parameter if not set to include an additional instance<br />
  The cluster must be shutdown to execute this command.<br />
  <code>sybase@asece1:~&gt; sybcluster -Uuafadmin -P -C mycluster -F "asece1,asece2"<br />
  &gt; connect to mycluster<br />
  mycluster&gt; shutdown cluster<br />
  Are you sure you want to shutdown the cluster? (Y or N): [ N ] y<br />
  INFO - Shutdown of cluster mycluster has completed successfully.<br />
  mycluster&gt;set cluster maxInst 3<br />
  The value has been changed.<br />
  Would you like to recalculate the primary and secondary network ports? (Y or N): [ N ] Y<br />
  Enter the starting port number: [ 15100 ]<br />
  Recalculated port range: 1 Primary ase1 15100 to 15114<br />
  Recalculated port range: 2 Primary ase2 15115 to 15129<br />
  Recalculated port range: 1 Secondary ase1 15146 to 15160<br />
  Recalculated port range: 2 Secondary ase2 15161 to 15175<br />
  Should these port numbers be applied to the cluster? (Y or N): [ N ] Y<br />
  The values have been changed.</code></p>
<p>2. Start the unified agent on the new node<br />
  <code>sybase@asece3&gt;$SYBASE_UA/bin/uafstartup.sh &amp;</code><br />
  3. Deploy the cluster configuration to the new node.<br />
  <code>sybase@asece1:~&gt; sybcluster -Uuafadmin -P -C mycluster -F "asece1,asece2"<br />
  &gt;deploy plugin agent "asece3"<br />
  Enter the name of the cluster: mycluster<br />
  Verifying the supplied agent specifications...<br />
  1) asece3.localhost.org 9999 2.5.0 Linux<br />
  Enter the number representing the cluster node : [ 1 ] 1<br />
  Enter the full path to the quorum disk: /dev/raw/raw2<br />
  Enter the SYBASE home directory: [ /sybase ]<br />
  Enter the environment shell script path: [ /sybase/SYBASE.sh ]<br />
  Enter the ASE home directory: [ /sybase/ASE-15_0 ]<br />
  Deploying the cluster management agent plugin...<br />
  Agent plugin deployed successfully.<br />
  &gt;exit<br />
  </code></p>
<p>4. Add the new node/instance to the cluster<br />
  Before adding an instance to the cluster, the tempdb device must exist. Create the mycluster3_tempdb device on /dev/raw/raw9 either through Sybase Central or isql. Once created, continue with the procedure.<br />
  SQL Command:<br />
  <code>USE master<br />
  go<br />
  disk init name='mycluster3_tempdb', physname='/dev/raw/raw9', vdevno=7, size=512000, cntrltype=0, dsync=true, directio=false<br />
  go</code><br />
  <strong>Note: The new instance is down by default and you start it manually&#8230;</strong></p>
<p><code>mycluster&gt; start instance ase3</code></p>
<p><code>sybase@asece1:~&gt; sybcluster -Uuafadmin -P -C mycluster -F "asece1,asece2,asece3"<br />
  &gt; connect to mycluster<br />
  mycluster&gt;start cluster<br />
  .<br />
  .<br />
  .<br />
  .<br />
  INFO - 02:00:00000:00062:2008/12/23 08:37:01.75 kernel Sequence table svrid=2, tblcol=0, tblindex=1, count=0.<br />
  INFO - 02:00:00000:00062:2008/12/23 08:37:01.75 kernel instance 2 eventdone.<br />
  INFO - 02:00:00000:00002:2008/12/23 08:37:01.83 server ASE's default unicode sort order is 'binary'.<br />
  INFO - 02:00:00000:00002:2008/12/23 08:37:01.83 server ASE's default sort order is:<br />
  INFO - 02:00:00000:00002:2008/12/23 08:37:01.83 server 'bin_iso_1' (ID = 50)<br />
  INFO - 02:00:00000:00002:2008/12/23 08:37:01.83 server on top of default character set:<br />
  INFO - 02:00:00000:00002:2008/12/23 08:37:01.83 server 'iso_1' (ID = 1).</code></p>
<p><code>mycluster&gt;add instance ase3<br />
  Verifying the supplied agent specifications...<br />
  1) asece1.localhost.org 9999 2.5.0 Linux<br />
  2) asece2.localhost.org 9999 2.5.0 Linux<br />
  3) ce3.localhost.org 9999 2.5.0 Linux<br />
  Enter the number representing the cluster node where ase3 will reside: [ 3 ] 3<br />
--------------------------------------------------------<br />
  Instance Id 1; ase1 uses transport tcp on port 19786.<br />
  Instance Id 2; ase2 uses transport tcp on port 19786.<br />
  Enter the interface file query port number for instance ase3: 19786<br />
  Backup Server is configured for the cluster. Do you want to configure it for this instance too? [ Y ] Y<br />
  Enter the Backup Server port number for node "mycluster": 19799<br />
  Enter the primary protocol address for ase3: [ asece3.localhost.org ] asece3-ppriv<br />
  Enter the secondary protocol address for ase3: [ asece3.localhost.org ] asece3-spriv<br />
--------------------------------------------------------<br />
  Calculating default ports. Please wait...<br />
  Currently defined protocols specifications by Instance<br />
  Instance Id 1; Name: ase1; Primary 15100 - 15114; Secondary 15146 - 15160<br />
  Instance Id 2; Name: ase2; Primary 15115 - 15129; Secondary 15161 - 15175<br />
  Enter the primary protocol starting port for instance ase3: [ 15130 ]<br />
  Enter the secondary protocol starting port for instance ase3: [ 15176 ]<br />
--------------------------------------------------------<br />
  Device: master Used: 70 Mb Size 180 Mb<br />
  Path: /dev/raw/raw1<br />
  Device: tapedump1 Used: 0 Mb Size 0 Mb<br />
  Path: /dev/nst0<br />
  Device: tapedump2 Used: 0 Mb Size 625 Mb<br />
  Path: /dev/nst1<br />
  Device: sysprocsdev Used: 135 Mb Size 180 Mb<br />
  Path: /dev/raw/raw4<br />
  Device: systemdbdev Used: 12 Mb Size 80 Mb<br />
  Path: /dev/raw/raw5<br />
  Device: mycluster1_tempdb Used: 900 Mb Size 1,000 Mb<br />
  Path: /dev/raw/raw7<br />
  Device: mycluster2_tempdb Used: 900 Mb Size 1,000 Mb<br />
  Path: /dev/raw/raw8<br />
  Device: sybmgmtdev Used: 180 Mb Size 180 Mb<br />
  Path: /dev/raw/raw6<br />
  Device: data Used: 2,208 Mb Size 10,000 Mb<br />
  Path: /dev/raw/raw3<br />
  Device: mycluster3_tempdb Used: 0 Mb Size 1,000 Mb<br />
  Path: /dev/raw/raw9<br />
  --------------- Local System Temporary Database ---------<br />
  The Local System Temporary Database Device contains a database for each instance in the cluster.<br />
  Enter the LST device name: mycluster3_tempdb<br />
  Note: The device can be an existing one if there are enough spaces to it....<br />
  Enter the LST database name: [ mycluster_tdb_3 ]<br />
  Enter the LST database size (MB): [ 1000 ] 900<br />
  --------------------------------------------------------<br />
  Would you like to save this configuration information in a file? [ Y ] Y<br />
  Enter the name of the file to save the cluster creation information: [ /sybase/mycluster_ase3.xml ]<br />
  --------------------------------------------------------<br />
  Add the instance now? [ Y ]<br />
  INFO - Creating the Cluster Agent plugin on node asece3.localhost.org using agent: asece3.localhost.org:9999<br />
  A cluster agent plugin at asece3.localhost.org:9999 is already managing a cluster by the name mycluster.<br />
  Should this agent plugin be reused for the cluster: [ N ] Y<br />
  INFO - The Cluster Agent Plugin on agent asece3.localhost.org:9999 will be reused.<br />
  Adding the new instance...<br />
  INFO - ase3: Creating the Local System Temporary database ase3_tempdb on ase3_tempdb of size 900M.<br />
  The addition of the instance ase3 has completed.</code></p>
<p><code>sybc&gt; show cluster status<br />
  INFO - Listening for the cluster heartbeat. This may take a minute. Please wait... (mycluster::AseProbe:434)<br />
  Id Name Node State Heartbeat<br />
  -- ---- ------------------ ----- ---------<br />
  1 ase1 asece1.localhost.org Up Yes<br />
  2 ase2 asece2.localhost.org Up Yes<br />
  3 ase3 asece3.localhost.org Down No<br />
  -- ---- ------------------ ----- ---------</code></p>
<p>This is all it takes to add an additional node to an existing Sybase cluster. It is simple, straight forward and can be implemented in minutes. The only downside is that the cluster has to be down in order to deploy a new node agent. If this could be done while the cluster is up and running that would be as close to complete dynamic horizontal deployment as it gets.</p>
<p>During my tests I repeated this step several times to see how easy and quickly it is to recover from a failed node expansion and it could be easier than this. Simply shutdown down the agent on the new node, remove the files in
<pre>$SYBASE_UA/nodes/asece3/plugins/mycluster</pre>
<p> and repeat the steps above. It worked every time without a hitch. Every DBA will appreciate the simplicity.</p>
<p><strong>Conclusion:</strong><br />
  I hope this 5 part step-by-step mini course provided you with all the information needed to create your very own Sybase ASE 15 CE cluster environment.</p>
<p>  Thank you for your interest and please stay tuned for more step-by-step instructions on other technologies.</p>
<p>The post <a href="http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/sybase-ase-15-cluster-edition-step-by-step-installation-part-5/">Sybase ASE 15 Cluster Edition Step-By-Step Installation &#8211; Part 5</a> appeared first on <a href="http://www.doblerconsulting.com">Dobler Consulting</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.doblerconsulting.com/tech-tips-tricks/sybase-tips/sybase-ase-15-cluster-edition-step-by-step-installation-part-5/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.451 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2013-05-21 23:26:08 -->

<!-- Compression = gzip -->