Hi,
There is one more quick and easy way.
db2 "export to myfile.del of del select text from syscat.routines where < your condition >"
above will export your text in clean format and you can use it wherever you want.
Cheers, Vijay
User Profile
Collapse
-
Once you drop the tablespace, all associated containers are dropped and all your data inside that tablespace will be lost.
No, container doesn't gets empty. It is completely dropped.
Cheers, VijayLeave a comment:
-
If your servers os and type is same then you can go for direct restore. Else use db2move export/load option to move between server which have different endianess.
http://publib.boulder.ibm.com/infoce...e/r0001976.htm
Cheers, Vijay...Leave a comment:
-
vijay2082 replied to how to identify greater than one changes of a field in one day from mainframe DB2 tabin DB2You may want to look out for Temporal table feature introduces in DB2 MF V10.
http://pic.dhe.ibm.com/infocenter/dz...versioning.htm
Prior to this you would have to create history table for the main table and write trigger to store old values with the timestamp and then record the changes.
Cheers, Vijay...Leave a comment:
-
Hi, certainly this behaviour is not relared to DB2 being multithreaded. Looks like there is a bug in your application coding which is not commiting appropriately or some transaction is using more logs than expected.
Coupld of suggestions. Try increase your primary logs ( required deactivating the database). This will give you more window to diagnose your issue. Look out for any transaction which is holding active log for a long time....Leave a comment:
-
Hi,
use below query and replace the current date with your column name which is a date data type.
C:\>db2 -x "select cast(year(curre nt date) as char(4)) ||','|| cast(month(curr ent date) as char) from sysibm.sysdummy 1 with ur"
2013,4
C:\>db2 "select cast(year(curre nt date) as char(4)) ||','|| cast(month(curr ent date) as char) from sysibm.sysdummy 1 with ur"
...Leave a comment:
-
Hi,
Works well for me on db2 9.5
C:\>db2 "create table test (name varchar(200) for bit data)"
DB20000I The SQL command completed successfully.
C:\>db2 describe table test
Data type Column
Column name schema Data type name Length Scale Nulls
-------------------------------...Leave a comment:
-
Hi,
Below is the SQL Limit for Varchar and long varchar in DB2 V9.7 . Try to use clob if your requirement is to store data beyond limits of varchar.
Maximum length of VARCHAR (in bytes) : 32672
Maximum length of LONG VARCHAR (in bytes) : 32700
http://pic.dhe.ibm.com/infocenter/db...Fr0001029.html
Cheers, Vijay...Leave a comment:
-
Hi,
update and delete are 2 transactions and can't be provided in same query. This is against RDBMS principles and is there to provide the data integrity.
Cheers, VijayLeave a comment:
-
No this is not possible unless you have purchased db2 recovery expert. You can use a trail version though and check this type of recovery your self.
There are other recovery options available to accomplish above task rather than mining log which is tedious and error prone.
1) Restore old db backup and extract data(PIT recovery)
2)you the option of restoring only set of tablespaces that contain table along with catalog...Leave a comment:
-
vijay2082 replied to How to update the status of a particular row as 1 if the whole record already exists?in DB2to be more precise on update, below will work for you.
[myserver::db2in st1::/home/db2inst1]db2 "update (select SRNO,row_number () over(partition by SRNO,NAME,LOCAT ION) as row_num from test) set srno=2 where row_num=2"
DB20000I The SQL command completed successfully.
[myserver::db2in st1::/home/db2inst1] db2 "select * from test"
SRNO NAME LOCATION ADDRESS
-----------...Leave a comment:
-
vijay2082 replied to How to update the status of a particular row as 1 if the whole record already exists?in DB2Hi,
Use below login to do this. Use update and the construct in place of delete.
First way
==========
[myserver::db2in st1::/home/db2inst1] db2 connect to sample
db2 "crea
Database Connection Information
Database server = DB2/AIX64 9.7.6
SQL authorization ID = DB2INST1
Local database alias = SAMPLE
[myserver::db2in st1::/home/db2inst1] db2...Leave a comment:
-
Hi,
Set the lock timeout dbcfg param as 60 or more depending on the application setup and setup a deadlock monitor as well.
http://publib.boulder.ibm.com/infoce.../r0000329.html
You can also want to set curr_commit value to help you in unnecessary locking.
Also in V9.7 memory for locking requirements has been increased so you should...Leave a comment:
-
Hi,
can you provide your exact import and load command with the result and error text.
Also give the table description
db2 "describe table <tabschema>.<ta bname>"
Cheers, VijayLeave a comment:
-
Hi,
try both the solutions and see if that helps. If not then provide the messages file durig the import, the table ddl and the db2diag.log file entry for the complete operation.
http://www-01.ibm.com/support/docvie...id=swg21216804
http://www-01.ibm.com/support/docvie...id=swg21500631
Cheers, Vijay...Leave a comment:
-
vijay2082 replied to DBM parameter NUMDB has value 8. Should I change it to 1 because I have only 1 DB?in DB2HI,
it's not required to chnage that parameter. Unless you have those many databases and they are active at the same time. At this time db2 database mananger will try to compesate memroy between the databases if it's set to automatic.
Even if you change it now in yoru present case, it's not going to give you any additional benefit. But yes you can change it.
Cheers, VijayLeave a comment:
-
Hola, ¿cuál es la operación de la que se está intentando llevar a cabo cuando se produce este error. ¿Se puede intentar hacer una db2stop y db2start y ver la conexión a la base de datos de nuevo. Si eso no resuelve entonces puede que tenga que restaurando la base de datos de copia de seguridad válida eyour anterior.
También puede tratar de aplicar el fixpack más reciente para ver si se soluciona el problema.
...Leave a comment:
-
yes, you can put it in sql editor and execute it form there.
Cheers, VijayLeave a comment:
-
Hi,
Your table looks perfectly fine. It's not corrupt. However it may be the case that you have loaded some data which was not required.
The error which is being received while you browse or edit data is due to character conversion error. There is some data in the table which is not being recognized by the database and it's unable to display. Probably you need to look at your data before loading it again and remove junk/unwanted...Last edited by zmbd; Oct 6 '12, 08:55 PM. Reason: (Z) Please format posted VBA, SQL, HTML, PHP, etc.. using the <CODE/> format button.Leave a comment:
-
Hi,
I can see that you are infact trying to drop your primary key. If you nee to drop your table them use below command
Code:db2 drop table JUSTIN."13SEPTEMBER2011"
Code:db2 select * from syscat.tables where tabname='13SEPTEMBER2011' db2 select count(*) from JUSTIN."13SEPTEMBER2011" db2look
Last edited by zmbd; Oct 6 '12, 08:52 PM. Reason: (V)missing text; (Z) Please format posted VBA, SQL, HTML, PHP, etc.. using the <CODE/> format button.Leave a comment:
No activity results to display
Show More
Leave a comment: