Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 251
  • Last Modified:

Execute .NCF from a Windows Batchfile

I want to execute a NCF on the Novell Server from a Windows batch.
I've mapped drive N: to the server and I want to do something like that:

@echo off
execute SERVER:\stop_this_service.ncf
copy N:\somedir\somefiles.* N:\otherdir\
execute SERVER:\start_this_service.ncf

I don't know how to do it!

0
benni
Asked:
benni
  • 8
  • 7
  • 3
  • +4
1 Solution
 
cookreCommented:
NCFs can only be run from the console command line.  Running an NCF from a client requires a program that calls the Netware API to run an NCF on the server.  Even if you had such a utility (it would be very easy to write one), you would likely be disatisfied with the inability to synchronize your client side program with the NCF, i.e., all you can do is request execution of the NCF - control returns right away and you have no generic way to determine when the NCF has completed - or even if it started properly.
0
 
defferrariCommented:
Benni,

This NCF is to stop and start Oracle instance ?

Both directory are on server ?
0
 
sverreCommented:
Rconsole, than you have control to!
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
andrewbrazierCommented:
No can do, a maped drive gives a "DOS" command prompt and NCF files can only be run from a "Netware" command prompt and this means at the server console and nowhere else.
One possibility is to use something like Arcserve. You can execute Netware console commands (including NCF files) pre and post job and it will also do immediate or scheduled disk to disk copies as well. If you use something else for backup check it's features, it will probably do something similar.
0
 
benniAuthor Commented:
andrewbrazier: I believe this andwers isn't correct. It should be possible to execute NCFs from a client, even if they are not synchronized to the batch.

defferrari: not oracle, one directory is a local drive

sverre: have rconsole command line possibilities?


Is there a utilities like cookre described it?

0
 
pwoolfordCommented:
What NW version ?
This may be possible with NW5
0
 
andrewbrazierCommented:
Nope, you just can't do it. An NCF file contains Netware commands, a DOS prompt only uderstands DOS commands, try typing LOAD MONITOR at a DOS prompt and see what you get. Alternatively try typing COPY and a Netware console prompt and see what happens.
As I mentioned earlier you can do this with Arcserve or some other third party backup utility but not with DOS batch files.
As for the utility that cookre describes this would be a pretty major security hole and I wouldn't want it anywhere near my LAN even if it existed and I'm pretty certain it doesn't.
You would not expect Unix commands to work in DOS and it's the same thing with Netware, from the client side it LOOKS like DOS (F:. G:, etc), but it isn't. You only see it's command line interface at the server and this is the only place you can type in Netware commands (including NCF files).
0
 
defferrariCommented:
If you use cron on netware and AT command of a scheduler on Windows machine, you can sync this two jobs to work fine.

# Netware CRON at 02:00
>stop service

# Windows AT command at 02:30
>copy from server to workstation

# Netware CRON at 05:00
>start service
0
 
benniAuthor Commented:
andrewbrazier: I think you misunderstand me. In fact I can run Unix commands from a Windows Batch via a telnet script. I think there should be a tool which allows to do the same with netware.
btw - rconsole gives me the complete console on a client and IMHO this is not really a security hole.

defferrari: good idea, but this is not a answer to my question
0
 
benniAuthor Commented:
pwoolford: we are using NetWare 4.2
0
 
defferrariCommented:
pwoolford: how use access a device in a workstation from a Netware Server ?

Arcserve use Client Agent to do this.
0
 
cookreCommented:
If you like, I'll write the utility for you tonight.  Bear in mind, however, it must be run from an authenticated connection under a userid with console authority (that's a requirement of the API call that submits an NCF from a client).
0
 
benniAuthor Commented:
cookre - you would do that for 100 points? Is it possible to set the parameters for the connection in a Inifile or via command line parameters?
0
 
cookreCommented:
Proposed usage:

runncf  <servername>  <filenamewithvolume>

0
 
cookreCommented:
Besides, it seems like a useful thing - I'm kinda surprised one doesn't already exist (maybe I'll find out tonight why).
0
 
benniAuthor Commented:
cookre - good, where do I set login and pw?
0
 
cookreCommented:
The program assumes there is already a connection with console rights to the specified server.

Requiring a userid and password on either the command line or in an ini file would mean those items would be in plain text for prying eyes to see and snooping fingers to find.

Now, one could embed a fixed userid and password in the program, but, to make the program useful, that userid would have to be:

1) the same bindery id & password on ALL servers

2) an id with god rights to the root of the tree (or, at least, to those containers your target servers are in)

0
 
ZombiteCommented:
http://www.novellshareware.com/nlms.shtml#442

Nettools and some others there will do this function
0
 
cookreCommented:
As promised, here it is:
www.mindspring.com/~cookre/runncf

Yea, it was a one hour special, but, hey - it worked for me.

Your mileage may vary.
0
 
benniAuthor Commented:
Adjusted points from 100 to 300
0
 
benniAuthor Commented:
thanks cookre

it seems to work :-)

is there a way to send the output from the ncf to the console screen
at the moment I can't see what happens at the console

I increased the points a little bit, please tell me if it's not enough
0
 
sverreCommented:
Use conlog on the console and just check the logfile!
0
 
benniAuthor Commented:
sverre: there are no entrys from the NCFs started via runncf
0
 
cookreCommented:
That's one of the side effects of using the API call to run an NCF.  In order to have a command show up on the concole and in the console log, one has to stuff the concole buffer directly, by-passing the API call.

There is an NCP to do this, and some commercial packages use it.  Unfortunately, Novell has not publicly released the details of that NCP and I have been completely unsuccessful in prying that info from them - despite the thousands of server liscences we have with them.

I saw once that someone wrote a book that supposedly had details on all of the undocumented NCPs (I can't recall her name right now), but, the book had already been out of print (that was four years ago) and no one could find a copy anywhere.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 8
  • 7
  • 3
  • +4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now