vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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.vancil@ingres.com <mailto:denise.vancil@ingres.com> ________________________________ From: info-ingres-bounces@kettleriverconsulting.com [mailto:info-ingres-bounces@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 | \**********************************/ -----Original Message----- From: info-ingres-bounces@kettleriverconsulting.com [mailto:info-ingres-bounces@kettleriverconsulting.com] On Behalf Of Andrew Sent: Monday, 12 May 2008 1:52 a.m. To: Ingres and related product discussion forum 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. Denise Vancil wrote: 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.vancil@ingres.com www.ingres.com -----Original Message----- From: info-ingres-bounces@kettleriverconsulting.com [mailto:info-ingres-bounces@kettleriverconsulting.com] On Behalf Of Norhaza Yusoff Sent: Thursday, May 08, 2008 11:19 AM To: Ingres and related product discussion forum 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. _______________________________________________ Info-Ingres mailing list Info-Ingres@kettleriverconsulting.com http://www.kettleriverconsulting.com...fo/info-ingres _______________________________________________ Info-Ingres mailing list Info-Ingres@kettleriverconsulting.com http://www.kettleriverconsulting.com...fo/info-ingres |
| Thread Tools | |
| Display Modes | |
|
|