installing PostgreSQL on Cygwin as a service - database

I'm a novice trying to install Postgresql on Cygwin as a service. I have been following the steps listed in this URL: http://www.smartpixie.com/wiki/Tech/CygwinPostgreSQL.twiki.html
Everything was working fine until I got to the step where I had to create a user and a database for myself, in my /usr/sbin directory the "createuser" file exists but the "createdb" file does not. So, as suggested by the steps, I attempted to connect to the database as the SYSTEM user and then create the database/user roles later. However, I come across this error whenever I try to connect to the database.
$ psql -U SYSTEM postgres
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
Any help is appreciated, thanks.

First, I would recommend against running PostgreSQL over Cygwin. There isn't a real use case I can see since there is now a native port and Cygwin ends up adding quite a bit of overhead to things like IPC calls. You won't get good performance out of it, and I can't actually think of any case where cygwin would be a better fit than mingw for c-language stored procedures. So please question whether this is really a requirement and explore other options first.
Now if you still need to do so, the process isn't easy, but is documented at http://www.postgresql.org/message-id/3DC76EA4.7090503#usa.net
Basically you have to install the ipc service first, then use cygrunsrv to create a Windows service for PostgreSQL dependent on it. Then you can run net start ipc-daemon and then net start postgresql

Related

All the services of Oracle 18c aren't installing. couldn't connect to Sql plus

I tried almost all the articles there is on this error. But in my case the services aren't installed. So i can't change them. I had 10g installed before but i needed to use Oracle for python too so I removed that. And also i did reset my pc(keep my files) after that. But now i have tried multiple times to install Oracle 18c but not working.
I.e modifying listener and sqlplus sys/mypassword as sysdba or many more.
These are the screenshots.
This is very frustrating. Any suggestions? Also What is the alternative for homepage of 10g in 18c.
I also tried running setup.exe from zip folder directly. But no luck.
Your screen shots clearly show that the services are indeed installed, your assertion otherwise notwithstanding. You even have sqlplus waiting to do your bidding. But you invoke it incorrectly.
The protocol error (ora-12560) occurs when 1) you do not specify a connect string when you invoke sqlplus thus causing it to try to connect to a local database specified by the environment variable ORACLE_SID, and 2) the environment ORACLE_SID does not specify an actual local database.
Unfortunately, your screen shot does not show how you invoked sqlplus, thus losing important diagnostic info. Far better to start cmd.exe, invoke sqlplus, then copy the entire text and paste that into your question, with formatting. I leave it as an exercise for the student to research how to do those elementary tasks.

xampp apache wont start after oracle db 10g is installed. how to fix?

