Google Groups Home
Help | Sign in
copydb with rules/procedures?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Norhaza Yusoff  
View profile
 More options May 8, 12:18 pm
Newsgroups: comp.databases.ingres
From: Norhaza Yusoff <yus...@fstrf.org>
Date: Thu, 08 May 2008 12:18:50 -0400
Local: Thurs, May 8 2008 12:18 pm
Subject: [Info-Ingres] copydb with rules/procedures?
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.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Denise Vancil  
View profile
 More options May 8, 12:54 pm
Newsgroups: comp.databases.ingres
From: "Denise Vancil" <Denise.Van...@ingres.com>
Date: Thu, 8 May 2008 12:54:27 -0400
Local: Thurs, May 8 2008 12:54 pm
Subject: Re: [Info-Ingres] copydb with rules/procedures?
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.van...@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.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew  
View profile
 More options May 11, 9:52 am
Newsgroups: comp.databases.ingres
From: Andrew <and...@delta-link.com.au>
Date: Sun, 11 May 2008 23:52:28 +1000
Local: Sun, May 11 2008 9:52 am
Subject: Re: [Info-Ingres] copydb with rules/procedures?
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.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Richard Harden  
View profile
 More options May 13, 1:15 am
Newsgroups: comp.databases.ingres
From: "Richard Harden" <richard.har...@orcon.net.nz>
Date: Tue, 13 May 2008 17:15:58 +1200
Local: Tues, May 13 2008 1:15 am
Subject: Re: [Info-Ingres] copydb with rules/procedures?
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 |
\**********************************/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Norhaza Yusoff  
View profile
 More options May 14, 2:58 pm
Newsgroups: comp.databases.ingres
From: Norhaza Yusoff <yus...@fstrf.org>
Date: Wed, 14 May 2008 14:58:45 -0400
Local: Wed, May 14 2008 2:58 pm
Subject: Re: [Info-Ingres] copydb with rules/procedures?

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?)


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Denise Vancil  
View profile
 More options May 15, 4:13 pm
Newsgroups: comp.databases.ingres
From: "Denise Vancil" <Denise.Van...@ingres.com>
Date: Thu, 15 May 2008 16:13:39 -0400
Local: Thurs, May 15 2008 4:13 pm
Subject: Re: [Info-Ingres] copydb with rules/procedures?

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.van...@ingres.com <mailto:denise.van...@ingres.com>  

________________________________

From: info-ingres-boun...@kettleriverconsulting.com
[mailto:info-ingres-boun...@kettleriverconsulting.com] On Behalf Of
Norhaza Yusoff
Sent: Wednesday, May 14, 2008 1:59 PM
To: Ingres and related product discussion forum
Subject: Re: [Info-Ingres] copydb with rules/procedures?

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?)

Richard Harden wrote:

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 |
\**********************************/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Denise Vancil  
View profile
 More options May 15, 4:13 pm
Newsgroups: comp.databases.ingres
From: "Denise Vancil" <Denise.Van...@ingres.com>
Date: Thu, 15 May 2008 16:13:39 -0400
Local: Thurs, May 15 2008 4:13 pm
Subject: Re: [Info-Ingres] copydb with rules/procedures?

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.van...@ingres.com <mailto:denise.van...@ingres.com>  

________________________________

From: info-ingres-boun...@kettleriverconsulting.com
[mailto:info-ingres-boun...@kettleriverconsulting.com] On Behalf Of
Norhaza Yusoff
Sent: Wednesday, May 14, 2008 1:59 PM
To: Ingres and related product discussion forum
Subject: Re: [Info-Ingres] copydb with rules/procedures?

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?)

Richard Harden wrote:

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 |
\**********************************/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google