Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Info-Ingres] copydb with rules/procedures?

3 views
Skip to first unread message

Norhaza Yusoff

unread,
May 8, 2008, 12:18:50 PM5/8/08
to Ingres and related product discussion forum
Hello everyone,
Is there a way to copy a table and get all the related rules and
procedures be included in the copy.in script?
We have been having a problem of forgetting to include the rules and
procedures into the new table whenever we do the copydb to a table,
which results in missing rules and procedures for that table.

Anyone who has experienced with this issue or who knows the answer,
please give us some insights.

Thanks.

Denise Vancil

unread,
May 8, 2008, 12:54:27 PM5/8/08
to Ingres and related product discussion forum
As of Ingres 2.6, copydb -help shows you can copy out rules and
procedures with extra parameters to copydb such as -with_proc
-with_rules. I would think this is what you need to get your procedures
and rules copied out.

$ copydb -help

E_UG0011 Correct syntax:
copydb [-param_file=filename] | [ dbname [-c] [-row_labels]
[-uusername]
[-Ggroupid ] [-parallel] [-journal] [-P] [-source=dirname]
[-dest=dirname] [-ddirname] [-with_tables] [-with_modify]
[-with_data]
[-all] [-order_ccm] [-with_index] [-with_constr] [-with_views]
[-with_synonyms] [-with_events] [-with_proc] [-with_reg]
[-with_rules]
[-with_alarms] [-with_comments] [-with_roles] [-add_drop]
[-infile=filename] [-outfile=filename] [-with_permits] [-relpath]
[-no_loc] [-no_perm] [-noint] [-no_persist] [-no_repmod]
{tablename|viewname}]

- Denise

Denise Vancil

Senior Quality Assurance Engineer

Ingres Corporation

denise...@ingres.com
www.ingres.com

This transmission is confidential and intended solely for the use of the
recipient named above. It may contain confidential, proprietary, or
legally privileged information. If you are not the intended recipient,
you are hereby notified that any unauthorized review, use, disclosure or
distribution is strictly prohibited. If you have received this
transmission in error, please contact the sender by reply e-mail and
delete the original transmission and all copies from your system.

Thanks.
_______________________________________________
Info-Ingres mailing list
Info-...@kettleriverconsulting.com
http://www.kettleriverconsulting.com/mailman/listinfo/info-ingres

Andrew

unread,
May 11, 2008, 9:52:28 AM5/11/08
to Ingres and related product discussion forum
Hi All,

I think it would be a good idea to see if any Views are dependent on
this/these table(s) as well, if the copydb is for one/some table(s).

Regards,
Andrew.

Richard Harden

unread,
May 13, 2008, 1:15:58 AM5/13/08
to Ingres and related product discussion forum
After reading the original post, the copydb -help looked good, but I don't
think its quite wahat
Norhaza was looking for.

I tried various options, whilst trying to copy out a table called mm
That particular table had three rules on it, triggering two different
procedures

What ever flags I tried, I could not get copydb to copy out just the mm
table, and the three rules and two procedures.

The with_rules|procs only seemed to have an effect on the copy.in if there
was no table specified, then
I could get all the rules and/or all the procedures

I even tried procedures like mm@update etc, but to no avail.

Perhaps I was reading too much into the copydb -help.

Thoughts??


Cheers

Richard

/**********************************\
| New Zealander, leading the world |
\**********************************/

Hi All,

Regards,
Andrew.

_______________________________________________

Norhaza Yusoff

