Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Administration & Installation

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
35%
Installation Wizard into new VRC
42%
Manual into existing VRC
3%
Manual into new VRC
19%
Total votes: 31

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 22nd November 2004, 10:54
zyilmaz zyilmaz is offline
Junior Member
 
Join Date: Aug 2003
Posts: 9
zyilmaz is on a distinguished road
Baan: IVc3 - DB: SQL - OS: NT
How can I restore dumps of TT package tables?

Hello,

A few days ago, due to some problems our BaaN server went down. We had to restore a few months old SQL backup. But we had current seq. dumps for tables (including Tools company 000 table dumps). Then we created tables from a that new sequential dump (we first deleted tables - then created the same tables from seq. dump one by one) . Server opened and BaaN worked. But, as we could not delete company 000 tables, we could not restore tools tables. As a result of it, developments (new sessions, domains etc.) we had made for a few months did not work in new condition. My question is how can I restore company 000 tools tables ?

Urgent reply appreciated !

Thanks in advance.
Reply With Quote
  #2  
Old 22nd November 2004, 14:57
Markus Schmitz's Avatar
Markus Schmitz Markus Schmitz is offline
Guru
 
Join Date: Feb 2002
Location: Cyprus
Posts: 668
Markus Schmitz is on a distinguished road
Baan: Ivc4 - DB: Oracle8i/9i/10g - OS: HP-Ux11i
use commandline

Hi there,

as you are locking certain tools tables, if you are logged into Baan, it is safest to load tools tables from the commandline.

check your help for the bdbpost command. It has lots of nice (?) options and is actually called also by the session you are using.

Regards

Markus
Reply With Quote
  #3  
Old 22nd November 2004, 15:23
zyilmaz zyilmaz is offline
Junior Member
 
Join Date: Aug 2003
Posts: 9
zyilmaz is on a distinguished road
Baan: IVc3 - DB: SQL - OS: NT
SQL commands?

Hello Markus,

Firstly I would like to thank for your kind reply. But my OS is NT and using SQL 7.0. I checked the help files for bdbpost6.1 , but there is not any SQL commands for that .exe file? Can not I use bdbpost ?

Thanks in advance.
Reply With Quote
  #4  
Old 22nd November 2004, 15:36
dave_23's Avatar
dave_23 dave_23 is offline
Guru
 
Join Date: Oct 2002
Location: Portland, OR
Posts: 1,303
dave_23 will become famous soon enough
Baan: All - DB: Oracle / MS SQL / DB2 - OS: All
bdbpost.exe is the same as bdbpost6.1

I have doubts that it will work though - based on your other post (the SQL error) I think something got messed up when you restored the DB.

Here are the params though - you'll have to know how you created the SEQ. Dumps.

-A : Append rows (skip and show total duplicates) or Create new table
-I <file>: Redirects input from input-file <file>
( Use this option if bdbpre dump is created with -M option)
-O <file>: Redirects standard output device data to <file>. This device
is not used by bdbpost anymore. The option will be removed in
the future
-E <file>: Redirects information to <file>
-R : Append rows (replace and show total duplicates) or Create new table
-f : Fast mode (first rows, then indexes)
-K/-k : Backup/Drop existing table
-l : Display contents of input
-e : File to store unsuccessfully 'posted' tables
-d : Database Driver type
B(isam) (b)T(am) O(racle) I(nformix)
S(ybase) D(B2) M(SQL-Server) N(onStop SQL)
<host> - remote system (name is <host>)
<driver>[<spec>] - driver name [ specification ]
Options -x, -t and -D described below are required while
uploading ASCII files from other database to bshell format
-x : To load fix length ASCII file (.F) from other database
-t : Separator
Needed while loading an ASCII file (.S) from other database
-m : Disable domain constraints
-n : Ignore referential integrity constraints
-D : Directory name for ASCII files to be uploaded
-c : Tables will be created with specified company number
-C : Range of company numbers for which bdbpost will be done (ex:000-100)
-i : Ignore domain range error and skip record
-p <pack_comb>: define package combination
<pattern> pattern to specify tables for which bdbpost will be done
(wildcards allowed)
-q <output-file>: Redirect information to output-file. This option
will be removed in the future, use -E !
-r <rows/transaction>: The number of inserted rows per transaction
-M : The input consist off multiple files
-u : Short usage
-U : Usage
-V/-v : Version information

Dave
Reply With Quote
Sponsored Links
  #5  
Old 22nd November 2004, 15:39
Markus Schmitz's Avatar
Markus Schmitz Markus Schmitz is offline
Guru
 
