Having problem in connecting my gui java program to postgreaql database. I first used setenv classpath /home/share/postgresql/java/postgresql.jar:proj1, where proj1 is my folder conatining all java and class file, to set classpath. Then javac *.java. Then java proj1.Login. It gives me... (2 Replies)
Hi
when i am calling the shell script with two parameter like id and date it works fine.But the same shell script is call by java application it gives the error as shown below
Thu Jan 8 04:13:22 EST 2009|The Get Segment Process Failed: SP2-0306:
Invalid option.
Usage: CONN where <logon>... (1 Reply)
Hi friends,
I'm newbie to shell script. I wanted to create a shell script which able to write a result for all the telnet connection status. For example, from this machine I want to test the telnet connection (total 100+ servers) with this machine.
Any idea how to write this shell script?... (16 Replies)
Hi All,
I'm new here as well as to UNIX.
I need to write a wrapper script to refresh test database with production data. A set of tables are given as well as a particular data range. The script should prompt the user for both production and test logon credentials.
Pl. help me with this.... (2 Replies)
I am writing a script to do some conditional logic based on the results of a connection test. I need to capture the output of netcat, the 3 expected conditions are as follows. I need to capture the output of this command. I could write this to a file, but I would like to do it clearer if possible.... (1 Reply)
I want to test if my host can connect to any of the following 10 hosts (192.168.1.0 to 192.168.1.9)
I didnt know which command i should use, so i chose ping. (i wonder if i should use tracepath or sth else)
my code is the following:
#!/bin/bash
clear
firstPart="192.168.1"
maxNum="9"
... (2 Replies)
Hi,
How to creating connection to mysql.I try to connect but the following error coming .How to solve it.
Could not connect to New MySQL.
Error creating SQL Model Connection connection to New MySQL. (Error: com.mysql.jdbc.Driver)
com.mysql.jdbc.Driver
Error creating JDBC Connection... (2 Replies)
I have a question regarding how to connect to Oracle Database through shell script.
1. If I want call a stored procedure on Linux server as this, it works.
$sqlplus /nolog
SQL*Plus: Release 12.1.0.2.0 Production on Fri Jun 12 14:49:49 2015
Copyright (c) 1982, 2014, Oracle. All rights... (2 Replies)
Discussion started by: duke0001
2 Replies
LEARN ABOUT PHP
sqlsrv_connect
SQLSRV_CONNECT(3)SQLSRV_CONNECT(3)sqlsrv_connect - Opens a connection to a Microsoft SQL Server databaseSYNOPSIS
resource sqlsrv_connect (string $serverName, [array $connectionInfo])
DESCRIPTION
Opens a connection to a Microsoft SQL Server database. By default, the connection is attempted using Windows Authentication. To connect
using SQL Server Authentication, include "UID" and "PWD" in the connection options array.
PARAMETERS
o $serverName
- The name of the server to which a connection is established. To connect to a specific instance, follow the server name with a
forward slash and the instance name (e.g. serverNamesqlexpress).
o $connectionInfo
- An associative array that specifies options for connecting to the server. If values for the UID and PWD keys are not specified,
the connection will be attempted using Windows Authentication. For a complete list of supported keys, see SQLSRV Connection
Options.
RETURN VALUES
A connection resource. If a connection cannot be successfully opened, FALSE is returned.
EXAMPLES
Example #1
Connect using Windows Authentication.
<?php
$serverName = "serverNamesqlexpress"; //serverNameinstanceName
// Since UID and PWD are not specified in the $connectionInfo array,
// The connection will be attempted using Windows Authentication.
$connectionInfo = array( "Database"=>"dbName");
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn ) {
echo "Connection established.<br />";
}else{
echo "Connection could not be established.<br />";
die( print_r( sqlsrv_errors(), true));
}
?>
Example #2
Connect by specifying a user name and password.
<?php
$serverName = "serverNamesqlexpress"; //serverNameinstanceName
$connectionInfo = array( "Database"=>"dbName", "UID"=>"userName", "PWD"=>"password");
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn ) {
echo "Connection established.<br />";
}else{
echo "Connection could not be established.<br />";
die( print_r( sqlsrv_errors(), true));
}
?>
Example #3
Connect on a specifed port.
<?php
$serverName = "serverNamesqlexpress, 1542"; //serverNameinstanceName, portNumber (default is 1433)
$connectionInfo = array( "Database"=>"dbName", "UID"=>"userName", "PWD"=>"password");
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn ) {
echo "Connection established.<br />";
}else{
echo "Connection could not be established.<br />";
die( print_r( sqlsrv_errors(), true));
}
?>
NOTES
By default, the sqlsrv_connect(3) uses connection pooling to improve connection performance. To turn off connection pooling (i.e. force a
new connection on each call), set the "ConnectionPooling" option in the $connectionOptions array to 0 (or FALSE). For more information, see
SQLSRV Connection Pooling.
The SQLSRV extension does not have a dedicated function for changing which database is connected to. The target database is specified in
the $connectionOptions array that is passed to sqlsrv_connect. To change the database on an open connection, execute the following query
"USE dbName" (e.g. sqlsrv_query($conn, "USE dbName")).
SEE ALSO sqlsrv_close(3), sqlsrv_errors(3), sqlsrv_query(3).
PHP Documentation Group SQLSRV_CONNECT(3)