10 More Discussions You Might Find Interesting
1. AIX
I have a requirement and below is the detail.
Create a shell script and needs to run in server "a".
Connect to teradata database server "b".
execute the .sql file from server "a"
Save the output of the query to a file in server "a"
Schedule this shell script to run every day for every 4... (1 Reply)
Discussion started by: MadhuSeven
1 Replies
2. AIX
Hello aix community,
After scouring the internet to find a step by step process, I've exhausted my efforts. Although I have learned a lot which brings me to this forum. I'm totally new and hope to ask the right questions.
What is the easiest way to connect to a SQL server from aix?
... (2 Replies)
Discussion started by: TechStudent36
2 Replies
3. SuSE
I am trying to establish connection with SQL server 2008 through ODBC on Linux. First step would be
1. How to verify if ODBC driver for SQL server is installed on Linux OS.
PLease let me know how to do it/ if there is any link which could be helpful in this context.
thanks in advance (1 Reply)
Discussion started by: cvsanthosh
1 Replies
4. Shell Programming and Scripting
I need to connect sql server 2008 from korn shell script. Can you please give me the script which connects sql server 2008 from korn shell script. (2 Replies)
Discussion started by: santoshhegde
2 Replies
5. Shell Programming and Scripting
I am trying to connect to SQL plus through unix but i am getting below error
'ksh: sqlplus: not found'
note i am running this from /home/xxx
do i need to set any environmental variable for this. below is my code
echo " hello world"
sqlplus -s apps/CAF78GEN<<EOF
set heading... (4 Replies)
Discussion started by: karnatis
4 Replies
6. Emergency UNIX and Linux Support
Hi All
Can any one please help me about
How to connect Unix with Sql Server 2005
I want to do it urgently and i didn't find the way. (14 Replies)
Discussion started by: parthmittal2007
14 Replies
7. Shell Programming and Scripting
Hi all,
I need to connect to SQL server from shell script. Then need to execute queries from shell script as below
1. To compare values of an array with SQL table's entry.
I am using solaris-5.1 to run shell script and want to connect to SQL-5.1 which is installed on SantOS.
Kindly let... (3 Replies)
Discussion started by: amitbhelave
3 Replies
8. Solaris
Hi all,
I need to connect to SQL server from shell script. Then need to execute queries from shell script as below
1. To compare values of an array with SQL table's entry.
Kindly let me know on how to do this
Thanks,
Double post. Continue here (0 Replies)
Discussion started by: amitbhelave
0 Replies
9. Shell Programming and Scripting
Hi all,
I need to connect to SQL server from shell script. Then need to execute queries from shell script. Kindly let me know on how to do this
Thanks,
Ananthi.U (1 Reply)
Discussion started by: ananthi_ku
1 Replies
10. Shell Programming and Scripting
Hi I'm looking to query a table on a database and then iterate over the results in a loop. I believe this is the last part of my script that I need (after finding out threads for passing variables to other scripts and calling functions in other scripts). I've searched the forums but the best... (8 Replies)
Discussion started by: Dird
8 Replies
PDO_SQLSRV-DSN(3) 1 PDO_SQLSRV-DSN(3)
PDO_SQLSRV DSN - Connecting to MS SQL Server and SQL Azure databases
The PDO_SQLSRV Data Source Name (DSN) is composed of the following elements:
o DSN prefix
- The DSN prefix is sqlsrv:.
o APP - The application name used in tracing.
o ConnectionPooling - Specifies whether the connection is assigned from a connection pool (1 or TRUE) or not (0 or FALSE).
o Database - The name of the database.
o Encrypt - Specifies whether the communication with SQL Server is encrypted (1 or TRUE) or unencrypted (0 or FALSE).
o Failover_Partner - Specifies the server and instance of the database's mirror (if enabled and configured) to use when the primary
server is unavailable.
o LoginTimeout - Specifies the number of seconds to wait before failing the connection attempt.
o MultipleActiveResultSets - Disables or explicitly enables support for multiple active Result sets (MARS).
o QuotedId - Specifies whether to use SQL-92 rules for quoted identifiers (1 or TRUE) or to use legacy Transact-SQL rules (0 or
false).
o Server - The name of the database server.
o TraceFile - Specifies the path for the file used for trace data.
o TraceOn - Specifies whether ODBC tracing is enabled (1 or TRUE) or disabled (0 or FALSE) for the connection being established.
o TransactionIsolation - Specifies the transaction isolation level. The accepted values for this option are PDO::SQL-
SRV_TXN_READ_UNCOMMITTED, PDO::SQLSRV_TXN_READ_COMMITTED, PDO::SQLSRV_TXN_REPEATABLE_READ, PDO::SQLSRV_TXN_SNAPSHOT, and PDO::SQL-
SRV_TXN_SERIALIZABLE.
o TrustServerCertificate - Specifies whether the client should trust (1 or TRUE) or reject (0 or FALSE) a self-signed server cer-
tificate.
o WSID - Specifies the name of the computer for tracing.
Example #1
PDO_SQLSRV DSN examples
The following example shows how to connecto to a specified MS SQL Server database:
$c = new PDO("sqlsrv:Server=localhost;Database=testdb", "UserName", "Password");
The following example shows how to connect to a MS SQL Server database on a specified port:
$c = new PDO("sqlsrv:Server=localhost,1521;Database=testdb", "UserName", "Password");
The following example shows how to connecto to a SQL Azure database with server ID 12345abcde. Note that when you connect to SQL
Azure with PDO, your username will be UserName@12345abcde (UserName@ServerId).
$c = new PDO("sqlsrv:Server=12345abcde.database.windows.net;Database=testdb", "UserName@12345abcde", "Password");
PHP Documentation Group PDO_SQLSRV-DSN(3)