forsms
20th June 2002, 01:24
Hi all,

I would like to take sequential dump of entire company and am trying to use the following:
bdbpre6.2 -p b50cprod -t "|" -C 600.

I am getting the below error:
either the -N or the -I option should be specified'

what is the option to take the entire company seq. dump without specifying the -I / -N option (-I option needs a file containing the names of tables while -N option needs the name of the table)

Thanks,

NPRao
20th June 2002, 02:00
You can make a 3-GL script to do it -


select ttadv420.cpac, ttadv420.cmod, ttadv420.flno
from ttadv420
where ttadv420.cpac <> "tt"
and ttadv420.expi = ttyeno.no
and ttadv420._compno = 000
group by ttadv420.cpac, ttadv420.cmod, ttadv420.flno
selectdo
ret = change.progress.indicator(0, ttadv420.cpac &
ttadv420.cmod & ttadv420.flno )
tab.name = ttadv420.cpac & ttadv420.cmod & ttadv420.flno
comd = "bdbpre" & bse.release$() & " -t""|"" -N" & tab.name & " -o " & path & " -C" & comp
e = shell(comd, 0)
endselect


tab.name - table name
path - path of the table dumps
comp - company number

NPRao
20th June 2002, 02:02
Just a thought,

you can also use the session - Create Sequential Dump of Table - ttaad4226m000

forsms
20th June 2002, 02:09
Thanks for the reply.

My aim to use bdbpre instead of create seq. dump session (ttaad4226m000) is to speed up the process (I understand that running bdbpre from command line ) would reduce (by more than 40-50%) the time .

Will going by your way have the same effect as the bdbpre being run from command-prompt (i may not use progress - indicator)??

if there is no option with bdbpre which takes all the tables of the company than; I paln to get all the tables for a company in a flat file using table ttadv420 and than run bdbpre?

Thanks

NPRao
20th June 2002, 02:21
I dont think there should be a large difference in the speed of executions from the session and the command line option.

The session also uses the bdbpre binaries.

But when executing from the session, the table is verified in the current VRC tree based on the package combination and then verified if the table is existing in the database/company or not. If present then its the table dump is taken.

If you are using the command line option we bypass those checks.

Taking off the progress indicator might save you sometime, but with this 3-GL program you would be staring at your monitor if the program is done executing or not, and have to check the status with the ps command or use the process session. The progress indicator is a convenience for this situation.

Caner.B
20th June 2002, 11:27
Hi,
-N option is used to specify one or more tablenames
bdbpre6.2 -p b50cprod -Ntiitm001 -t "|" -C 600
-I option is used to specify a table list file to take sequential dumps.

create a file with all your table names in it ,each in one row,
in this format.
ticms001
ticms002
ticms003
..........
tdbcd990

the command below will read the tables list from the tables.600 file and will create the dump file of all the tables listed in the tables.600 to /dump/dmp.600
and will also create a dmp600.err error log file .

bdbpre6.2 -I /dump/tables.600 -E /dump/dmp600.err -C 600 > /dump/dmp.600


Hope This Helps

Caner

victor_cleto
21st June 2002, 12:32
You'll need to build a script that 1st connect into oracle and generates a list of the tables used by company XXX in a format that Baan can use, then you use the bdbpre command with -I <that file>. Involve your DBA if needed.

norwim
22nd June 2002, 19:19
Why not create the file with the tablenames itself with bdbpre?
bdbpre6.1 -t"|" -o. -Nttadv130 -C000
field no5 (or 6?) specifies tables(=3?), paste the first 3 fields together, sort (-u) to get rid of double entries and voila' - you have a file that holds tablenames. Edit this file and use it to dump the tables listed.
This is from memory, but it sure works

hth
Norbert

GAURAVGUPTA9
16th October 2002, 13:28
hi prashanth
can u tell me how to create this session. the table ttadv420 is of 000 company when i refer this table it says table not found. any suggestions
regards
GAurav


Originally posted by NPRao
You can make a 3-GL script to do it -


select ttadv420.cpac, ttadv420.cmod, ttadv420.flno
from ttadv420
where ttadv420.cpac <> "tt"
and ttadv420.expi = ttyeno.no
and ttadv420._compno = 000
group by ttadv420.cpac, ttadv420.cmod, ttadv420.flno
selectdo
ret = change.progress.indicator(0, ttadv420.cpac &
ttadv420.cmod & ttadv420.flno )
tab.name = ttadv420.cpac & ttadv420.cmod & ttadv420.flno
comd = "bdbpre" & bse.release$() & " -t""|"" -N" & tab.name & " -o " & path & " -C" & comp
e = shell(comd, 0)
endselect


tab.name - table name
path - path of the table dumps
comp - company number

dave_23
16th October 2002, 17:55
If you are Oracle, you can use the oraX_pre.sql
scripts provided with the porting set located in $BSE/lib/ora

Then just bdbpre6.1 -Iora.tables.pre.XXX -t"|" -CXXX

if you're not oracle you can probably use those scripts to
help you write one for your DB.

bdbpre from the command line isn't going to be any faster
than from create sequential dump from table... but I personally
think its eaiser to control, and i like to set my environment variables on the command line.

Dave

evertsen
16th October 2002, 19:01
Originally posted by forsms
My aim to use bdbpre instead of create seq. dump session (ttaad4226m000) is to speed up the process (I understand that running bdbpre from command line ) would reduce (by more than 40-50%) the time .

You might have only half the story here. You will only save time if you run are trying to make a dump and then create tables from that dump (i.e. reading and writing at the same time). From the command line you can "pipe" from the bdbpre to bdbpost and this will save on processing time in a big way. Running bdbpre alone from the command line will not save you any time over running the session ttaad4226m000.

victor_cleto
17th October 2002, 20:32
As I mentioned before, the best way is to build the table list from a select statement from your database and then do your bdbpre on each table of that list. I've build such a script (Oracle DB) where:

- it only gets the tables that have non-zero rows (you save a lot of time since most of the tables are empty, so why loose time dumping them?)
- dumps each table individually and
- when finishes for each one, starts a compress in the background - very usefull for big companies by saving a huuge ammount of diskspace.

It even checks each dump log and copies the errors (if any found) into a global log that then is checked at the end to know if any problems where encountered.

With this we not only managed to reduce an 8 hour dump to a 2,5 hour but also managed to go from 4GB to way less than 1 GB of filesystem usage.

NPRao
18th October 2002, 06:13
Gaurav,

I didnt get your question, can you explain me in detail ?


hi prashanth
can u tell me how to create this session. the table ttadv420 is of 000 company when i refer this table it says table not found. any suggestions
regards
GAurav


Did you use the session - Create Sequential Dump of Table - ttaad4226m000 ??

GAURAVGUPTA9
18th October 2002, 08:55
hi all
thanx.
ttaad4226m000 session has worked now. the table ttaad502 was not there in comapany 000.

Gaurav