niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Databases » IBM DB2
Unlocking DB2 table/row locks
Post new topic   Reply to topic Page 24 of 26 [388 Posts] View previous topic :: View next topic
Goto page:  Previous  1, 2, 3, ..., 22, 23, 24, 25, 26 Next
Author Message
Knut Stolze
*nix forums Guru


Joined: 28 Jul 2005
Posts: 755

PostPosted: Mon Apr 03, 2006 1:07 pm    Post subject: Re: how to rollforward without userexit - SQL1268N Reply with quote

DaveA wrote:

Quote:
Philip,
I am building a duplicate database. This is a customer data base that
we need to install on our site for a project. We have the backup and
logs, but do not have their user exit pgm.

One other thought I had over the weekend was to try to use the sample
Windows db2uext2.cdisk. But I was hoping for an easier solution

Is there anything in the log files that you really need? If not, you could
do the restore with the WITHOUT ROLLING FORWARD option. Then the backup
image is applied only.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Back to top
Keith
*nix forums addict


Joined: 12 Mar 2005
Posts: 98

PostPosted: Mon Apr 03, 2006 1:42 pm    Post subject: Re: how to rollforward without userexit - SQL1268N Reply with quote

For a restore from an online backup image, one would still need to
supply all/any logs till the end of backup operation. DB2 will still
play thru these minimum logs even if there aren't any transactions.
WITHOUT ROLLING FORWARD will not help in this case.

Can you take an offline backup and restore?

BTW, Per V7.2 documentation (Administration Guide: Implementation),
error 1 treated as error 32 - "The user exit was terminated by the
user"

Keith Ponnapalli
adv_dba at yahoo dot com
IBM Certified Advanced Database Administrator - DB2 UDB V8.1 for Linux,
UNIX, and Windows
INFORMIX Certified Database Administrator

Knut Stolze wrote:
Quote:
DaveA wrote:

Philip,
I am building a duplicate database. This is a customer data base that
we need to install on our site for a project. We have the backup and
logs, but do not have their user exit pgm.

One other thought I had over the weekend was to try to use the sample
Windows db2uext2.cdisk. But I was hoping for an easier solution

Is there anything in the log files that you really need? If not, you could
do the restore with the WITHOUT ROLLING FORWARD option. Then the backup
image is applied only.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Back to top
DaveA
*nix forums beginner


Joined: 03 Apr 2006
Posts: 3

PostPosted: Mon Apr 03, 2006 1:55 pm    Post subject: Re: how to rollforward without userexit - SQL1268N Reply with quote

Knut,
Thanks for the suggestion. Ultimatly we need all the data, but I tried
your suggestion with the hope that at least that would give us some
data to get started, but I got error SQL2537N Roll-forward is required
following the Restore.

Frankly, I am somewhat surprised I have seen no postings on this
problem. What I am trying to do seems like a normal requirement
Certainly we do it all the time with other customers. I suspect this is
the first time though that we have encountered the use of the user
exit.
Back to top
Knut Stolze
*nix forums Guru


Joined: 28 Jul 2005
Posts: 755

PostPosted: Mon Apr 03, 2006 2:04 pm    Post subject: Re: how to rollforward without userexit - SQL1268N Reply with quote

Keith wrote:

Quote:
For a restore from an online backup image, one would still need to
supply all/any logs till the end of backup operation. DB2 will still
play thru these minimum logs even if there aren't any transactions.
WITHOUT ROLLING FORWARD will not help in this case.

This is true. At some point (V8.2?) the logs written during the backup
operation are already included in the backup image. But that's all
guessing because we don't know the details.

Another idea might be to create the database, restore it from the backup
image, then copy the logs to the respective directory and then do the
rollforward. W/o the user exit being activated, DB2 might (I don't know
for sure) search for the log files in the logpath. When rollforward finds
it there, you're happy.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Back to top
apattin
*nix forums beginner


Joined: 25 Apr 2005
Posts: 8

