[Info-ingres] copy and refresh the errlog.log while ingres is up

DATABASE

    Sponsored Links

    Next

  • 1. Check if Proc exists
    I am back working with Ingres after a 10 year gap so I have newbie questions which I have not been able to easily identify on a FAQ. 1. How do I test for the existence of a Procedure? I want to create script for my Procedures. In MS SQL I use something like:- IF NOT EXISTS (SELECT * FROM SYSOBJECTS WHERE ID = OBJECT_ID(N'Rpt_Batch_Script_Summary') AND OBJECTPROPERTY(id,N'isprocedure') = 1 AND uid=user_id()) BEGIN EXEC('CREATE PROC Rpt_Batch_Script_Summary AS --') PRINT "*** DBA PLEASE GRANT PERMISSIONS ***" END GO ALTER PROCEDURE dbo.Rpt_Batch_Script_Summary ... Which checks for the existence of the Proc, if it does not exist it creates a blank one, since it now exists it then alters the Proc (this is better than drop/create because you do not loose any permissions granted to the Proc). 2. The statement terminator in Ingres is ";". What is the batch terminator is it "/" or "/g"? 3. It seems the return variable in a procedure must be integer and not null. It also appears that I cannot create a variable in the declare section of the Proc which is not null. The only way to return a variable value from the Proc appears to be to create the variable as a parameter to the Proc and define it as int not null. Is this correct? Thanks in advance.
  • 2. [Info-ingres] Check if Proc exists
    At 8:19 AM -0700 6/26/2006, kenp wrote: >[snip] >Can I write a SQL script something like :- > >declare i integer; >select :i = count(*) from iitables where table_name="CentreRole" and >table_owner="ken" >if (i > 0) then drop table "ken"."CentreRole"; >endif; No, you can't do DDL (creates and drops) in a DB procedure. What you can do in an sql script is simply: \continue drop ken.centrerole; ... \nocontinue \continue tells the terminal monitor to just keep going if a query returns an error. Karl

RE: [Info-ingres] Re: copy and refresh the errlog.log while ingres is up

Postby Paul White » Fri, 11 Aug 2006 00:40:44 GMT

Unfortunately it does not work under windows.

C:\IngresII\ingres\files>copy errlog.log errlogsav.log
        1 file(s) copied.

C:\IngresII\ingres\files>copy nul errlog.log
The process cannot access the file because it is being used by another
process.
        0 file(s) copied.

C:\IngresII\ingres\files>echo. > errlog.log
The process cannot access the file because it is being used by another
process.

Paul

-----Original Message-----
From:  XXXX@XXXXX.COM 
[mailto: XXXX@XXXXX.COM ]On Behalf Of Sarkaut
Sent: Tuesday, 8 August 2006 9:01 PM
To:  XXXX@XXXXX.COM 
Subject: [Info-ingres] Re: copy and refresh the errlog.log while ingres
is up


Hi Jim,

You may copy /dev/null to errlog.log while Ingres is up and running.
This will empty the file though it is opened by Ingres.

Cheers, Sarkaut

JIMC schrieb:


_______________________________________________
Info-ingres mailing list
 XXXX@XXXXX.COM 
 http://www.**--****.com/ 


RE: [Info-ingres] Re: copy and refresh the errlog.log while ingres is up

Postby martin.bowes » Fri, 11 Aug 2006 16:49:34 GMT

Hi Paul et al,

It may not be working as well as people are thinking it does under 
UNIX.

Under most flavours of UNIX, I suspect that what people are seeing is 
the creation of a 'Sparse File'. That is, it looks empty, but its still holding 
all those disk sectors it originally had. So this may not reclaim disk 
space.

Or at least the last time I tried doing this under a Solaris system that's 
exactly what happened.

I've just done this on a Linux box which had a 50Merrlog.log, a 250M 
iiacp.log and a similar iircp.log. If I can get hold of the sysprog, I'll get 
him to run a df and a du on the disk in question and see what the 
discrepancy (if any) is.

Martin Bowes




Re: [Info-ingres] Re: copy and refresh the errlog.log while ingres is up

Postby Paul Bartholdi » Sat, 12 Aug 2006 01:21:56 GMT

NB With [t]csh, if the variable NOCLOBBER is defined, you have to type
an ! after the > as it is otherwise not permited to overwrite on a
file:
     tail errlog.log >! errlog.log