unread,
May 14, 2008, 2:58:45 PM5/14/08
to Ingres and related product discussion forum
Richard is right, I am looking for a way to preserve the rules/procedures of a table whenever the table is modified using copydb command. I tried with_rules option, but what happened was the 'drop rules' statement got generated, instead of 'copy or create rules'. (isn't that weird?)

Denise Vancil

unread,
May 15, 2008, 4:13:39 PM5/15/08
to Ingres and related product discussion forum

Hello Norhaza and Richard,

 

Experimenting with ‘copydb’ a bit more, I can see your point.  You can get a specific table copied out/in when you name the table or you can get all of the procedures/rules copied out/in but not both at the same time.  Nor can you get only the procs/rules specific to one table.  Using the syntax ‘copydb mydb1 –with_proc –with_rules’ attempts to get all procs/rules.

 

I tried this test case where database ‘mydb1’ had 2 tables, 3 procs, 3 rules.  After executing this script (below) to copy out/in first the table I wanted – ‘one_tbl’ then separately copy out/in the procs/rules, ‘copy_p_r.in’ failed to find table ‘two_tbl’ so rule ‘r1_two_tbl’ failed causing the copy_p_r.in to stop right there.  It looks to me like these scripts are sequential.  If something cannot succeed, the script stops there.  So, database ‘mydb2’ did not get rule ‘r3’ because rule ‘r1_two_tbl’ came first and failed.  That leaves me with ‘mydb2’ having a procedure for a table I don’t have and missing a rule for a procedure I do have. :0*(

 

(contents of myscript.sh)

 

copydb -utestenv mydb1 one_tbl -infile=copy_one_tbl.in -outfile=copy_one_tbl.out

sql -utestenv mydb1 < copy_one_tbl.out

sql -utestenv mydb2 < copy_one_tbl.in

copydb -utestenv mydb1 -with_proc -with_rules -infile=copy_p_r.in -outfile=copy_p_r.out

sql -utestenv mydb1 < copy_p_r.out

sql -utestenv mydb2 < copy_p_r.in

 

Either, we are reading more into the intended use of ‘copydb’ from ‘copydb –help’ or ‘copydb’ should be enhanced so you can name ‘a table’ and get it along with its procedures/rules and that is it.

 

- Denise

Denise Vancil
Ingres Corporation
Sr. Quality Assurance Engineer
tel:  631-787-8292
mobile: 630-818-5011
denise...@ingres.com


Denise Vancil

unread,
May 15, 2008, 4:13:39 PM5/15/08
to Ingres and related product discussion forum

Norhaza Yusoff

unread,
Feb 20, 2009, 2:08:36 PM2/20/09
to Ingres and related product discussion forum
Hello,
Has anyone come across this error? We recently installed Ingres 9.2.0
and this error has been happening since then.....

E_RD0125_EXCEPTION consistency check
Bus Error (SIGBUS) rdf_invalidate(0x1002583e0+0x628) @ PC 100258a08 SP
ffffffff5f475971 PSR 0 G1 481b o0 0

Thanks
-Norhaza

Karl & Betty Schendel

unread,
Feb 20, 2009, 2:30:27 PM2/20/09
to Ingres and related product discussion forum

Nope, not familiar to me. This would be Solaris, right?
Are you running 32bit or 64bit server? (ingprenv and
look for II_LP64_ENABLED ON or TRUE).

Does the error log or the DBMS log (II_DBMS_LOG) show the
query involved?

Karl

Michael Dyer

unread,
Feb 23, 2009, 2:47:55 AM2/23/09
to Ingres and related product discussion forum
Hi Norhaza,
Assuming that you have a support contract, please raise a support issue
for this with Ingres Corp.
Cheers,
Michael

-----Original Message-----
From: info-ingr...@kettleriverconsulting.com
[mailto:info-ingr...@kettleriverconsulting.com] On Behalf Of
Norhaza Yusoff
Sent: 20 February 2009 19:09
To: Ingres and related product discussion forum

Subject: [Info-Ingres] SIGBUS Error

Hello,
Has anyone come across this error? We recently installed Ingres 9.2.0
and this error has been happening since then.....

E_RD0125_EXCEPTION consistency check
Bus Error (SIGBUS) rdf_invalidate(0x1002583e0+0x628) @ PC 100258a08 SP
ffffffff5f475971 PSR 0 G1 481b o0 0

Thanks
-Norhaza

0 new messages