I've been doing php before but as usual,I used mysql as a database. So everything seems easy when using xampp.
Now, for some reason I am required to use Oracle as the database but after installing Oracle database 10g on my pc, I can't seem to start apache from the control panel at all! When I press start,instead of it being started it goes back to the stopped state. I tried making it a service and starting it from, it pops out an error.
What is making this conflict, I can use IIS to do this but I prefer xampp so I'm eager to make this thing work.
Does anyone know whats the conflict? Is it the port?
I know how to configure the oracle extension and all with php to get it to work, but I am just confused why apache can't be started when oracle db 10g is installed.
Hope someone can help me out.
I just had this problem with startup.pl not starting (according to the log files), so I went into xampp\apache\conf\httpd.conf and editted out this include line by putting a hash (or pound as it is called in the states) (#) in front of it:
Perl settings
Include "conf/extra/httpd-perl.conf"
it seems to work now and I have now got oracle and apache working on my machine.
Im not sure if there will be any problems later on because of removing the line, but I don't think I need to use anything perl related so hopefully it will be fine
Sounds like platform is Windows. Oracle has the habit to alter the PATH setting, system wide. There is also an Apache installation in the Oracle installation. Maybe you can tweak the Apache service to use the Oracle Apache installation. Otherwise, make sure that your Apache start service does not have ORACLE_HOME or sub-directories of ORACLE_HOME/bin in the PATH. The services that Oracle installs normally are not on the standard ports so it's not very likely that it is a port conflict.

Running batch file remotely using Hudson

What is the simplest way to schedule a batch file to run on a remote machine using Hudson (latest and greatest version)? I was exploring the master slave setup. I created a dumb slave but I am not sure what the parameters should be so that I can trigger the batch file in the remote slave machine.
Basically, I am trying to run 2 different batch files on two different remote machines sequentially, triggered from my machine (the master). The Step by step guide on the Hudson website is a dead link. There are similar questions posted on SO but it does not quite work for me when I use the parameters they mention.
If anyone has done something similar please suggest ways to make this work.
(I know how to set up jobs, and add a step to run a batch file etc what I am having trouble configuring is doing this on a remote machine using hudson in built features)
UPDATE
Thank you all for the suggestions. Quick update on this:
What I wanted to get done is partially working, below are the steps followed to get to it -
Created new Node from Manage Nodes -> New Node -> set # of Executors as 1, Remote FS root set as '/var/hudson', set Launch method as using JNLP, set slavename and saved.
Once slave was set up (from master machine), I logged into the Slave physical machine, I downloaded the _slave.jar from http://masterserver:port/jnlpJars/slave.jar, and ran the following from command line at the download location -> java -jar _slave.jar -jnlpUrl http://masterserver:port/computer/slavename/slave-agent.jnlp. The connection was made successfully.
Checked 'Restrict where this project can be run' in the Master job configuration, and set paramater as slavename.
Checked "Add Build Step" for adding my batch job script
What I am still missing now is a way to connect to 2 slaves from one job in sequence, is that possible?
It is fairly easy and straight forward. Lets assume you already have a slave running. Then you configure the job as if you are locally on the target box. The setting for Restrict where this project can be run needs to be the node that you want to on. This is all for the job configuration.
For the slave configuration read the following pages.
Installing Hudson as a Windows service
Distributed builds
On windows I prefer to run the slave as a service and let the remote machine manage the start up and shut down of the slave. The only disadvantage with this is, you need to upgrade the client every time you update the server Just get the new client.jar from the server, after the upgrade and put it on the slave. Then restart the slave and you are done.
I had troubles using the install as a service option for the slave even though I did it as a local administrator. I used then srvany to wrap the jar into a service. Here is a blog about it. The command that you need to wrap, you will get from your Hudson server from the slave page. For all of this to work, you should set up the slave management as jnlp.
If you have an ssh server on your target machine, you can use the ssl slave settings. These work for me like a charm. I use them with my unix slaves. So far the ssl option with unix is less of an hassle, than the windows service clients.
I had some similar trouble with slave setup and wrote up this blog post - I was running on Linux rather than Windows, but hopefully this will help.
I dont know about how to use built-in hudson features for this job - but in one of my project builds, i run a batch file that in turn uses PSTools
to run the job on a remote server. I found PS tools extremely easy to use - download, unpack and run the command with the right parameters, hence opted to use this.

crontab oracle problem in linux

I created an app which is need to run in linux started by crontab. An error happened when it tried to connect oracle database: it returned SQLO_INVALID_DB_HANDLE. But if started it manually everything is okay.
I bet there are no path-related mistakes here, because everything goes well except the connection to the Oracle database. Oracle8 functions are used in my code.
thanks
Oracle uses a couple of environment variables, like ORACLE_HOME, TNS_HOME, ORACLE_SID. They might be missing from your crontab environment.

jBASE 4.1 Database Noobster Questions

I am a software developer with devlopment experience in C#, C++ .Net alongwith SQL Server 2005/08, Oracle and mysql. But somehow i dont get jBASE to work at Windows XP SP3 machine.
My goal is setup user accounts, create database on a JBASE ainstallation, authenticate and backup/restore few table via a C++ program. And i dont need to do it with builtin backup/restore tools of jBASE.
I am able to install jBASe 4.1 aling with all its accessories on my WINXPSP3 machine. I was able to run the jSlimserver and TEMENOUS server along with licnesing server. I was able to add the license key as well. But after that what i was supposed to do? i have no idea about it.
The docs and online help doesnt answer a simple question of how to create a database! The google search results from the jbase site all go to the 404 Pages!
Can a jBASE expert guide to the following steps:
Create a jBASE database.
Create users
Authenticate via those users
Connect to database
Create tables and insert data.
Connect via a C++ or C# program to connect to jBASE DB and backup/restore tables.
I know that this is too much too ask but i dont get to get the JBASE system. I cant get it to work on my System somehow. Btw, jdc and jexloree doesnt seem to do anything. I have checked that enironmental variables for jBASE are setup correctly and i have verified them. There are no extra JRE or JDK installations on my system. Besides all that, only licensing client, slim server and temenous server seem to run and listen for connections and no other execuatable ever seems to work.
A simple tutorial to achieve the objective will be highly appreciated. Also if anyone can point out the mistake that i have done or anything i might need to check, then please do so. I will be highly encouraged and obliged.
Thanks
Steve
I hope this will help, if you have not already found a why to do this.
Setup jBase User and Database
Create a Security Group called
'Jbase' or what every you want to
call it
Add a User to this group. I would
recommend adding your administrator
user to it as well
Create a folder in you file system
to save the database information
into
Assign the 'Jbase' Security group to
the folder, and give it "Full"
read/write/execute access.
Creating the database:
Make sure the current users you
are logged on with is the 'Jbase'
security group.
go to the command prompt, and CD
to the folder you create to store
the database
run the jShell 'jsh' from that
location
use CREATE-FILE to create the
files/tables you want to store your
information in.
Inserting data:
There are several ways to enter data. You can use ED, your can your programming environment, or you can create a quick MultiValue/jBase compiled server script to ask for the data and write them to a file/table.

Resources