Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all 13329 articles
Browse latest View live

Match Table Fields

$
0
0
Before

The following table shows how the Credit transaction (ID 1) has a corresponding offsetting entry in (ID 3).

ID-----Cost Center----Line of Business---Debit------Credit-----Event ID
1------10056----------Retail-------------$5,000----$0.00------
2------10799----------Retail-------------$1,450----$0.00------
3------10056----------Retail-------------$0.00-----$5,000-----
4------10022----------Commercial--------$3,000----$0.00-----


Every transaction comes into the table as either a Debit or a Credit. Each transaction has a unique ID and it is assigned to a Cost Center and a Line of Business.

Our goal is to produce a query that will extract transactions that maybe related. In other words, to find a debit amount with an offsetting credit amount in order to assign them an Event ID number in another column. In order to make a match, both transactions (the Credit and the Debit) must have the same Cost Center, belong to the same Line of Business and both the Debit and the Credit amount must be the same value.

After

The query results only shows transactions that are related.

ID-----Cost Center----Line of Business---Debit------Credit-----Event ID
1------10056----------Retail-------------$5,000----$0.00------
3------10056----------Retail-------------$0.00-----$5,000-----

Thanks for your help!

backup taken with compress option, Will normal restore work

$
0
0
HI all
I have taken backup with compress option. can i restore that backup file with normal restorecommand or i have to use any option in restore command.

what will be the difference in size if i use compress option in backup command?

Tools monitoring from command line db2 V8.

$
0
0
Good morning,
can someone tell me that I can use monitoring tools to monitor querys, locks, cpu consumption, logs, explain, execution cost in DB2 V8.
I would be grateful.

db2 table definition

$
0
0
Hi all

Today i saw some tables in db with table names start with /aa/asjkjk something like that and other table names are fine starts witha character .

and I execute the following query to see table names

query -- db2 select tabname from syscat.tables where tabschema= 'schemaname' "

Get ID of created transaction

$
0
0
Hi,

In a Excel VBA project I would like to create a transaction in a Access 2010 database. After the creation I would like to retrieve the ID of the just created transaction. How can I do this? Do I need to assign each transaction a unique id before it is created a retrieve the transaction by this unique id?

/marjdk

Join” Teradata (Dev+Admin)” free Introduction class on Saturday 19th January at 8:00

$
0
0
We,BISP are a group of well known Data warehousing and BI professionals, specialized in oracle and Teradata training and consulting. We are providing high quality trainings for corporate & e-learning for individuals. We have been training people for last 12 years and well known name across the globe. Our interactive online training methodologies ensure students’ benefited to maximum.
Course Name : Teradata (Dev+Admin)
Duration : 40 HOurs
Course Fees : 15,000 INR/300 USD for each
Start Date : Saturday 19th January at 8:00 AM IST
Course Content : www.bispsolutions.com-->Courses [Teradata]
Take Away : i) Student Guide
ii) Practice Guide
iii) Video Tutorial and complete practice Application

Join” Teradata” free Introduction class on Saturday 19th January at 8:00 AM IST

1. Please join my meeting.
https://global.gotomeeting.com/join/669110293

2. Use your microphone and speakers (VoIP) - a headset is recommended. Or, call in using your telephone.

Dial +1 (805) 309-0027
Access Code: 669-110-293
Audio PIN: Shown after joining the meeting

Meeting ID: 669-110-293

GoToMeeting®
Online Meetings Made Easy®

For more information like course content, Day wise session plan & fee details feel free to contact at amit.sharma@bisptrainings.com, kapil.devang@bisptrainings.com or rashmib@bisptrainings.com or For more details visit our website www.bispsolutions.com

New Database Developer in Postgresql

$
0
0
Hi Every one

Is there anyone who is experienced in database design for smart card management system. I need some advise. The person can send me an email on hombakazij@yahoo.com so that we can communicate.

How to track database changes using java?

$
0
0
I want track database record changes after latch fetch operation using java.I don't have any permission to alter or create any table in that database.

CheckSum is a one solution but for that to store checksum I need permission to create table in database .

I can not use triggers.

any other solutions ?

Access form design using layout - how to center controls

$
0
0
Hi all,

I would like to have a sort of a main menu form on my Access front end, horizontally centered in the middle of the form, no matter the resolution or window size. I can easily do it (and I did) by simple VBA executed on form_Resize event, but I'd rather know how to do it without it.

In design view, I created a tabular layout with three columns, with my subform in the middle. Now, what I would love to achieve is for the middle column to always stay the same width but the side columns always resize with the window, so the middle column is always in the middle of the Access window.

No matter what I do, I just can't accomplish to have both side columns size with each other.

Thanks in advance for any ideas.

Dynamic SQL in DB2 SQL stored procedure

$
0
0
Hi Everyone,

