473,785 Members | 2,720 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MQT on a nickname

I need to create an MQT on a nickname, the requirement is that I need
to transfer data from source to target when required (this is because
the nickname is slow - i can't implement required indices on the
source table - tooo large).
So when I tried
create table table1 as (select * from nickname) data initially
deferred refresh deferred;
it returned sql0142N error - sql statement not supported.

Both source and target dbs are db2 version 9.5.
I also tried aggregation in the select stmt of the above command

create table table1 (col1,col2...co ln,count1) as (select
col1,col2,col3, ...coln,count(* ) from nickname
group by col1,col2,col3. ....coln)

still no joy.

Have anyone come across this scenario or have any advise on how I
could tackle this?
I started to read about sql replication, it is just plain fat-slow
solution and my learning curve is high.
If someone has other ideas to tackle the situation , would be much
appreciated if you can share it.

Thanks
Arun
Jul 23 '08 #1
4 3211
Arun Srinivasan wrote:
I need to create an MQT on a nickname, the requirement is that I need
to transfer data from source to target when required (this is because
the nickname is slow - i can't implement required indices on the
source table - tooo large).
So when I tried
create table table1 as (select * from nickname) data initially
deferred refresh deferred;
it returned sql0142N error - sql statement not supported.

Both source and target dbs are db2 version 9.5.
I also tried aggregation in the select stmt of the above command

create table table1 (col1,col2...co ln,count1) as (select
col1,col2,col3, ...coln,count(* ) from nickname
group by col1,col2,col3. ....coln)

still no joy.

Have anyone come across this scenario or have any advise on how I
could tackle this?
I started to read about sql replication, it is just plain fat-slow
solution and my learning curve is high.
If someone has other ideas to tackle the situation , would be much
appreciated if you can share it.
Arun,

We can not reproduce the issue.
Can you post the exact DDL and the error message as you receive it?

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Jul 24 '08 #2
db2 =create table elg.artelgf as (select * from elg.artelgf_l2) data
initially deferred refresh deferred
DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it
returned:
SQL0142N The SQL statement is not supported.

The table elg.artelgf_l2 is a nickname that points to a table in db2
version 9.1. My target is in db2 version 9.5. I also thought
the mismatch in user id may cause authentication problems and created
user mappings, still no joy.

db2 "create table elg.artelgf as (select client_cd, count(*) as cnt
from elg.artelgf_l2 group by client_cd) data initially deferred
refresh deferred"
DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it
returned:
SQL0142N The SQL statement is not supported.

db2 "create table elg.artelgf(cli ent_cd,claim_id ) as (select
client_cd, count(*) as cnt from elg.artelgf_l2 group by client_cd)
data initially deferred refresh deferred"
DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it
returned:
SQL0142N The SQL statement is not supported.

Any ideas or suggestions would be much appreciated.

Thank you
Arun
Jul 25 '08 #3
Arun Srinivasan wrote:
db2 =create table elg.artelgf as (select * from elg.artelgf_l2) data
initially deferred refresh deferred
DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it
returned:
SQL0142N The SQL statement is not supported.

The table elg.artelgf_l2 is a nickname that points to a table in db2
version 9.1. My target is in db2 version 9.5. I also thought
the mismatch in user id may cause authentication problems and created
user mappings, still no joy.

db2 "create table elg.artelgf as (select client_cd, count(*) as cnt
from elg.artelgf_l2 group by client_cd) data initially deferred
refresh deferred"
DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it
returned:
SQL0142N The SQL statement is not supported.

db2 "create table elg.artelgf(cli ent_cd,claim_id ) as (select
client_cd, count(*) as cnt from elg.artelgf_l2 group by client_cd)
data initially deferred refresh deferred"
DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it
returned:
SQL0142N The SQL statement is not supported.
Does the query itself work without the CREATE TABLE?
Let's first exclude federation (license, limitations)as a cultprit).
What does a db2set from your shell show?
Is FEDERATED turned on (I think its a DBM CFG).

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Jul 26 '08 #4
DB2_CAPTURE_LOC KTIMEOUT=ON
DB2RSHCMD=/usr/bin/ssh
DB2_EXTENDED_OP TIMIZATION=Y
DB2_ANTIJOIN=Y
DB2COMM=TCPIP
DB2_PARALLEL_IO =*:5

Sorry for the delayed response Serge, ..

I have run the query against the nickname 100s of times.

Also, Federated is turned on, since I am able to create nicknames and
run select statements against it. I think I'd have to open a PMR.
Jul 28 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1797
by: Ryan Kuan | last post by:
Hi All, Has anyone tried creating a trigger that update a remote table via a nickname? Thanks Ryan
2
12935
by: Guru | last post by:
Hi All Can someone explain what is the difference between Alias and Nickname? Warm Regards Guru
0
1814
by: aj | last post by:
DB2 WSE LUW 8.1 Fixpak 5 Red Hat AS 2.1 I'm trying to set up a federated view from one DB2 database to another in the same instance on the same server. I do a: create server <SERVER> type DB2/UDB version 8.1 wrapper DRDA authorization <INSTANCE_OWNER> password "<PASSWD>" options (NODE 'LOCAL',DBNAME '<DBNAME>',FOLD_ID 'N',FOLD_PW 'N')
6
3035
by: _link98 | last post by:
Problem: getting SQL0181N for queries on nicknames to remote Union-All-View. Can't see what I'm doing wrong yet, maybe someone has seen this before. Environment: UDB ESE 8.1 + FIXPAK 9A, on Solaris 8.1, with 64-bit instances. I have a NICKNAME called REMOTE_DW.T_MYTABLE which points to a "union-all-view". Several other nicknames exist to regular-tables and regular views in
5
15801
by: Jiggaz | last post by:
Hi, Look my stored procedure : __________________ ALTER PROCEDURE dbo.CreateAccount @Nickname varchar(30), @Password varchar(15), @Email varchar(50), @Date datetime,
3
7669
by: Jean-Marc Blaise | last post by:
Hi, Is there any reason why a CREATE NICKNAME statement fails if the remote object is an ALIAS ? I actually have an ALIAS that is used to point to the correct table in the remote DB, and would like the nickname to point to this alias, avoiding the obligation to drop and recreate the nickname any time. Thanks for your help,
6
6219
by: Prasad | last post by:
Hi, We have DB2 7 fixpak 14 on AIX 5.1. There are federated links (nicknames) established for tables in Informix database. One of the table was modified in Informix. The table has now got 3 new columns. These columns are not seen in DB2 nickname definition. When we run the queries, we do not see these columns in the result. When we describe the nickname, these columns are not present.
13
3336
by: CindySue | last post by:
I have a table of providers that has a license number and fullname field, among others. Deman helped me with being able to enter a nickname and having it change to the fullname if a nickname exists in a nickname table when I have new entries. I also have a table called TA where I enter requests, linking to the providers table with the license number. (The fullname field exists only in the providers table.) I'd like to be able to query the TA...
7
3246
by: Arun Srinivasan | last post by:
I have a problem, I am getting SQL1042N The SQL statement is not supported. error when I try to create a MQT against a nickname. The source db is db2 version 9.1 fixpack 4, same as the target db and so the SQL is definitely supported and both are in windows 2003 server. Is there a way I could find why this error pops up. My syntax is like create mqt1 as (select col1, col2, ..............., colN from nickname where <predicate>) data...
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9481
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10155
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10095
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7502
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5383
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4054
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3655
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2881
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.