learner
19th February 2004, 19:28
Hi,

We are running BaaN IV c4 on Win Nt having Oracle 9i as db.

I am trying to take BaaN Table backup through a batch file which is utilising bdbpre exe, but unfortunately i am getting error
TNS-12560: TNS:protocol adapter error

Ofcourse I am able to take backup through BaaN session, so my Oracle listener service is running, the only thing which i could guess regarding error is probably i will have to write something in my batch which talks of some Oracle related environment variables, such as SID, or oracle hom etc etc.

One more thing we did BaaN migration from Oracle 8i to 9i.

Can somebody guide me ?? Am i moving in the right direction.

I am herewith attaching the batch file, along with the log file , and sqlnet file which got generated when i executed my batch file.

Regards

Learner

dave_23
19th February 2004, 23:40
Hi Learner,

Is Baan on the same server as Oracle? If so, why are you using a listener? that's just wasted time.. (If not then disregard, but I'd have to ask why you are concerned with ORACLE_SID? )

see if you can connect to oracle through the command line sqlplus, you would do something like

sqlplus system/manager

if you can connect that way let me know.. I would suspect that you cannot. you can probably only connect like:
sqlplus system@<service name>/manager

Which means that you have a configuration problem at the oracle level.

Dave

learner
20th February 2004, 19:15
Hi,

Well yes both BaaN Application and Oracld db are on same server.

I tried connecting through command prompt by :

sqlplus system/manager

and i was able to login sucessfully.

The reason why i thought about listener or Oracle sid is that the sqlnet file which got generated after running the batch file contained error 12560 and even the 700_err.700 file also contained the same error.


do u mean to say there is no need to specify any sort of environment variables in my batch file which is using bdbpre ??

Any suggestions what should i do next to resolve this problem ??


Waiting for your reply.

Regards

Learner

dave_23
20th February 2004, 20:01
Hi Learner,

Ok, so its a Baan problem and not an oracle problem. That's good!


Do you have the same oracle_home and oracle_sid for all of your companies? If so, try adding
oracle_home:\path
oracle_sid:sid
to your db_resource and trying again..

Dave

learner
22nd February 2004, 19:21
Hi,

As u suggested i tried putting up the following in my db_resource file

oracle_home:C:\oracle91
oracle_sid:baan

but nothing happened, and i received the same error.

Then i inserted these 2 variables in my Win NT system variables, by right clicking on
my computer ---- > properties ----> environment var.

After that it worked.

I din't shutdown/restart my database after inserting it in db_resource file.

do u think that because of this the settings were not affected ??? just wanted to know out of curiousity.

anyway thanks for all the help u provided, now i am able to successfullt take the backup through batch file.


Regards

Learner

dave_23
23rd February 2004, 01:18
Hi Learner,

That's good news!

the db_resource thing should have worked.. not sure why it didn't. No reboot or anything needed..
I guess its something I'll have to play with a little.

Dave

learner
23rd February 2004, 19:17
Hi,

I tried following combinations/permutation in my db_resource file

FIRST TIME

SET oracle_home =c:\oracle91
SET oracle_sid=baan

SECOND TIME

SET oracle_home:c:\Oracle91
SET oracle_sid:baan

None of them worked .... which one do u think should have worked ??


Waiting for your reply.


Regards

Learner

dave_23
24th February 2004, 02:08
did you actually put "SET" in the db_resource? -- Because you shouldn't..

All db_resource variables are ":" so there should never be an "=" in there..

Dave

learner
24th February 2004, 19:36
Hi,

Well i will have to just try again, i think i also tried without putting SET.

I will again try putting up below mentioned values in db_resource file


oracle_home:c:\Oracle91
oracle_sid:baan



let's see.

Regards

Learner

dave_23
24th February 2004, 22:05
You might want to have your .bat file call fillenv.bat first as well, and then also have it "set USER=baan"

Dave