I am brand new to this DB2 stored procedure. In our project, we have a requirement to write dynamic SQL in DB2 stored procedure. We need to write dynamic SQL (which is basically business rules) as a rows of a table and we need to fetch it one by one as part of validation procedure so that when new business rule added or existing rule modified, we can simply go and update the table rather that modifying the validation procedure. So, my question is, how to write dynamic SQL as rows of a table and how to fetch it using a cursor or so..?

Any help will be appreciated.

Thank you,
Manju

Segmentation Fault - core dumped when try to upgrade to DB2 10.1 fix pack 2

$
0
0
Hi,

i get segmentation fault error when try to upgrade DB2 10.1 to DB2 10.1 fix pack 2:

i run the command:
./installFixPack -b /opt/IBM/db2/V10.1/

and then get the following error:
==============================
Task #40 start
Description: Registering DB2 licenses
Estimated time 5 second(s)
Segmentation Fault - core dumped
==============================

please do you have any advise for this?

Thanks,
Hussein

TSM archive log retrieve performance

$
0
0
Hi,

We're in DB2 9.7 fp6 and currently using TSM 6.1 for backups and log archiving (on AIX 6.1)

We have a 4,5TB database and we only use online backups.
I have a question regarding log archiving / retrieving performance with TSM.

When I check the db2diag.log, log archiving is done in 4 seconds max usually (log file - 10240 pages - 40 Mb)

2013-01-16-22.47.59.260500+060 E480740A376 LEVEL: Info
PID : 35651656 TID : 3600 PROC : db2sysc 0
INSTANCE: p1epro NODE : 000
EDUID : 3600 EDUNAME: db2logmgr (E_PRO) 0
FUNCTION: DB2 UDB, data protection services, sqlpgArchiveLogFile, probe:3108
DATA #1 : <preformatted>
Started archive for log file S0005963.LOG.

2013-01-16-22.48.01.089827+060 E481117A438 LEVEL: Info
PID : 35651656 TID : 3600 PROC : db2sysc 0
INSTANCE: p1epro NODE : 000
EDUID : 3600 EDUNAME: db2logmgr (E_PRO) 0
FUNCTION: DB2 UDB, data protection services, sqlpgArchiveLogFile, probe:3180
DATA #1 : <preformatted>
Completed archive for log file S0005963.LOG to TSM chain 1 from /var/db/db2/p1epro/E_PRO/redo/NODE0000/.


But when my online backup open the last TSM session to retrieve logs (include logs in backup) The time to retrieve the archive logs can get up to 1 minute and 30 seconds for each file.

2013-01-16-22.49.39.705625+060 I482357A366 LEVEL: Warning
PID : 35651656 TID : 3600 PROC : db2sysc 0
INSTANCE: p1epro NODE : 000
EDUID : 3600 EDUNAME: db2logmgr (E_PRO) 0
FUNCTION: DB2 UDB, data protection services, sqlpgRetrieveLogFile, probe:4130
MESSAGE : Started retrieve for log file S0005960.LOG.

2013-01-16-22.51.05.758610+060 I482724A433 LEVEL: Warning
PID : 35651656 TID : 3600 PROC : db2sysc 0
INSTANCE: p1epro NODE : 000
EDUID : 3600 EDUNAME: db2logmgr (E_PRO) 0
FUNCTION: DB2 UDB, data protection services, sqlpgRetrieveLogFile, probe:4148
MESSAGE : Completed retrieve for log file S0005960.LOG on chain 1 to
/var/db/db2/p1epro/E_PRO/redo/NODE0000/.

I'm no TSM expert unfortunately but I'm still looking arround.
Could this retrieve time be tunned ? (DB2 or TSM side ?)
Is there anything I should ask the TSM guy to check ?

a DBA DB2 friend showed me that, with his similar setup, the retrieve was as long as the archive (meaning 5 seconds each)


Thanks for your help.
Best regards,
JFU.

Saving from '07 to '03

$
0
0
I haevn't been able to find a way to do this. But I have a database in MS Access 2007 that I unfortunatly need to save down to MS Access 2003 from 2007.

I don't want to do it but there are some users in my organization that do not have 2007 and to upgrade them would cost to much since they have Stand Alone installs of the software and not part of the package.

Is there an easy way to do this or Would I have to build the DB as 2003 from scratch???

transpose row to column with concatenation

$
0
0
Hi,

I have table like below

PARENT NAME
-------- ------
ABSMBS A1
ABSMBS A2
ABSMBS A3
BNDS B1
BNDS B2
BSB C1
BSB C2
DMA D1

and i want the data to be shown as below but using on SQL query and not using cursors. I am using Sybase 15. Is this possible?

PARENT NAME
-------- ------
ABSMBS A1,A2,A3
BNDS B1,B2
BSB C1,C2
DMA D1

Database normalisation

$
0
0
Hi All
This is my first post, im seeking some help in designing an Access database which i will be using for PC Repairs and other services eg spreadsheet development. Below is the tables which i currently have.

ORDERS - order_id, ord_price, ord_quote, ord_req_by, service_req, parts_req, ord_comments, service_status, payment_status, amount_tendered, amount_outstanding. PK is order_id

