Using Samba for batch runs in windows

I have not worked on Samba so far. I need some help in setting up this job. I need to run a batch job in windows 2000 server having IIS 5 and Jrun 3.11. The job is to import text files into the database.  The code is in Java.

Do I need to Install Samba on windows? What setup I need to do? Can anyone help me in setting up of this job?

java -Xms64m -Xmx128m -classpath c:\jltclasses\;c:\jrun\lib\ext\jcifs-0.6.5.jar;c:\JRUN\servers\default\ibs\WEB-INF\classes\;C:\javaibs\;c:\jrun\lib\ext\jakarta-oro-2.0.6.jar;c:\jrun\lib\ext\msbase.jar;c:\jrun\lib\ext\mssqlserver.jar;c:\jrun\lib\ext\msutil.jar;c:\JRUN\lib\ext\servlet.jar;c:\JRUN\lib\ext\regexp.jar;c:\JRUN\lib\ext\xalan.jar;c:\JRUN\lib\ext\xercesImpl.jar;c:\JRUN\lib\ext\xml-apis.jar;c:\JRUN\lib\ext\jdbc.jar com.YYY.xxxxx.dataimports.programname smb://yourWindowsUser:itsPassword@yourInboxHost/ftpinbox/aetna/ "JET*" yourdatabaseHost yourdatabaseUser yourDatabasePassword > importReports/report%YMD%.txt

This is a very urgent request. Can someone give me the Information at the earliest?
sriniramAsked:
Who is Participating?
 
aravinthrkConnect With a Mentor Commented:
A couple of other ways to do this. See below for a brief Description of what Samba is and where your question is contradicting...

1) Do Map Network Drive in your Win2K server and use the format <drive>:\path\to\file .
2) Assuming the .txt file is present in a ftp server directory, you can use ftp://<ftp-server>/path/to/file.

expanding on Nopius' Post:
-------------------------------------

You don't have to install any Samba variant for Windows (not that i'm aware of :-) ). Basically Samba is a way to see your Linux boxes in the network from your windows machine. For example, if you want to access the share Songs in MyPC computer which is a windows machine, you do the following from the Start-> Run.. of your Windows PC.

\\MyPc\Songs.

Now what if the Songs directory is present in the Linux machine instead of the Windows machine MyPC? Still you do the same. Lets say the Linux Box's name MyLinux. The following will give access to Songs folder.

\\MyLinux\Songs.

So what actually is the difference? Normally, Windows Machines use the native windows networking protocol (WINS for instance). Linux however, by default is incapable of speaking this language. In order for Linux speak this language and hence make the Songs folder available for you in your windows machine when you do \\MyLinux\Songs, it uses this protocol/software called Samba (smb actually).

While the Samba Server allows you to share Linux directories to be seen in Windows, The courterpart, Samba Client allows you to access Windows Share in Linux machines. The simplest way to do this is to point your Konqueror Browser to the windows  share using the url format "smb://yourWindowsUser:itsPassword@yourInboxHost/ftpinbox/aetna/".

So basically means you are trying to access a windows share from a windows PC but using a method that is Linux oriented. This is not required. Instead you can, as Nopius pointed out, use the directly the windows share format of \\somepc\somedirectory or c:\ftpinbox\aetna .

A couple of other ways to do this:

1) Do Map Network Drive in your Win2K server and use the format <drive>:\path\to\file .
2) Assuming the .txt file is present in a ftp server directory, you can use ftp://<ftp-server>/path/to/file.

Hope this helps.
0
 
NopiusCommented:
"I need to run a batch job in windows 2000 server having IIS 5 and Jrun 3.11." - I see no mention of Samba in your question. You may not use it at all...

This line: smb://yourWindowsUser:itsPassword@yourInboxHost/ftpinbox/aetna/
is just a path to some  remote windows share. If this directory is local for that server, where job runs, you may place your local path instead. Try something like 'C:\ftpinbox\aetna\'
0
 
Gabriel OrozcoSolution ArchitectCommented:
I also think the question is not very clear

but if the meaning is these files will reside on a linux server and you want to access them using samba, then what you need is enable samba on the server, and create a simple share (with password)

use this page to do that (Assuming samba is already on the linux server since almost every linux distribution has it nowadays):

http://www.oreilly.com/catalog/samba/chapter/book/index.html
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.

All Courses

From novice to tech pro — start learning today.