rsundaresan
23rd July 2007, 14:37
Dear all,
Can anybody enligten me on how I can shift my database from one partion to another partion in the system and make baan server to access the database from new partion. As the present partion space is becoming inadequate for the database I am adding a New Disk to the system and trying to shift the database new disk.
Thanks
Sundaresan
sukesh75
23rd July 2007, 15:34
Hi Sundaresan,
Two ways i can think of..
First one:
1) Open SQL Enterprise Manager
2) Click on the properties of the baan database
3) Go to the Data Files Tab and create a new database file(eg baan2)with the new parition entered in the location
4) Do the same for Transaction Log too...
Second One:
1) Stop all Baan services.
2) Open SQL Enterprise Manager
3) Right click on the baan database and go to All Tasks=>Detach Database
4) Copy the .mdf and .ldf file to the new partition
5) Right click on the baan database and go to All Tasks =>Attach Database
6) Provide the new location where you copied the database to in the Attach Database window..
7) Start all Baan Services..
Hope this helps
sk
rsundaresan
16th August 2007, 14:06
Dear Sukesh,
I would like to reatin the same data base in the new hard disk. I just want to copy the .mdf file from exiting partion to new partion.
sukesh75
16th August 2007, 16:56
Sundaresan,
In situation like yours when the partition where baan db exists runs out of space, one of the two above mentioned ways are adopted. Now i understand that you want to put your baan database file on a new partition. If that isnt true, correct me. Simply copying your .mdf file wont help you, if thats what you meant in your last post.
You will be retaining the same database with the options i gave you. In my first suggestion i had written about creating a new Database File(.mdf) not database. By detaching(Second option) you are not deleting your database but severing the connection temporarily between your logical and physical db.
If you dont want to create an extension to your mdf file on to the new partition then you can try the second option..
Let me know if you have any doubts on what i said...
sk
rsundaresan
20th August 2007, 09:49
Thanks for your inputs.
Current Scenario of my hard disk:
Database in "F" Partition with mirrored mode. (We have two physical hard disks with partition "C", "E", "F" & "G". These partions are mirrored in the second one.)
Now I would like to add two hard disks and put them in mirrored mode. This volumes would be named for e.g. "J"
If I understood correctly I should do the following. Please correct me if I am wrong.
1. Stop all the Baan Service
2. In SQL Enterprise Manager
Right click on the baandb -> All Tasks -> Detach Database.
3. Copy the .mdf and .ldf file to "J" drive
4. Then use the SQL Enterise Manager to attach the database.
5. Then under SQL Enterprise using "properties" option of the database chnage the file locations under Data files and Transaction Files change it from "F\..." to "J\...". ( As per path in which the .mdf & ldf files rae placed in "J" drive.)
6. Start all the Baan services.
I am wodering whether any changes to be made in Baan through some baan sessions to inform Baan application to look for the database at the new locations.
Kindly confirm whether the procedure I have put down is correct.
Thanks & regards
Sundaresan
sukesh75
20th August 2007, 15:49
Hi Sundaresan,
You got the steps almost correct. Following are the steps you should take..
1) Stop all Baan services.(Shared Memory, Logic Service, License Service).
2) Open SQL Enterprise Manager.
3) Right click on the baan database and go to All Tasks=>Detach Database. Make sure no users are connected to it.
4) Copy/Move the .mdf and .ldf file to the new partition(J in your case).
5) After copying or moving go to SQL Enterprise Manager, right click on Databases category and go to All Tasks =>Attach Database.
6) Provide the new location of the baandb file(in J) where you copied the database to, in this Attach Database window..Specify the same owner(baandb in most cases) as the owner of baandb.
Note: In this window, it shows you what the current location of your .mdf and .ldf file and so there is no need to change anything in the properties of the database after you attached the db.
7) Start all Baan Services..
Nothing else to be changed in baan..Before you do this with baandb, i suggest you do it with a not-so-important db(Northwind perhaps) so that you get the hang of it...
sk
rsundaresan
24th August 2007, 12:53
Thanks you very much for your valuble inputs. Yes I would try it with Northwing DB.
Regds
Sundaresan