CUSTOMER - client_id, cust_firstnane, cust_lastname, cust_ph, cust_email PK is client_id

SUPPLIERS - supplier_id, supplier_name, supplier_ph, supplier_address. PK is supplier_id

I would like to add the field Invoice, but it does not fit into any of the tables above. One invoice may have many orders, one customer may have may invoices, im thinking of creating a new table named INVOICE.

Something like

INVOICE invoice_id, order_id the problem with this is that if invoice_id is the PK it will not work as invoice_id will repeat in this table (one invoice may have may order_id's). Can i make order_id the PK? or is there a better way of designing this database?

Thanks in advance
Mike

db2look

$
0
0
HI every one

db2look command to extract databse definition to create same database on other instance.

please help mee

Search key was not found in any record message

$
0
0
Hi,
I’ve got a problem with a split Access 2010 database. Wonder if anyone can help.

In the back end I changed a field in one of the tables to allow multiple values from a drop down list where before you could only choose one. Everything looked ok in the back end table and you can successfully run queries on it.

When I go to the front end however and open the form which takes its data from this table and try to open it I get this error message: “The search key was not found in any record” and the form won’t open up. I’ve tried going into the design view of the form and taking out the field that got changed but this doesn’t help. I also can’t run a query on the table from the front end whereas I can from the back end.

Any suggestions would be gratefully received!

Thanks
Les

Import statistics

$
0
0
I would like to import the statitics of a database to another database for test purpose.

I would like to know it makes sense when the two databases are very different:
The source database is about 1 TBytes and the destination database only 2 GBytes. Of course the bufferpools are also bigger in the source database.

Further more the FixPak levels are not the same:
The DB2 version of the Source database is 8.1 FP 11 under HP-UX 11.23
The DB2 version of the destination database is 8.1 FP 14 under HP-UX 11.23


Thanks for your help in advance
Best regards

Renaud

duplicate row update from csv

$
0
0
Hi,
i have a DB called "csv_db" with a tbale called "reportinc".
The tabale have this column:

`ID incidente`, `Aperto da`, `Stato`, `Categoria`, `Area`, `Sottoarea`, `Titolo`, `Priorità`, `Data/ora apertura`, `Data/Ora risoluzione`, `Data/ora chiusura`, `Inizio Interruzione di servizio`, `Fine interruzione di servizio`, `Conteggio riassegnazioni`, `Gruppo di assegnazione`, `Assegnatario`, `Risolto da`, `Gruppo risoluzione`, `Chiuso da`, `Gruppo di chiusura`, `ID interazione`, `Id Remedy`, `Descrizione`, `Soluzione`, `Servizio Interessato`, `Servizi Interessati`, `CI interessato`, `CI operativo`, `Ultimo aggiornamento da`

The primary and unique key is `ID incidente`

I need to import each day from .CSV (comma separated) and:

1) Inseret new rows with new value (`ID incidente` also)
2) Update existing rows in the list.

I tried a query smilar to:

LOAD DATA LOCAL INFILE 'd:\export.csv'
INSERT INTO `reportinc` (`ID incidente`, `Aperto da`, `Stato`, `Categoria`, `Area`, `Sottoarea`, `Titolo`, `Priorità`, `Data/ora apertura`, `Data/Ora risoluzione`, `Data/ora chiusura`, `Inizio Interruzione di servizio`, `Fine interruzione di servizio`, `Conteggio riassegnazioni`, `Gruppo di assegnazione`, `Assegnatario`, `Risolto da`, `Gruppo risoluzione`, `Chiuso da`, `Gruppo di chiusura`, `ID interazione`, `Id Remedy`, `Descrizione`, `Soluzione`, `Servizio Interessato`, `Servizi Interessati`, `CI interessato`, `CI operativo`, `Ultimo aggiornamento da`) VALUES ($ID incidente, $Aperto da, $Stato, $Categoria, $Area, $Sottoarea, $Titolo, $Priorità, $Data/ora apertura, $Data/Ora risoluzione, $Data/ora chiusura, $Inizio Interruzione di servizio, $Fine interruzione di servizio, $Conteggio riassegnazioni, $Gruppo di assegnazione, $Assegnatario, $Risolto da, $Gruppo risoluzione, $Chiuso da, $Gruppo di chiusura, $ID interazione, $Id Remedy, $Descrizione, $Soluzione, $Servizio Interessato, $Servizi Interessati, $CI interessato, $CI operativo, $Ultimo aggiornamento da)
ON DUPLICATE KEY UPDATE active = 1


But i snot working.
I need to update rows if duplicate, and NOT append.

How to?
Please me me (newbie)

Thanks in advance.

monitor querys with db2pd

$
0
0
Good morning,
can someone tell me how to monitor querys with db2pd, I have db2 v8.
get snapshot for applications with ApplHandl agentid see the querys with db2pd as I can see the same thing?

Thank you very much and best regards.
Viewing all 13329 articles
Browse latest View live