Showing posts with label informix. Show all posts
Showing posts with label informix. Show all posts

Friday, November 6, 2009

move a file from UNIX to windows via ftp

REQUIREMENT:

we had a requirement to get a file via ftp and then remove it off the source. The file was created with the "operations" user account. and for the backup we created a script file in which we had to use the user "backup".

SOLUTION:

The file was created using a script program on UNIX, after we created the file, we changed the rights for the file, using the following command

chown backup:operations backup_filename.extension

this means that I have changed the ownership of the "backup_filename" from user "operations" to user "backup”, why did i do it... let's see, the backup is created from user "operations", the script file which creates the backup file is owned by user " operations ". so since user " operations" is the owner, it can change the ownership, the command written above changes the ownership from user " operations" to user "backup".

Now all i have to do is to ftp from my windows machine, sign in with user "backup" get the file using get utility of FTP and then delete the file using the mdelete or mdel. I did this with a task where i do ...

ftp -s:commandfile.txt 999.999.999.999

where commandfile.txt lists all the steps of the ftp process, and 999.999.999.999 is the IP address of the UNIX machine.

this way
I don't have to hard code the root password;
I don't get any prompt for entering the root password;
this job can be scheduled to run any time.

if you need more help, send me an email, or reply to this post ... I will reply ASAP.

Thursday, October 29, 2009

Allocating and attaching to shared memory...FAILED

Allocating and attaching to shared memory...FAILED

Dear All,
if you are at this blog, it means taht you have already been to many places and it still is not working for you. first note that if the sysmaster database is correctly installed. if you are getting this error it means that it is not installed properly.

First let me tell you how i got here ...

installed unix, installed the N/w card driver, SCSI card driver (for tape drive), the tape drive was mounted.
we installed the secondary master HDD to install all of our applications, the primary drive was for UNIX only.
we installed i4gl from install4gl program.
we installed DB from ./instlows

this is where we were stuck.... unable to install sysmaster database, try again? i said YES, configuring complete, launch the

database server PROBLEM, i tried reinstalling but to no avail. so i proceeded.
tried oninit -v.
Allocating and attaching to shared memory...FAILED

so i uninstalled the Informix DB through the /bin/uninstlows. It also uninstalled/deleted some of my informix files,

so i installed the i4gl through ./install4gl
after that instead of installing DB from the mounted Cd drive, i copied the contents of the Cd on my root drive "/" (primary master where UNIX is installed). there i had to give execute rights to root for the 2 files
chmod u+x instlows
chmod u+x setup.sh

then i ran the ./instlows. This time again the sysmaster database didn't install correctly, so i exited the setup without moving

on to next step of configuring and launching my server.
after exiting, i had to fix the entries in my /ifmx.sh i changed that to the SERVER name i gave when i was installing

the DB.

HERE I listened to Joe The guru (http://www.iiug.org/forums/ids/index.cgi/noframes/read/1312)... he writes ...

The most frequent cause of this error is when the shared memory segments you are trying to create when starting the engine already exist. Look in the online log for an error 17 - that means the segments already exists.
That means either the engine is already running (run 'ps -ef' and look for any oninit processes running), or shared memory segments have been left orphaned by the operating system even if the oninits aren't running.
Run an 'ipcs -m' and look for a segment with a key starting with 5258. Specifically, 52584801.
If that exists, you'll have to remove it (them) before you start your engine (see your System Admin for that).

i checked the processes with ipcs -ma and then I removed all the processes which started with 52 and had user informix in them.

now i did oninit -v .... and VOILA !!! it worked, i went to dbaccess and PROBLEMS, i restarted the PC and then dbaccess, the

database was working...