With [kz]sh and bash, use | instead of !
This is true on any (most?) Unix, including Linux, Solaris etc.
Good luck,     Paul







-- 
****************************************************
Paul Bartholdi
11 chemin de la Barillette
CH-1260 NYON
Suisse                      tel +41 22 361 0222
****************************************************

[Info-ingres] Re: copy and refresh the errlog.log while ingres is up

Postby Mark R. Winston » Sat, 12 Aug 2006 02:18:28 GMT

> Reply-To: < XXXX@XXXXX.COM >

I used to work with Ingres II 2.0 on NT4 with the MK application.  MK,
among other ridiculous things, used to cause "ASSOCIATION_FAILURE"
messages to be written to Ingres' errlog.log at an average rate of 2 per
 second.  So, I had to "archive", in essence, errlog.log so that
analysis of it for real issues was more feasible.  I dug out my old NT
scripts that accomplished this and, according to my scripts, the process
was to first copy errlog.log to a different file with a unique prefix
(timestamp) and then copy an "empty" errlog.log file to
"%II_SYSTEM%/ingres/files".  If I remember correctly the fake-out
happened because the file I was using to overwrite the in-use file had
the same name, e.g. "errlog.log" (0 bytes) --> "errlog.log" (1024 bytes).

---
Mark R. Winston

[Info-ingres] RE: copy and refresh the errlog.log while ingres is up

Postby Paul White » Sat, 12 Aug 2006 13:06:17 GMT

Brilliant.  This works just fine:

cd C:\IngresII\ingres\files
copy nul c:\temp\errlog.log
copy errlog.log errlog_sav.log
copy c:\temp\errlog.log errlog.log

C:\>cd C:\IngresII\ingres\files

C:\IngresII\ingres\files>copy nul c:\temp\errlog.log
        1 file(s) copied.

C:\IngresII\ingres\files>copy errlog.log errlog_sav.log
        1 file(s) copied.

C:\IngresII\ingres\files>copy c:\temp\errlog.log errlog.log
        1 file(s) copied.

Then IVM displays:
 The error log file has been changed externally.
 Visual Manager will refresh according to the new file
 All messages of the new file will be considered as not read


C:\IngresII\ingres\files>dir errlog*.*
 Volume in drive C is IBM_PRELOAD
 Volume Serial Number is 4CF1-EBC0

 Directory of C:\IngresII\ingres\files

11/08/2006  11:32 AM               0   errlog.log
07/08/2006  01:44 PM           652,816 errlog_sav.log
               2 File(s)        653,017 bytes
               0 Dir(s)     862,375,936 bytes free

Thanks

Paul

-----Original Message-----
From: Mark R. Winston [mailto: XXXX@XXXXX.COM ]
Sent: Friday, 11 August 2006 3:18 AM
To:  XXXX@XXXXX.COM 
Cc:  XXXX@XXXXX.COM 
Subject: Re: copy and refresh the errlog.log while ingres is up


ingres is up

I used to work with Ingres II 2.0 on NT4 with the MK application.  MK,
among other ridiculous things, used to cause "ASSOCIATION_FAILURE"
messages to be written to Ingres' errlog.log at an average rate of 2 per
 second.  So, I had to "archive", in essence, errlog.log so that
analysis of it for real issues was more feasible.  I dug out my old NT
scripts that accomplished this and, according to my scripts, the process
was to first copy errlog.log to a different file with a unique prefix
(timestamp) and then copy an "empty" errlog.log file to
"%II_SYSTEM%/ingres/files".  If I remember correctly the fake-out
happened because the file I was using to overwrite the in-use file had
the same name, e.g. "errlog.log" (0 bytes) --> "errlog.log" (1024 bytes).

---
Mark R. Winston


Similar Threads:

1.[Info-ingres] copy and refresh the errlog.log while ingres is up

2.copy and refresh the errlog.log while ingres is up

I would like to be able to, on a weekly basis, copy out the errlog.log
to errlog.log.yyyy.mm.dd and refresh the errlog.log.

Is there a safe way to do this without crashing ingres ?  I'm a
beginner when it comes to Unix commands.

Could I:

cp errlog.log errlog.log.20060804
cp blankfile errlog.log  ( where blankfile is a file with no data )


Thanks, Jim

3.[Info-ingres] SIGSEGV in errlog.log