Join Date: Feb 2002
Location: Cyprus
Posts: 668
Markus Schmitz is on a distinguished road
Baan: Ivc4 - DB: Oracle8i/9i/10g - OS: HP-Ux11i
bdbpost also exists for Baan on NT. Just check the bin directory in your BSE directory. Most likely something like C:\baan\bin and the binary is most likely called bdbpost.exe.

In unix it is a bit easier to use, as it gives proper error messages. But it works also in Windows. As I said, the baan session is actually calling it anyway.

Here is some text from my baan windows help:

INDEX


Recovering corrupted BAAN Base tables



NAME
bdbpost6.1 - Creates a database table from a sequential dump or

appends data to an existing database table.

SYNOPSIS
bdbpost6.1 [-AiklmnRuUvV] [-D seq dir] [-d Dr type] [-e file]

-t sep] [-x] [-c compnr] [-C range of company no]
-p package_comb] [pattern]

DESCRIPTION
bdbpost6.1 reads either from its argument or from the standard input and creates a new database table if that table does not exist. It appends data to an existing table if the option 'append' is on. bdbpost6.1 also checks current data dictionary information with the information in the dump, if they do not match it gives an error. If the current data dictionary is not present it creates a data dictionary (e.g. dtimcs/dtimcs023) based on the dump. For each table bdbpost6.1 prints information such as the table name, indexes, the number of records and errors (if any).


bdbpost6.1 can be run in the following ways:

- Using a sequential dump created by bdbpre6.1.

Example:
on system 1:
bdbpre6.1 -dbisam -Ntimcs016 -C000-003 > timcs_dump
on system 2:
bdbpost6.1 < timcs_dump


- Using sequential dumps (-x or -t option of bdbpre6.1) from other databases. In this case the option -D is mandatory to get the directory name in which .S files are stored.

Example:
bdbpost6.1 -dinformix -t"|" -D./seqdir
bdbpost6.1 -doracle -x -D./seqdir
-D : Path for sequential files (.S or .F)
-t : Separator. If you want to load a sequential dump
containing separators (e.g. dump from UNIFY has
separator '|') care should be taken that the file name is
the table name with extension '.S'.
For example:
If you want to load a UNIFY sequential dump into the
table ttimcs016000, first move the sequential dump to
the ttimcs directory with name 'ttimcs016000.S'.
bdbpost6.1 -Dttimcs -t"|" will search for a .S file in
ttimcs and if that file is found, the corresponding tables
are created or appended.
WARNING:
With the -D option all .S files in that directory are used
to create/append the tables, so care should be taken to
remove unwanted .S files before running bdbpost.
-x: If you want to load a sequential dump with a
fixed-length record without any separators (.F files, e.g.
dump from dBASE-III), care should be taken that the file
name is the table name with the extension '.F'.
For example:
If you want to load a dBASE-III sequential dump into the
timcs016000 table (ORACLE organization).
bdbpost6.1 -doracle -Ddbase -x will search for an .F file
in dbase and if that file is found the corresponding table
is created or appended.


In some of the above examples the database driver type is retrieved from $BSE/lib/tabledef6.1. If you want to use a specific database driver for a particular conversion you can use the -d option.

Database driver can be of the following types:

- BAAN Base (bisam)
- BAAN Base TP (btam)
- ORACLE (oracle)
- INFORMIX (informix)

Enter the name between the brackets, see also at 'bdbpre6.1'.

The following parameters can be used for bdbpost6.1:

-A : Append to an existing table, if duplicate records exist do
not overwrite them from the dump. Print duplicate record
summary at the end. Create table if it does not exist.
-c : Company number for which tables will be created.
-C : Range of customer numbers for which the bdbpost
operation should be carried out. This must be the last
option specified in the command (only pattern may
occur after this).
-d : Database driver type.
-D : Directory name for ASCII files to be loaded.
-e : File to store names of unsuccessfully created tables.
-f : Tables are created by first inserting all rows and then
creating the indexes (if DBMS supports this).
-k : Existing tables are deleted.
-K : Existing tables are deleted after a backup is made.
(if DBMS supports this)
-l : Listing of table name(s) in the dump.
-m : Disable domain constraints.
-n : Ignore referential integrity constraints.
-R : Append to an existing table or create a new one, if a
record already exists, it is replaced by the record in the
dump. A summary is given at the end.
Note that only the existence of the primary key will be
checked. If a primary key exists, the record is replaced.
When the primary key does not exists, but a secondary key
exists, error 100 (Duplicate record) occurs.
-t : Specify the used separator. Needed while loading an
ASCII file from another database.
-u/U: print usage information.
-v/V: print information about the version of bdbpost.
-x : Load ASCII file (.F) with fixed length records.
-i : Ignore domain range error and skip record
-p : define package combination
<pattern>: Pattern to specify tables which are filtered out of
the dump. Wildcards as '*' and '?' are allowed.