PostPosted: Mon Apr 03, 2006 4:06 pm    Post subject: Re: How to obtain the schema from a JDBC Connection ? Reply with quote

Thanks! I can do that.

Alejandrina
Back to top
Phil Sherman
*nix forums Guru Wannabe


Joined: 16 Jun 2005
Posts: 183

PostPosted: Mon Apr 03, 2006 4:39 pm    Post subject: Re: how to rollforward without userexit - SQL1268N Reply with quote

Since you needed a redirected restore, I assume that the disk
architecture/directory structure doesn't match the production system.

Did you make sure that the database log location, after restore, points
to the correct drive/path where you copied the logs? If you have to have
the user exit, you could write one that indicates the log is available
in the appropriate directory without actually doing anything.

Phil Sherman



DaveA wrote:
Quote:
Philip,
I am building a duplicate database. This is a customer data base that
we need to install on our site for a project. We have the backup and
logs, but do not have their user exit pgm.

One other thought I had over the weekend was to try to use the sample
Windows db2uext2.cdisk. But I was hoping for an easier solution

Dave
Back to top
DaveA
*nix forums beginner


Joined: 03 Apr 2006
Posts: 3

PostPosted: Tue Apr 04, 2006 12:24 pm    Post subject: Re: how to rollforward without userexit - SQL1268N Reply with quote

Tim,
Thankyou! The stop option was what finally resolved this for me.

Dave.
Back to top
Liam Finnie
*nix forums beginner


Joined: 25 Jan 2006
Posts: 11

PostPosted: Tue Apr 04, 2006 12:36 pm    Post subject: Re: DB2NTMEMSIZE Reply with quote

p175 wrote:
Quote:
When ever I start DB2, I get the message that APLD has been truncated
and that I should add the param to the DB2 registry DB2NTMEMSIZE =
APLD:125830720

The documentation says that APLD is related to Fenced Stored
Procedures, can someone please advise why it would want 125mb of memory
simply for fenced stored procedures ? Does the number of SPs defined
make a difference ?

Many thanks, Tim

Hi Tim,

The DB2 engine needs to be able to send data to/from each running
stored procedure. So, this memory is related to the number of active
SPs at a time, not the number that are defined. If you know that you
only have a small number of fenced SPs running at a time, you won't
need a large APLD set, so you can ignore this warning.

You can use the ASLHEAPSZ DBM configuration parameter to control the
size of the APLD set, as well as the DB2_FMP_COMM_HEAPSZ registry
variable (look in your docs for descriptions of these 2 parameters).

Cheers,
Liam.
Back to top
Chris
*nix forums beginner


Joined: 10 Nov 2005
Posts: 23

PostPosted: Tue Apr 04, 2006 3:05 pm    Post subject: Re: Is there a way to find the record causing SET INTEGRITY command to fail? Reply with quote

I've found this out using SQL in the past. First, you identify which
column(s) the constraint is failing on (it should tell you) and which
foreign table that is referencing (assuming the constraing is a foreign
key).

Then, SET INTEGRITY ... UNCHECKED. Then do a query like:

select * from table1 where col_with_problem not in (select distinct
parent_column from parent_table);

This should get you all of the rows that have the problem. You can
then take remedial action (deleting rows, adding rows into the parent,
or whatever else is appropriate), and then turn integrity off, and
reset the integrity with checking back on.

Note that if the tables are big, this can take a really long time,
though.

-Chris
Back to top
Shashi Mannepalli
*nix forums addict


Joined: 09 Sep 2005
Posts: 70

PostPosted: Tue Apr 04, 2006 4:15 pm    Post subject: Re: Problem inserting spanish characters in DB2 UDB Reply with quote

Check this ...it might help you

http://www-128.ibm.com/developerworks/db2/library/techarticle/dm-0506chong/

cheers...
Shashi Mannepalli
Back to top
apattin
*nix forums beginner


Joined: 25 Apr 2005
Posts: 8

PostPosted: Tue Apr 04, 2006 5:19 pm    Post subject: Re: Need ROLLUP expert advice! Reply with quote

CLEVER!

