lauras
25th February 2003, 18:16
DB crashed yesterday, and took one drive with it. The drive had all of our datafiles for a set of archive companies' indexes. This was a relief, since the data was on another drive and not lost. Currently, all four of these index tablespaces are offline, as that was the only way to get the DB started again. My plan is to drop and recreate the four tablespaces (8 datafiles) and rebuild the indexes. I've done many export/imports in Oracle and many sequential dumps/reorgs in Baan, but I'm not sure how to proceed. If I use the Oracle import to get my indexes back, it doesn't look at the ora_storage file to determine what tablespace to put the indexes in, does it? Only Baan would use that file, right? Does that mean my only option is to create sequential dumps and/or use Baan's reorg on the tables? I'm not aware of an option in Oracle's import that allows you to specify the tablespace for indexes.
FYI - Baan 4c+, Windows NT-sp6a, Oracle 7.3.4 in our production system
Any help/input would be wonderful!
James
26th February 2003, 11:03
Hi Lauras,
Do you have any form of backup? Datafiles, Oracle Export Dump, Baan Sequential Dump? If so, you could use any of these to get your database back.
Importing an Oracle Export Dump would be fine. These dump files contain the logic to re-create the indexes in the correct tablespaces.
Baan Sequential Dump would import the data, using the ora_storage for storage information.
Another option would be to restore the 8 datafiles from a backup, and then recover them.
If you have no backup, it still maybe possible to get those indexes back, but it gets a bit trickier.
Good luck.
lauras
26th February 2003, 16:51
By the time of the crash, too many archivelogs had been created since our last full (valid) backup. We retrieved the datafiles from an old backup then took them offline so we could get the DB up. Since then, of course, more archivelogs have been created, and since we would have to kick out all the users, we essentially decided to not do it from backup. Plus, this is archive data, that the users aren't really accessing yet, so it's not AS crucial that we get it back immediately.
I spoke with Oracle yesterday and was told that since we don't have indexes to export, we wouldn't have any to import. So we can't use Oracle functions to fix the problem, other than dropping and recreating the 4 tablespaces and 8 datafiles.
I received an email from a Baan rep and he said there was a Baan command - gcommand - that could recreate the indexes, but he would have to gather info on the command. I've never heard of it.
Unless one of my queries results in a better solution, our current plan is to drop/recreate the tablespaces for the indexes, then use Baan's sequential dump for each company, then drop the tables, recreate them, and create from seq. dump. For 7 companies, and the amount of data involved, it will take a very long time, not to mention removing permission to each company as we fix it. We have about 200 users, and you're probably aware of how tedious Baan's user authorization sessions are. You can guess I'm not looking forward to it, and hoping someone has a better idea!
dave_23
26th February 2003, 19:44
Hi lauras,
gcommand is nice but I don't remember the syntax, try calling up your Baan support rep. It would look like this though:
<file g1>
#1 <table_name> CRIDX 9999 -p
And have an entry for every table.
then just
gcommand g1 <company ###>
The CRIDX is what I'm forgetting, its something like that.
- OR -
if you have an old export of that data, import it with just show = y (and maybe just indexes) and it will create the code to re-create your indexes.
Dave
lauras
26th February 2003, 19:49
Thanks, I'm waiting on the support rep to get back to me. I'm just trying to get information as quickly as possible, and from as many sources as possible. I don't completely trust the Baan support reps to have accurate information, I've been burned, especially on archiving issues. By the way, you needn't reply to my posting on the reorg issue. Thanks.
dave_23
27th February 2003, 16:47
Ok I was able to look it up
Create a file like this:
#1 tcmcs003 TCRI 9999 0 -p
This will use your ora_storage to create
all of the indexes, you could do a specific index
by changing 9999 to 1 or 2, etc.
then run
gcommand6.X <file> <company>
Dave
victor_cleto
19th March 2003, 17:17
So, generally speaking, to re-create all indexes associated with a table we must create a file with what parameters on that file?
dave_23
20th March 2003, 02:15
I'm not sure what you mean by parameters?
for just one table you could just do
edit <filename>
#1 <table_name> TCRI 9999 -p
(I think the 0 was a type in my previous post)
then call the file
gcommand <filename> <company>
#1 - opens a connection to the database
<table_name> - tells gcommand what table to work with
TCRI - means create an index
9999 - means all indexes (you could do 1 or 2 to do a specific index)
I'm not sure what -p means but I know you need it...
Is that what you were asking? or did i miss something?
Dave