By using the -f option tables are created faster but a few things should be noted:

- Interrupting bdbpost results in table inconsistency.
- An index can not be created in case of a duplicate conflict.
- For large tables, the adding of indexes can take a long time ( > 15 minutes ).

EXAMPLES
bdbpre6.1 -doracle -Nttadv000 -C000-010 > dump
bdbpost6.1 -dbisam < dump
( Creates (appends) all tables in dump )
bdbpost6.1 -l < dump
( Gives you names of tables in dump )
bdbpost6.1 -C000-005 < dump
( Creates/appends tables only in the given customer range )
bdbpre6.1 -doracle -Nticom000 -C000-010 > dump
bdbpost6.1 -C000-005 'ticom*' < dump
( Creates/appends tables only in the given customer range
and where table name matches the pattern 'ticom' )
bdbpost6.1 -R -C000-005 'ttadv*' < dump
( Creates/appends tables only in the given customer range
and where table name matches the pattern 'ttadv'. If duplicate
records exist they are replaced by records from the dump )
Converting from one database organization to another
bdbpre6.1 -dbisam -Nttadv099 -C000-999 | bdbpost6.1 -doracle
( From BAAN Base to ORACLE organization )
Loading from other databases
bdbpost6.1 -doracle -Dunify -t"|"
(UNIFY to ORACLE)
bdbpost6.1 -Ddbase -x -dbisam
(dBASE-III to BAAN Base)


WARNING If the -d option is not used, the database driver is retrieved from $BSE/lib/tabledef6.1. Furthermore, if a remote driver is specified in tabledef6.1 the database table from the remote machine is used but the data dictionary is taken from the current machine which may cause great difficulties.

SEE ALSO
bdbpre6.1


Recovering corrupted BAAN Base tables

It may occur that the index of BAAN Base tables is corrupted due to, for instance, a power failure. In most cases only the index is corrupted but not the data itself. The database tools bdbpre6.1 and bdbpost6.1 make it possible to rebuild the corrupt index. This facility is only available for BAAN Base (TP) database organizations.

The procedure for recovering:


1. Make a sequential dump of the corrupted table by calling bdbpre6.1 with the option -r. If the -r option is given, only the data file is read and the corrupted index file is ignored.
2. Load the sequential dump into the BAAN Base table, using bdbpost6.1.

Example:
bdbpre6.1 -r -dbisam -Ntimcs001 -C000 > dump
bdbpost6.1 -dbisam < dump
Reply With Quote
  #6  
Old 23rd November 2004, 20:44
zyilmaz zyilmaz is offline
Junior Member
 
Join Date: Aug 2003
Posts: 9
zyilmaz is on a distinguished road
Baan: IVc3 - DB: SQL - OS: NT
Hello,

I had to restore tools tables (company 000) from "create table from sequential dump" session. I have overwritten all of the tables with the dumps. There was not any serious error. But now all sessions became "subsession" in menu browser and I can not run any session. It all says "activating subsession not possible" ? What is the problem?

Please urgent help !
Reply With Quote
  #7  
Old 24th November 2004, 08:06
Markus Schmitz's Avatar
Markus Schmitz Markus Schmitz is offline
Guru
 
Join Date: Feb 2002
Location: Cyprus
Posts: 668
Markus Schmitz is on a distinguished road
Baan: Ivc4 - DB: Oracle8i/9i/10g - OS: HP-Ux11i
What does "there were no serious errors" mean?

Your symptons are strange indeed. In my experience dumping all (!) tables fomr 000 and loading them with bdbpost (not from the session) always works.

You have to be carefull with one thing: It is best to dump the 000 tables as a bigdump without seperators. Especially older portingsets had problems with seperators and company 000, because some of the 000 tables (menu layout, form layout, ..) contain binary data.

What happens, if you call a session by code, for example tiitm0101m000?
If it works, then your menu is corrupted. If it does not work, then actually something seems to be wrong with your sessions.

Is this on your production or test system?

Regards

Markus
Reply With Quote
  #8  
Old 24th November 2004, 08:40
zyilmaz zyilmaz is offline
Junior Member
 
Join Date: Aug 2003
Posts: 9
zyilmaz is on a distinguished road
Baan: IVc3 - DB: SQL - OS: NT
Hello Markus,

Firstly, thank you very much for your interest.

With "no serious errors", I mean there were some delete (605) or write (606) errors. I ignored referencial integrity constraints (in session) then I could restore these tables.