Any idea what the errlog.log entry below indicates ?


- the shown query is replicator stuff, but other queries also generate 
the error.

- happens about once a day.

- some queries can be traced back to a certain TX, but repeating the TX 
works fine.

- the client gets an error and can react appropriately.

- Ingres servers continue running despite the segmentation violation.

- Version: Ingres SPARC SOLARIS Version II 2.6/0305 (su4.us5/00)




Error log entry:


SF-BUNTS::[55948             , 01472100]: Tue Sep 26 13:25:53 2006 
E_OP0901_UNKNOWN_EXCEPTION
Unknown exception occurred in optimizer utility. Value is 68197.
SF-BUNTS::[55948             , 01472100]: An error occurred in the 
following session:
SF-BUNTS::[55948             , 01472100]: >>>>>Session 
01472100:50088990<<<<<
SF-BUNTS::[55948             , 01472100]:     DB Name: 
colibri                          (Owned by: ingres                
          )
SF-BUNTS::[55948             , 01472100]:     User: 
ingres                           (ingres                          )
SF-BUNTS::[55948             , 01472100]:     User Name at Session 
Startup: ingres                         
SF-BUNTS::[55948             , 01472100]:     Terminal: batch          
SF-BUNTS::[55948             , 01472100]:     Group 
Id:                                
SF-BUNTS::[55948             , 01472100]:     Role 
Id:                                
SF-BUNTS::[55948             , 01472100]:     Application Code: 
00000000            Current Facility: OPF (00000004)
SF-BUNTS::[55948             , 01472100]:     Client user: ingres
SF-BUNTS::[55948             , 01472100]:     Client host: sf-buntspecht
SF-BUNTS::[55948             , 01472100]:     Client tty: sf-buntspecht
SF-BUNTS::[55948             , 01472100]:     Client pid: 11877
SF-BUNTS::[55948             , 01472100]:     Client connection target: 
buntspecht::colibri
SF-BUNTS::[55948             , 01472100]:     Client information: 
user='ingres',host='sf-buntspecht',tty='sf-buntspecht',
pid=11877,conn='buntspecht::colibri'
SF-BUNTS::[55948             , 01472100]:     Description:
SF-BUNTS::[55948             , 01472100]:     Query: select 
db.vnode_name as "buntspecht ->", c.is_quiet as "Quiet",
count(distinct transaction_id) as "#trans", count(sequence_no) as "# 
seq", min
(trans_time) as "oldest transaction" from dd_distrib_queue d, dd_db_cdds c,
dd_databases db where d.targetdb=c.database_no and 
d.targetdb=db.database_no
group by sourcedb, targetdb, db.vnode_name, c.is_quiet 
sf-bunts::[55948           , 01472100]: Tue Sep 26 13:25:53 2006 
Segmentation Violation (SIGSEGV) qso_rmvobj(0x27b3e8) @ PC 27b518 SP 
eca5d0a8 PSR fe401006 G1 4d o0 fee02600
sf-bunts::[55948           , 01472100]: Stack dump pid 10195: ECA5D0A8: 
(pc = 0027D6F8) qs0_clrobj(00624400,00000000,ECA5D200,E
CA5D2F0,ECA5D2F4,ECA5D604)
sf-bunts::[55948           , 01472100]: Stack dump pid 10195: ECA5D1A0: 
(pc = 0027D698) qsf_clrmem(00000000,0147AC50,0739D680,0
0604784,02FC4C1E,00604784)
sf-bunts::[55948           , 01472100]: Stack dump pid 10195: ECA5D208: 
(pc = 0027A44C) qso_palloc(0147AC50,00624400,FFFFFFFF,F
FFFFFF8,00000000,073EBC51)
sf-bunts::[55948           , 01472100]: Stack dump pid 10195: ECA5D268: 
(pc = 00186B8C) opu_qsfmem(ECA5E078,ECA5E078,FFFFFFFF,F
FFFFFF8,00000000,073EC189)
sf-bunts::[55948           , 01472100]: Stack dump pid 10195: ECA5D300: 
(pc = 001C6ACC) opc_valid(ECA5E064,00000048,ECA5D3D4,EC
A5D3D0,ECA5D3CC,ECA5D473)
sf-bunts::[55948           , 01472100]: Stack dump pid 10195: ECA5D360: 
(pc = 001C4C6C) opc_orig_build(00000000,073EBE48,000000
03,00000005,00000001,00D177EC)
sf-bunts::[55948           , 01472100]: Stack dump pid 10195: ECA5D3D8: 
(pc = 001C3688) opc_qentree_build(ECA5E064,ECA5D550,ECA
5D924,00D176D0,00000003,00604784)
sf-bunts::[55948           , 01472100]: Stack dump pid 10195: ECA5D478: 
(pc = 001CA7E0) opc_jinouter(073EBCB8,ECA5D550,FFFFFFFF
,FFFFFFF8,00000000,00D17F79)
sf-bunts::[55948           , 01472100]: Stack dump pid 10195: ECA5D4E8: 
(pc = 001C9A28) opc_kjoin_build(ECA5E064,ECA5D6E0,00D17
57C,00000003,073EBC80,ECA5D604)
sf-bunts::[55948           , 01472100]: Stack dump pid 10195: ECA5D568: 
(pc = 001C36C4) opc_qentree_build(00D17DF0,073EBC48,00D
35094,00D175C8,00000002,00604784)
sf-bunts::[55948           , 01472100]: Stack dump pid 10195: ECA5D608: 
(pc = 001B5488) opc_tsort_build(073EBC48,ECA5D6E0,FFFFF
FFF,FFFFFFF8,00000000,073EBC51)
sf-bunts::[55948           , 01472100]: Stack dump pid 10195: ECA5D678: 
(pc = 001C3750) opc_qentree_build(ECA5E064,ECA5D7D0,ECA
5DBD4,FFFFFFF8,ECA5E064,073EBF41)
sf-bunts::[55948           , 01472100]: Stack dump pid 10195: ECA5D6F8: 
(pc = 001CA7E0) opc_jinouter(073EBBE0,ECA5D7D0,FFFFFFFF
,FFFFFFF8,00000000,00D17EB9)
sf-bunts::[55948           , 01472100]: Stack dump pid 10195: ECA5D768: 
(pc = 001C9A28) opc_kjoin_build(ECA5E064,ECA5D960,00D17
684,00000003,073EBBA8,ECA5D884)
sf-bunts::[55948           , 01472100]: Stack dump pid 10195: ECA5D7E8: 
(pc = 001C36C4) opc_qentree_build(00D17D30,073EBB70,ECA
5D924,00D176D0,00000003,00604784)
sf-bunts::[55948           , 01472100]: Stack dump pid 10195: ECA5D888: 
(pc = 001B5488) opc_tsort_build(073EBB70,ECA5D960,FFFFF
FFF,FFFFFFF8,00000000,073EBB79)
sf-bunts::[55948           , 01472100]: Stack dump pid 10195: ECA5D8F8: 
(pc = 001C3750) opc_qentree_build(ECA5E064,ECA5DA50,000
00001,00000000,00000000,00000000)
sf-bunts::[55948           , 01472100]: Stack dump pid 10195: ECA5D978: 
(pc = 0018829C) opc_qepahd(073EBB08,ECA5DA50,00D35094,F
FFFFFF8,00000000,00D17DF9)
sf-bunts::[55948           , 01472100]: Stack dump pid 10195: ECA5D9E8: 
(pc = 00187C0C) opc_ahd_build(073EBE48,00000000,073EBF3
8,005E6CEC,00000000,073EBAD0)
sf-bunts::[55948           , 01472100]: Stack dump pid 10195: ECA5DA68: 
(pc = 001B8A08) opc_lsahd_build(ECA5E064,ECA5DB58,ECA5D
BD4,FFFFFFF8,ECA5E064,073EBF41)
sf-bunts::[55948           , 01472100]: Stack dump pid 10195: ECA5DAE0: 
(pc = 001862F4) opc_cqp_continue(ECA5E064,00D34FA8,ECA5
DC54,00000001,00000004,00000000)
sf-bunts::[55948           , 01472100]: Stack dump pid 10195: ECA5DBF0: 
(pc = 0015BC90) opc_querycomp(FFFFFFFF,ECA5E078,ECA5DEC
4,00000001,00000003,00000000)
sf-bunts::[55948           , 01472100]: Stack dump pid 10195: ECA5DC58: 
(pc = 001467E0) ops_statement(ECA5E064,073CB8E8,ECA5E48
4,ECA5E474,00000000,ECA5E064)
sf-bunts::[55948           , 01472100]: Stack dump pid 10195: ECA5DEC8: 
(pc = 0014689C) ops_dbprocedure(ECA5E064,073CB8E8,00624
400,00604784,02FC4C1E,01475468)
sf-bunts::[55948           , 01472100]: Stack dump pid 10195: ECA5DF28: 
(pc = 00146B54) ops_sequencer(ECA5E064,073CB8E8,0009AEE
0,0056BDF4,00000000,02494598)
sf-bunts::[55948           , 01472100]: Stack dump pid 10195: ECA5DF88: 
(pc = 00143F9C) opf_call(01475120,00143EC4,00000000,014
75740,01475468,00000004)
sf-bunts::[55948           , 01472100]: Stack dump pid 10195: ECA5E5F0: 
(pc = 00055A48) scs_sequencer(00000005,01475120,0147574
0,01472100,FFFFFFFF,ECA5FD7C)
sf-bunts::[55948           , 01472100]: Stack dump pid 10195: ECA5E6B8: 
(pc = 00557118) CSMT_setup(00000000,00000000,01472178,E
A169F09,00000000,ECA5FE88)
sf-bunts::[55948           , 01472100]: Stack dump pid 10195: ECA5FD80: 
FF1E5E48(01472100,00000000,00000000,00000000,00000000,0
0000000)
SF-BUNTS::[55948             , 01472100]: Tue Sep 26 13:25:53 2006 
E_OP08A2_EXCEPTION   Unexpected exception occurred within query compilation
SF-BUNTS::[55948             , 01472100]: An error occurred in the 
following session:
SF-BUNTS::[55948             , 01472100]: >>>>>Session 
01472100:50088990<<<<<
SF-BUNTS::[55948             , 01472100]:     DB Name: 
colibri                          (Owned by: ingres                
          )
