Tag Info

New answers tagged

0

First make sure db2 is started: #> db2 connect to <db> If that's not ok, use db2start. Next what port is db2 listening to? #> cat /etc/services | grep db2 If it's not 50000 change your connections string in DBeaver. Next try to telnet to the port (assuming it is 50000): #> telnet localhost 50000 If that's fine (saying something like ...


0

If you're on a Linux command line you could also use db2 LOAD FROM /dev/null of del REPLACE INTO MYSCHEMA.MYTABLE This is the hard way to empty a table, even if it's being referenced by a foreign key. It does however leave the table in an invalid state (since you may have broken referential integrity). Your table won't be accessible untill you issue the ...


10

As was pointed out in ypercube's answer, when there is no ORDER BY clause there is no defined order. What I would like to add is that it's important to realise that SQL is very much an abstraction, it does not specify step by step what the DBMS is to do but rather specifies your requirements of the end result. This implies that if the data is already ...


14

No, your colleague is wrong. All SQL proroducts - DBMS that behave according to the SQL standards - provide no guarantee that the result of a query output will be ordered in any way, unless there is an ORDER BY clause in the query. As the IBM DB2 docs mention: Ordering is performed in accordance with the comparison rules described in Language elements. ...


1

Since the production portion of this question hasn't been answered, I have an example of where it would be useful. I'm backing up a production table to my userspace. This table contains a lot of data (~850GB compressed) and backing up through normal means isn't possible because the log file it generates (over 18GB prior to me killing the insert) cause ...


0

You cannot reduce tablespaces under DB2 9.5 as the reclaimable storage attribute is not set until 9.7. See my answer here regarding migrating from 9.7 to 10.5, where I discuss this.


0

Only if you care to have something communicating with your database on TCPIP. As far as I know db2move does not copy over db cfg settings.


0

You could issue a TRUNCATE against the table. Or detach the partitions and do the same. There are also some pointers from DB2 veteran Ember Crooks about deleting data in one of her blog entries. I find her tips and tricks quite helpful.


3

I don't think your assumption about "different drivers to connect to DB2 for iSeries and DB2 for Linux, UNIX and Windows" is correct. There is a single IBM Data Server Client that is used to connect to DB2 for LUW, DB2 for System i, DB2 for z/OS, and Informix servers. However, what you quote seems to reference DB2 server software, not drivers, and there ...


1

I believe the "common server" product is the one known as DB2 for Linux, UNIX, and Windows. As that one uses the same code base (for the most part) across those platforms. And the driver is the same. I'm guessing the code bases for these products differed at one point. DB2 for z and DB2 for i are different as they are more integrated into the operating ...


-1

4. or you can create an IDENTITY field CREATE TABLE LYNX.TRANS_AUDIT ( TA_ID **INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY NOT NULL**, TA_KEY_VALUE VARCHAR(100), TA_TABLE_CHANGED VARCHAR(40), TA_FIELD_CHANGED VARCHAR(40), TA_OLD_FIELD_VALUE VARCHAR(100), TA_NEW_FIELD_VALUE VARCHAR(100), TA_USER_WHO_CHANGED VARCHAR(128), TA_DATE_CHANGED TIMESTAMP, ...


1

Apparently, whatever you are doing tries to CREATE OR REPLACE the function SYSTOOLS.JSON_VAL2. To replace any object the ID performing the operation must be the owner of that object, that is, the same ID that issued the very first CREATE statement. You have several options: Use the TRANSFER OWNERSHIP statement to change the function owner. SECADM can do ...



Top 50 recent answers are included