Unfortunately, I used "|" seperators while dumping tools tables. Is not there something can be done in this situation?

When I try to call the session by code it says "no permission for ttdskxxxxx". So it does not call the session by code.

One more thing, -of course all of these were in test company but I have some valuable develeopments in it, so I would like to restore it- I restored the tables one by one in numerical order. I think there must be a logical order -references etc.- . Can you tell me about logical table order to restore ?

Thanks again.
Reply With Quote
  #9  
Old 24th November 2004, 12:13
norwim's Avatar
norwim norwim is offline
Guru
 
Join Date: Oct 2001
Location: Germany Moenchengladbach
Posts: 450
norwim is on a distinguished road
Baan: some - DB: more - OS: many
Hi there,
as mentenioned before, you should have dumped the tools tables into a big dump because your field-seperator ("|") may occur in a table. If this is the case, reloading the dump will fill the wrong fields and lead to all sorts of unpredictable errors.
This is what I would do if I were you:
get awk onto your NT box
build a file called awkcountf with the following content:
Code:
#----------Start of file
BEGIN{FS="|}
{ar[NF]=ar[NF]+1}
END{for (i in ar) print i ":" ar[i]}
#---END of file
control each of the tttxxxyyy000.S file with awk:
awk -f awkcountf tttxxxyyy000.S
You will receive a sum of records with equal number of fields ...
so if you only get one line this means that this file is not corrupted (no "|" occured) ... if you get more counts, the you will have to have a look at this file.

hth

Norbert
__________________
Have a nice day

Last edited by patvdv : 24th November 2004 at 14:53. Reason: Added CODE tags
Reply With Quote
  #10  
Old 25th November 2004, 12:49
Markus Schmitz's Avatar
Markus Schmitz Markus Schmitz is offline
Guru
 
Join Date: Feb 2002
Location: Cyprus
Posts: 668
Markus Schmitz is on a distinguished road
Baan: Ivc4 - DB: Oracle8i/9i/10g - OS: HP-Ux11i
The order of loading tables is of no importance, as long as you have "ignore referential integrity" checked.

Norberts advise is a good one. This will show you which sequential file will be wrongly interpreted.

One question for Norbert: If he knows, which file is "corrupted". How would he fix it?

Regards

Markus
Reply With Quote
  #11  
Old 25th November 2004, 16:00
dave_23's Avatar
dave_23 dave_23 is offline
Guru
 
Join Date: Oct 2002
Location: Portland, OR
Posts: 1,303
dave_23 will become famous soon enough
Baan: All - DB: Oracle / MS SQL / DB2 - OS: All
If your porting set is 6.1c.06.04 or above then you can use a pipe seperator with tools dumps. It seems to me like something else might be the problem.

Dave
Reply With Quote
  #12  
Old 26th November 2004, 08:33
norwim's Avatar
norwim norwim is offline
Guru
 
Join Date: Oct 2001
Location: Germany Moenchengladbach
Posts: 450
norwim is on a distinguished road
Baan: some - DB: more - OS: many
Hi Markus,

tricky question.
Depending on the size of the file and the number of 'corrupted' records either manually (vi) or a more sophisticated awk script .... I would have to see the file to think about it.
Also it might be possible to create a new dump of the table in question to see whether and to what amount the table has changed ... so that the editoring work could be reduced to a minimum.
But I do think that this could be done.

hth

Norbert
__________________
Have a nice day
Reply With Quote
  #13  
Old 31st January 2005, 10:45
catwalk's Avatar
catwalk catwalk is offline
Junior Member
 
Join Date: Jun 2002
Posts: 15
catwalk is on a distinguished road
Baan: All - DB: All - OS: All
Original 000 dump in Unix and installation issue

Hi Gurus,

Where is the company 000 dump located on install media of Unix. We can find that in "prefiles" folder on Windows system.

What does the version.txt file on the media of Baan5.0c looks like. I have a Installation CD, version.txt file of which reads "Description : Update CD for UNIX - iBaan ERP 5.0c Localizations 2.0, ServicePack 2 application and ServicePack 3 tools - US English".

I this a right master CD?

Thanks in adavnce
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Documentation for RTDD Kevin_Rell Tools Development 1 8th October 2003 16:00
Question on Package Combination and VRCs manusatsangi Tools Administration & Installation 1 24th February 2003 11:22
Create new package vrc - How to? pjohns Tools Administration & Installation 5 17th July 2002 19:32
Tools Tables which can be created for a company different than 000 i96nds Tools Development 11 13th March 2002 01:07


All times are GMT +2. The time now is 03:54.


©2001-2017 - Baanboard.com - Baanforums.com