BTW, I found out how to remove the totals from the rollup, in case
anyone is interested:

select primary_site , primary, morphology,
count(*) as COUNT from morphology_summary group by rollup
(primary_site,primary,morphology )
HAVING GROUPING(primary_site)=0 AND GROUPING(morphology)=0 and
grouping(primary)=0
order by primary_site , primary, morphology

the magic is "HAVING GROUPING(xxx)=0 " only selects the non-total rows.

Thanks!

Alejandrina
Back to top
Another DB2 UDB DBA
*nix forums beginner


Joined: 09 Feb 2005
Posts: 3

PostPosted: Tue Apr 04, 2006 5:58 pm    Post subject: Re: Need ROLLUP expert advice! Reply with quote

If you want to suppress totals from a GROUP BY ROLLUP, perhaps you
should use a different grouping method, such as GROUP BY GROUPING SETS,
or a straight GROUP BY(primary_site, primary, morphology)

Am I missing something?
Back to top
technocrat
*nix forums beginner


Joined: 21 Mar 2006
Posts: 35

PostPosted: Wed Apr 05, 2006 8:28 pm    Post subject: Re: Is there a way to find the record causing SET INTEGRITY command to fail? Reply with quote

you solution looks great and ideal for me...but i aint sure yet ...i ll
have to implement that and try...but in the meanwhile,...can you give
me an example (source code) of how u did that?
Like how u identify which colmns are failing..? and which table its
refering...i know when SET INTEGRITY fails..it throws something..lile
integrity failedfor "schema.table.foreigntableFK" but is ther a way i
can find out the table name...rather than catching the exception and do
"STRING" analysis on it....

Any help would be appreciated...
Thanks
Back to top
technocrat
*nix forums beginner


Joined: 21 Mar 2006
Posts: 35

PostPosted: Wed Apr 05, 2006 8:42 pm    Post subject: Re: Is there a way to find the record causing SET INTEGRITY command to fail? Reply with quote

Thanks gert ...I think I would try this first and then try the sql
version of it...if I could get some more info on it , i would
appreciate it.....

The thing i am wndering is...does for exception ....remove only
duplicates?? or remove rows that are violating the FK
constraint...becuase, I am not rteally worried about duplicates...but I
want to find the rows that are violating the FK Constraint...

Any help is appreciated..!
Back to top
technocrat
*nix forums beginner


Joined: 21 Mar 2006
Posts: 35

PostPosted: Wed Apr 05, 2006 8:42 pm    Post subject: Re: Is there a way to find the record causing SET INTEGRITY command to fail? Reply with quote

Thanks gert ...I think I would try this first and then try the sql
version of it...if I could get some more info on it , i would
appreciate it.....

The thing i am wndering is...does for exception ....remove only
duplicates?? or remove rows that are violating the FK
constraint...becuase, I am not rteally worried about duplicates...but I
want to find the rows that are violating the FK Constraint...

Any help is appreciated..!
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 24 of 26 [388 Posts] Goto page:  Previous  1, 2, 3, ..., 22, 23, 24, 25, 26 Next
View previous topic :: View next topic
The time now is Tue Dec 02, 2008 5:27 am | All times are GMT
navigation Forum index » Databases » IBM DB2
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts How to ALTER a table using the ALTOBJ procedure Serge Rielau IBM DB2 1 Fri Jul 21, 2006 1:06 pm
No new posts Can't Select External Table from CSV File Resant Server 1 Fri Jul 21, 2006 2:45 am
No new posts Images Table Nicholas Vettese MySQL 1 Thu Jul 20, 2006 2:19 pm
No new posts grant on a specified table to a user Shinyday Server 4 Wed Jul 19, 2006 6:03 am
No new posts Database or table level logging? David Felio MySQL 5 Tue Jul 18, 2006 6:57 pm

Mortgage Calculator | Loans | Loans | Car Accident Lawyer Los Angeles | Project cars for sale
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.8191s ][ Queries: 16 (0.6767s) ][ GZIP on - Debug on ]