[Openroad-users] Fw: Removing copy statements from copy.in
Paul White
pwhite at peerlessit.com.au
Fri Jun 27 08:49:47 EST 2008
Anyone care to comment on this thread at openroad-users?
I'm sure it must have been covered at cdi in the past.
I reckon copydb (also unloaddb?) needs a "schema only" type option
For more details see
http://www.peerlessit.com/pipermail/openroad-users/2008-June/001309.html
Paul White
-----Original Message-----
From: Paul
Hey Simon,
That is a bit simpler (but less fun).
I suppose if you want just a copy of the schema you need to include all
the with options:
-with_tables -with_modify -with_data -with_index -with_constr
-with_views -with_synonyms -with_events -with_proc -with_reg -with_rules
-with_alarms -with_comments -with_roles -with_sequences
Paul
-----Original Message-----
From: Simon
Not an OpenROAD question, but you can just say copydb <dbname>
-with_tables -with_modify -with_index
There are many variants if you want to include views/grants etc.
-----Original Message-----
From: Paul
Hi Gareth,
I was hoping there might be an option provided by copydb but could not
find one.
I think we could use a with_no_data option.
Maybe better to ask over at info-ingres.
This will change the \nocontinue to \continue so you can ignore errors
on the copy statements.
(but then also will ignore any other errors)
sed '
s/^\\nocontinue/\\continue/
' copy.in > copynew.in
This will strip out all paragraphs beginning with copy and ending in
\p\g
sed -n '
/^copy /,/\\p\\g/ d
p
' copy.in > copynew.in
Or similarly in nawk if you feel more comfortable
nawk '
/^copy /,/\\p\\g/ {next}
{print}
' copy.in > copynew.in
Paul
-----Original Message-----
From: Kim
If you change /nocontinue to /continue in the copy.in and you do NOT run
copy.out.
Then you should be able to just get the create / modify done, Because it
will fail on every copy into statement
Kim
-----Original Message-----
From: Mark Luijendijk
Gareth,
2 options:
1. (if your Ingres version supports this): copydb -u<dba> <db>
-with_tables -with_modify -with_index -with_views (etc.)
2. awk '(/create table/||/create view/||/create index/||/create
unique/||/modify/||/grant /),/\\p\\g/' copy.in
Good luck!
Mark
-----Original Message-----
From: Gareth
Hi,
Anyone have a script to remove the copy statements from the copy.in?
I want to just create all the tables/indexes etc, but don't want the
copy statements. My nawk/awk is rusty.
Cheers,
________________________________________________________________
OpenROAD-Users mailing list
You can maintain your subscription here:
http://www.peerlessit.com/mailman/listinfo/openroad-users
To unsubscribe click on this link
mailto:openroad-users-unsubscribe at peerlessit.com&subject=unsubscribe
To subscribe click on this link
mailto:openroad-users-subscribe at peerlessit.com&subject=subscribe
More information about the Openroad-users
mailing list