SF-BUNTS::[55948             , 01472100]:     User: 
ingres                           (ingres                          )
SF-BUNTS::[55948             , 01472100]:     User Name at Session 
Startup: ingres                         
SF-BUNTS::[55948             , 01472100]:     Terminal: batch          
SF-BUNTS::[55948             , 01472100]:     Group 
Id:                                
SF-BUNTS::[55948             , 01472100]:     Role 
Id:                                
SF-BUNTS::[55948             , 01472100]:     Application Code: 
00000000            Current Facility: OPF (00000004)
SF-BUNTS::[55948             , 01472100]:     Client user: ingres
SF-BUNTS::[55948             , 01472100]:     Client host: sf-buntspecht
SF-BUNTS::[55948             , 01472100]:     Client tty: sf-buntspecht
SF-BUNTS::[55948             , 01472100]:     Client pid: 11877
SF-BUNTS::[55948             , 01472100]:     Client connection target: 
buntspecht::colibri
SF-BUNTS::[55948             , 01472100]:     Client information: 
user='ingres',host='sf-buntspecht',tty='sf-buntspecht',
pid=11877,conn='buntspecht::colibri'
SF-BUNTS::[55948             , 01472100]:     Description:
SF-BUNTS::[55948             , 01472100]:     Query: select 
db.vnode_name as "buntspecht ->", c.is_quiet as "Quiet",
count(distinct transaction_id) as "#trans", count(sequence_no) as "# 
seq", min
(trans_time) as "oldest transaction" from dd_distrib_queue d, dd_db_cdds c,
dd_databases db where d.targetdb=c.database_no and 
d.targetdb=db.database_no
group by sourcedb, targetdb, db.vnode_name, c.is_quiet 

4.Error in errlog.log Ingres 2.6/0305 HP_UX11i

Hello
I'm getting strange message
ZAIKS_N ::[65487, 8000000100932200]: Fri Jun 18 09:16:56 2004 E_QE0
018_BAD_PARAM_IN_CBIllegal parameter in control block.
Anyone could tell me what this error mean ?
Thanks in advance for help.

Greets
Daniel Swierczewski

5.[Info-ingres] RES: [Info-ingres] Copy table options ?

6. [Info-ingres] Transaction log size (was Huge copy out/in)

7. [Info-ingres] [ingres] [Info-ingres] Logging trace conundrum - what am I missing?

8. [Info-Ingres] table lock escalations in errlog



Return to DATABASE

 

Who is online

Users browsing this forum: No registered users and 86 guest