If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Sybase > How to load data in Sybase IQ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-05-08, 07:37
niranjan555 niranjan555 is offline
Registered User
 
Join Date: Aug 2007
Posts: 59
How to load data in Sybase IQ

Hi,
i am using both sybase ase and iq server. i want to load some data from ase to iq server using following command:

insert into tablename
location 'srvname.dbname' packetsize 10240
{select * from tablename}

I have ase entry in iq ini file and iq entry in ase ini file. also using same login on both servers.
but while executing the above command, getting error:
"the attempt to connect server failed"

help me in loading data from ase to iq server.
or is there any other method to load data , any utility like bcp in ase ?


Regards
Reply With Quote
  #2 (permalink)  
Old 04-05-08, 08:54
trvishi trvishi is offline
Registered User
 
Join Date: Sep 2003
Location: Switzerland
Posts: 443
The syntax looks right. Usually the error indicates the login/pwd doesnt match. Check for case sensitivity maybe ? Try connecting to ASE and IQ manually from the env and see if it works.


Inserting directly from an Adaptive Server Enterprise database
You can insert data easily from an Adaptive Server Enterprise or SQL Server database, using the LOCATION syntax of the INSERT statement. You can also use this method to move selected columns from a pre-Version 12 Sybase IQ database into a Version 12.x database.

In order to use this capability, all of the following must be true:

The Sybase connectivity libraries must be installed on your system, and the load library path environment variable for your platform must point to them.

The Adaptive Server Enterprise server to which you are connecting must exist in the interfaces file on the local machine.

You must have read permission on the source ASE or pre-Version 12 IQ database, and INSERT permission on the target IQ 12.x database

Inserting data directly from Adaptive Server Enterprise

Connect to both the Adaptive Server Enterprise and the Sybase IQ 12.x database using the same user ID and password.

On the Sybase IQ 12.x database, issue a statement using this syntax:

INSERT INTO asiq_table
LOCATION 'ase_servername.ase_dbname'
{ SELECT col1, col2, col3,...
FROM owner.ase_table }

Issue a COMMIT to commit the insert.


2. BCP equivalent is LOAD TABLE. Read up on Load Table in http://infocenter.sybase.com/help/in...q_12.6/toc.xml

Eg.,
LOAD TABLE employee FROM 'emp.txt'
ESCAPES OFF
QUOTES OFF;

Last edited by trvishi; 04-05-08 at 08:59.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On