PHP odbc_connect on a running SQL Anywhere 16 server
Hello,
please help with the following php odbc_connect problem:
On my local machine (win 7, 64 bits) is a running SQL Anywhere 16 database. Started with
dbeng16.exe -c 8m -n xx_test "G:\DEMOS\xx\DB16\test.db"
In the ODBC manager then created a ODBC connection (xxdsn).
But the connection from PHP 5.3.8 fails:
$verbindung = odbc_connect('xxdsn', 'dba', 'sql');
It shows
Warning: odbc_connect() [function.odbc-connect]: SQL error: [Sybase][ODBC Driver][SQL Anywhere]Datenbankserver nicht gefunden, SQL state 08001 in SQLConnect in verbindung.php on line 4
The database is definitively runnig. Tested by opening an odbc connection from isql.
When I create an odbc connection on a database file, I can make an php odbc_connect.
This problem is only on the Win 7 machine and also with SQL Anywhere 12.
When I try the same on a (32 bits) XP machine it runs fine.
Please help, to find my mistake.
Thanks in advance!
Best regards,
Peter
Hi Mirco,
thank you for your time. Here both log files.
From XP:
Donnerstag, 19. Februar 2015 15:03:4
15:03:42 Verbindungsversuch mit:
UID=dba;PWD=********;DBN=xxx_16;ServerName=xxx;CON=SQL_DBC_4224f48;LOG=C:\temp\sybase.log
15:03:42 Verbindungsversuch mit einem laufenden Server...
15:03:42 SharedMemory-Verbindung wird versucht (keine im Cache sasrv.ini gespeicherte Adresse)
15:03:42 Verbunden mit Server über SharedMemory
15:03:42 Verbunden mit SQL Anywhere Server Version 16.0.0.1324
15:03:42 Hinweise zur Anwendung:
15:03:42 IP=192.168.178.24;HOST=COMPAREX;OSUSER=SYSTEM;OS='Windows XP Build 2600 Service Pack 3';EXE=E:\apps\OSGeo\mgos251\Web\Apache2\bin\httpd.exe;PID=0x250;THREAD=0x2d4;VERSION=16.0.0.1324;API=ODBC;TIMEZONEADJUSTMENT=60
15:03:42 Verbunden mit dem Server, Verbindung mit einer laufenden Datenbank wird versucht...
15:03:42 [ 2] Verbindung mit der Datenbank erfolgreich eingerichtet
15:03:43 [ 2] Verbindung zum Server getrennt
From Win 7 (PHP connection):
Donnerstag, 19. Februar 2015 14:48:23
14:48:23 Verbindungsversuch mit:
UID=dba;PWD=********;DBN=xxx_16;ServerName=xxx;CON=SQL_DBC_293610;LOG=c:\temp\sybase.log
14:48:23 Verbindungsversuch mit einem laufenden Server...
14:48:23 SharedMemory-Verbindung wird versucht (keine im Cache sasrv.ini gespeicherte Adresse)
14:48:23 Kein benannter Puffer des gemeinsam genutzten Speichers gefunden
14:48:23 Es wird nicht versucht, einen Server automatisch zu starten
14:48:23 Verbindung mit dem Server nicht möglich
But trying to start ianywhere on Win 7 machine with
dbisql -c "DSN=xxxdsn;LOG=c:\logs\test.txt"
shows this log:
Donnerstag, 19. Februar 2015 15:49:27
15:49:27 Verbindungsversuch mit:
UID=dba;PWD=********;ServerName=xxx;CON=SQL_DBC_5d09b6f0;INT=NO;LOG=c:\temp\sybase.log
15:49:27 Verbindungsversuch mit einem laufenden Server...
15:49:27 Start der SharedMemory-Verbindung wird versucht ...
15:49:27 SharedMemory-Verbindung erfolgreich gestartet
15:49:27 SharedMemory-Verbindung wird versucht (keine im Cache sasrv.ini gespeicherte Adresse)
15:49:27 Verbunden mit Server über SharedMemory
15:49:27 Verbunden mit SQL Anywhere Server Version 16.0.0.1948
15:49:27 Hinweise zur Anwendung:
15:49:27 IP=192.168.178.37;HOST=peterhp;OSUSER=peter;OS='Windows 7 Build 7601 Service Pack 1';EXE=C:\apps\asa16_64bit\bin64\dbisql.exe;PID=0x2410;THREAD=0x24c4;VERSION=16.0.0.1948;API=iAnywhereJDBC;TIMEZONEADJUSTMENT=60
15:49:27 Verbunden mit dem Server, Verbindung mit einer laufenden Datenbank wird versucht...
15:49:27 [ 2] Verbindung mit der Datenbank erfolgreich eingerichtet
15:49:27 [ 2] Anzahl der abgerufenen Zeilen reduziert auf 16 entsprechend der
15:49:27 [ 2] Abrufpufferbegrenzung. Verbindungsparameter 'PrefetchBuffer' kann Performance verbessern.
When I try to use the HOST parameter, the connection fails. However both machines running local.
Thank you too,
Peter
Similar Messages
-
SQL Anywhere Licenses v9 with v16 and v16 with v9
Have a customer running Sybase SQL Anywhere v9.
They currently have nine networked client licenses.
They need an additional seven.
The current SAP license offering is v16 networked client licenses.
Will v16 networked client licenses work with v9 SQL Anywhere?
Additionally,
The customer will eventually upgrade to SQL Anywhere v16.
Will their current v9 networked client licenses work with SQL Anywhere v16?
Thanks.Hi George,
I believe that the client needs to buy or upgrade (if this is possible) the available licenses to the last version to be legal... If your question is about using asa 9 client to connect in a v. 16 server, then the answer is, it should work, but only functionality from asa 9 will be available in the client side. Actually, in the past we had an issue, where a 3rd party application was not able to communicate with an sql anywhere server v.11 using v.11 client. But it was working fine to connect using obbc client from asa 8! We do have a cpu license which has no limit on the clients... So we used asa 8 to connect through the 3rd party app, and 11 client to connect through our application.
And the remaining question is if it's legal or not... and I'm not the appropriate person to give an answer...
Andreas. -
Connect to Sybase SQL Anywhere from a remote location.
BH
Hi, we are running SQL Anywhere 16. Currently our client computers are connecting through ODBC. Is there a way to connect to our server from a Remote Location (over the internet)? If yes, how?
Thanks
AronHi Aron,
Is there a way to connect to our server from a Remote Location (over the internet)?
Yes, there is.
If yes, how?
You will need to supply a HOSTNAME (or direct IP) and PORT to the server running the network database server, communicating over TCP (Note: This may involve opening a TCP port on your firewall to provide a direct TCP route). For the SQL Anywhere client, this information can be set in the ODBC DSN entry as the following screenshot shows:
Note that this is unencrypted traffic across TCP/IP, by default.
If this communication is over the Internet, using an unencrypted channel directly to the database is not recommended. Instead, we would recommend that you also configure Transport Layer Security (TLS) with strong encryption enabled using a certificate (either self-signed or provided by a Certificate Authority (CA)). To do this, you need to create the certificates and then start the SQL Anywhere database server with the (private) server-side identity certificate.
Once the database server is started, you will then need to configure the client for secure communication with the public certificate. When configuring Transport Layer Security on the ODBC client, the security settings (e.g. trusted_certificates, certificate_unit, certificate_company, certificate_name) can be entered on the "Network" tab:
Regards,
Jeff Albion
SAP Active Global Support -
PocketBuilder 2.5.2 and SQL Anywhere 12
Hi all,
I have a Windows Mobile device . It should run SQL Anywhere 12 with Pocket Builder 2.5.2. But at the start on the mobile device always get the message that the driver dbodbc10.dll missing . Where can I set that the driver of ASA 12 should be taken ? Or does this not work with ASA 12 .
Thanks for help.
André RustHello Andre,
PocketBuilder 2.5.x is not supported and no longer sold anymore. Moreover, it has not been tested against ASA 12:
Software used for database connection
You might try what is explained below from link SyBooks Online (Archive)
Connecting to a SQL Anywhere database
By default, PocketBuilder runtime applications on the Windows CE device use
the PKODB25.DLL dynamic link library to connect to SQL Anywhere data
sources through the SQL Anywhere version 10 ODBC driver (dbodbc10.dll).
You can specify a different ODBC driver by including the
driver=dbodbcX.dll parameter in your DBPARM
ConnectString assignment or in the file data source, where X is
the version number of the ODBC driver for Adaptive Server Anywhere or SQL
Anywhere.
For example, to use the Adaptive Server Anywhere 9 ODBC driver on the Windows
CE device, you can use the following DBPARM:
SQLCA.DBPARM="ConnectString='DSN=myDSN;driver=dbodbc9.dll;UID=dba;PWD=sql'"
CONNECT using SQLCA;
SQLCA is the default connection object in all PocketBuilder environments.
In all runtime environments, the connect string for the DBPARM parameter must
not include spaces other than those in the data source name (DSN). The DSN you
assign must exist in the root directory on the Windows CE device or emulator.
When you install the complete PocketBuilder runtime package to the device or
emulator (rather than just the runtime DLLs), the ASA 9.0 Sample.DSN file
is added to the root directory. Instead of using the ConnectString DBPARM to set
the driver name, you can modify ASA 9.0 Sample.DSN, or any other DSN file
that you use, so that it includes an assignment for the database driver:
[ODBC] enginename=asademo databasename=asademo databasefile=\Program Files\Sybase\ASA\asademo.db start=\Program Files\Sybase\ASA\dbsrv9.exe Driver=dbodbc9.dll
If you are using the ASA Sample database that is migrated to SQL Anywhere 10,
you can deploy the DemoDB_SA10.DSN file with your application. The
PocketBuilder setup program installs this DSN file in the PocketBuilder
Code Examples\SADemoData\SA10 directory. The DSN file sets the the
databse file to \Program Files\SQLAny10\ASADemo_10.db, and the driver
name to dbodbc.dll.
SQL Anywhere requires that DSN files be saved in ANSI format rather than
Unicode format.
If you are running your PocketBuilder applications from the desktop, it is
recommended that you use the actual name of the driver (for example, “Adaptive
Server Anywhere 9.0”) in a ConnectString DBPARM rather than the name of the DLL.
Otherwise, the driver you select in the connection string might be ignored.
HTH
Jacob -
Safe to use SQL-Anywhere Version 9?
I have inherited a server running SQL-Anywhere Version 9, I believe that version is end-of-life. I'm trying to come up with good arguments for replacing that version with a newer one, but the boss isn't interested in replacing it. Can anyone help me with arguments?
mobrien022 wrote:
Is it safe to use a different version of JAVA for compilation (javac.exe) vs runtime (java.exe)?
If so, is there a rule of thumb like:
"the javac.exe should be from a newer JDK than the JDK/JRE containing the java.exe" or
"the javac.exe should be from an older JDK than the JDK/JRE containing the java.exe"There's a twist: you can pass the compiler -source and -target options so that it is compiled for an older version. If you don't do that you'll see that an older java.exe kraps out immediately when given a newer version in class files. -
SQL Anywhere 11 on Ubuntu / PHP
Hi there,
I have been trying (with no success) to connnect our PHP app to Sybase database.
Our actual scenario is:
Windows2003/ ODBC {SQL Anywhere 11 Driver} / PHP ------> Windows2008 / Sybase
We are to migrate our PHP:
Linux Ubuntu Server / UnixOBC {SQL Anywhere 11 ODBC Driver} / PHP -------> Windows2008 / Sybase
In the migration process I configured FreeTDS trying somethink like:
/etc/fretds/freetds.conf
[global]
tds version = 4.2
dump file = /tmp/freetds.log
; debug flags = 0xffff
; timeout = 10
; connect timeout = 10
text size = 64512
[sybase]
host = 172.19.2.252
port = 2640
; instance = ek_cadu_0103040607
tds version = 5.0
ASA database = ek_adm01_11
php-script
<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
$cnn = sybase_connect('sybase', 'dba', '_._ENKONTROL_._');
?>
This script shows the following errors:
Warning: sybase_connect(): message: SQL Anywhere Error -83: Specified database not found (severity 16) in /var/www/testodbc.php on line 4
Warning: sybase_connect(): General SQL Server error: Check messages from the SQL Server (severity 16) in /var/www/testodbc.php on line 4 Warning: sybase_connect(): Unable to connect to server: sybase in /var/www/testodbc.php on line 4
Can anyone help?. Thank you in advance.
Marinho.Hi Marinho,
SQL Anywhere does not support FreeTDS. SQL Anywhere does support Open Client and jConnect connections over TDS.
The sybase_* functions pre-built with PHP are for (Sybase) Adaptive Server Enterprise (ASE), not SQL Anywhere - they are separate products.
Is there a particular reason you're not using the SQL Anywhere PHP module ( http://scn.sap.com/docs/DOC-40537 ), with the sasql_* functions that are intended for use with SQL Anywhere?
Regards,
Jeff Albion
SAP Active Global Support -
ODBC Error when migrating from SQL Server 2008 to SQL Anywhere 12
Hello community,
i have the following requirement:
I need to migrate a Database with some Demo data into a SQL Anywhere 12 Database. The SQL Anywhere 12 Database is part of the SAP BusinessObjects Enterprise XI 3.1 SP7 installation and came with the same as OEM Product.
The Environment looks like the following:
DB1 is a MS SQL Server 2008 R2 64 Bit running on Windows Server 2008 R2 64 Bit.
DB2 is the SAP BusinessObjects Enterprise XI 3.1 SP7 installation with the shipped SQL Anywhere 12 (12.0.1.3873) Database running on SLES 11.3 64 Bit
CL1 is my Windows 7 64 Bit Client where Sybase Central is installed in 64 Bit. On CL1 i have a 64 Bit System ODBC Connection connecting to DB1 successfully.
Basically i followed the following (pretty straight forward) tutorial:
Migrating a SQL Server Database to SQL Anywhere White Paper-Technical: Mobile Enterprise, Database Management iAnywhere …
When i want to test the connection from inside Sybase Central (During the migration process) i receive the following error:
From inside Sybase Central my connection looks as follows:
And from the ODBC Manager the connection looks as follows:
Personally i found is strange that the Sybase ODBC Driver Manager drops the error. I would expect that the MS SQL ODBC Driver Manager pops the error it its related to the ODBC DSN to DB1.
Any ideas?
Thanks and Regards
-Seb.Hi Sebastian,
The data from the SQL Server database must be migrated to an existing SQL Anywhere database. Could you please tell me where this SQL Anywhere database resides and how are you connecting to it?
The error message is saying that the connection to the SQL Anywhere remote database server is failing, as opposed to the connection to the SQL Server database. -
Replication from SQL Anywhere to Microsoft SQL Server
SQL Anywhere Community,
I have a customer who wants to replicated their Replication from SQL Anywhere to Microsoft SQL Server Data Warehouse. Are there any whitepapers on this or qualified consultants that could deliver?
Regards,
Joseph Shaffner | Vice President, SAP Solutions | Bradmark Technologies, Inc.
T: 1-301-535-2537 | [email protected]Hi Joseph,
I can help with the "whitepaper" aspect of this question. All of the information for synchronizing with MobiLink can be found in the official SQL Anywhere documentation: http://dcx.sap.com/
We have tutorials for SQL Anywhere, Adaptive Server Enterprise, and Oracle available in the documentation. However, the tutorials can be easily adapted to work with Microsoft SQL Server.
I can also provide some further technical information about synchronizing to Microsoft SQL Server:
The general tutorial for working with MobiLink in Sybase Central and with a MobiLink Synchronization Model is here:
http://dcx.sap.com/index.html#sa160/en/mlstart/sqlatut.html
Initially, you may want to follow it "as-is" (which uses a SQL Anywhere consolidated database) in order to get a better understanding of the MobiLink product. You can then move on to using a Microsoft SQL Server consolidated database afterwards.
Changing the tutorial to work with a different consolidated database is mostly related to creating an ODBC DSN that targets a Microsoft SQL Server instance. You would pick that DSN when defining a consolidated database in your MobiLink synchronization model. The rest of the instructions regarding creating scripts and models is the same, but using Microsoft SQL Server SQL syntax (T-SQL) instead of SQL Anywhere syntax inside the synchronization scripts.
You will need to install the MobiLink system tables for Microsoft SQL Server. The script to do this can be found at: %SQLANY16%\MobiLink\setup\syncmss.sql. If you are using Sybase Central to create a Synchronization Model though, once you connect to Microsoft SQL Server, you will be prompted to install the MobiLink system tables automatically (i.e. run the script).
There are some Microsoft SQL Server specific issues that you will want to be aware of:
http://dcx.sap.com/index.html#sa160/en/mlserver/ml-basics-mss-5159304.html
I have contacted some people internally here at SAP about consulting engagements to see if they can assist. If you are already working with an SAP Sales representative, it would probably be best to inquire with them directly and look into your available options.
Regards,
Jeff Albion
SAP Active Global Support -
ColdFusion 9 ODBC Server crashes when talking to Sybase over SQL Anywhere 11
We have recently upgraded our database from Sybase 6 to Sybase 11. We are also hoping to move from ColdFusion MX 6.1 to ColdFusion 9 in the near future. In both environments, the ColdFusion ODBC Server enters a state where it is hung and the ColdFusion Application Server needs to restart. I have been testing in CF9 since it actually gives an error message, where CF6.1 just boots me out to the login page. Connections are setup using the ODBC Socket in CF Administrator.
In the ColdFusion 9 ODBC Server debug log we see the following warnings as it is trying to run GetDescribe.
It appears that it is unable to retrieve Catalog Name, but I don’t know why this would cause the ODBC Server to die. In Sybase 6, the Catalog Name is blank as well, but there are no warnings either.
This statement is doing a select * and returning 155 columns. Following is a successful example where only 4 columns are retrieved. I could (and have) gone through and chop my select statements, but since this worked in Sybase 6 I wonder if there is a handshaking problem? I would appreciate any advice on setting up my DSN or ODBC server that may help this issue.
Thank you for your help!
Holly Ackerman
Applications Programmer
Survey Research Operations – University of Michigan
** ColdFusion 9 ODBC Server debug log failure **
Tue May 11 13:41:58 2010: SWSOC_CursorVar_DescribeCol entry descIx = 155
Tue May 11 13:41:58 2010:SQLColAttribute SQL_DESC_CATALOG_NAME sqlRc = 1
Tue May 11 13:41:58 2010: SWANDBSRVC_OdbcError entry
Tue May 11 13:41:58 2010: SWSOC_OdbcErrorWithState entry
Tue May 11 13:41:58 2010:Diagnostics (Warning) added: message:[01004][ODBC Socket][Sybase][ODBC Driver]Data truncated;code:0;component:6;function:10;row:0;column:0
Tue May 11 13:41:58 2010: SWSOC_OdbcErrorWithState exit
Tue May 11 13:41:58 2010: SWANDBSRVC_OdbcError exit
Tue May 11 13:41:58 2010: SWSOC_CursorVar_DescribeCol exit
Tue May 11 13:41:58 2010:SWANDB_GetDescribe exit
Tue May 11 13:41:58 2010:The active request for session 8 is interrupted due to an unexpected exception
Tue May 11 13:41:59 2010:SWANDB_FreeVariables entry
Tue May 11 13:41:59 2010:SWANDB_FreeVariables exit
Tue May 11 13:41:59 2010:SWANDB_Close entry
Tue May 11 13:41:59 2010:SWANDB_Close exit
Tue May 11 13:41:59 2010:SWANDB_Logoff entry
Tue May 11 13:41:59 2010:Abnormal logoff detected (caused by crash, kill, ...)
Tue May 11 13:41:59 2010:Logoff behaviour not set, using database default
Tue May 11 13:41:59 2010:SWANDB_Logoff exit
ColdFusion 9 ODBC Server dump file:
//=====================================================
Tuesday, May 11, 2010 1:41:58 PM ACCESS_VIOLATION
Stack Dump:
PC:7C82CAC2-Seg:1;Off:0002BAC2-RtlDeleteCriticalSection+11A
PC:7C833A52-Seg:1;Off:00032A52-RtlGetFullPathName_UstrEx+16D
PC:7C82B61B-Seg:1;Off:0002A61B-wcscpy+180
PC:0046F5AB-Seg:1;Off:0006E5AB
PC:0046F5CD-Seg:1;Off:0006E5CD
//=====================================================
When I look at the ODBC Server debug log for other GetDescribe statements on the same table, the same warnings appear, and the catalog name is blank, but it seems to proceed fine from there. In the example below, I limit the select to 4 columns.
** ColdFusion 9 ODBC Server debug log success **
Tue May 11 13:41:37 2010: SWSOC_CursorVar_DescribeCol entry descIx = 4
Tue May 11 13:41:37 2010:SQLColAttribute SQL_DESC_CATALOG_NAME sqlRc = 1
Tue May 11 13:41:37 2010: SWANDBSRVC_OdbcError entry
Tue May 11 13:41:37 2010: SWSOC_OdbcErrorWithState entry
Tue May 11 13:41:37 2010:Diagnostics (Warning) added: message:[01004][ODBC Socket][Sybase][ODBC Driver]Data truncated;code:0;component:6;function:10;row:0;column:0
Tue May 11 13:41:37 2010: SWSOC_OdbcErrorWithState exit
Tue May 11 13:41:37 2010: SWANDBSRVC_OdbcError exit
Tue May 11 13:41:37 2010: SWSOC_CursorVar_DescribeCol exit
Tue May 11 13:41:37 2010:SWANDB_GetDescribe exit
Tue May 11 13:41:37 2010:SSP OUTPUT
===================================
sspVersion:9
error :1
CHAIN
num:4
subPacketError:0
OPEN
stmtRefnum:3
EXECDIRECT
row count :-1
result available :1
transaction
output available :no
GETDESCRIBE
numDescs:4
(logging describe cursorvar:1)
auto unique :no
case sensitive:no
catalog name :
money :no
label :npreferenceid
length :5
name :npreferenceid
nullable :no
scale
schema name :DBA
searchable :searchable
table name :<table name successfully displayed here>
type :numeric
type name :numeric
unsigned :no
updatable :yes
encoding :Thank you for your help.
Unfortunately, we can't use the Sybase DSN that is bundled with ColdFusion. We had a Sybase expert in house, and that connection is to a different type of server. We need a SQL Anywhere DSN. We did speak with him about using the native driver, but he thinks that may not work correctly for us. I am at the stage where I want to try everything though, so I will give this a try. -
Symptom: When you install Reporting Service Point role on a Site System Server running SQL Server
2012 SP1, you may encounter an issue that the Reporting Service Point role cannot be installed. The error log “srsrpMSI.log” and “srsrpsetup.log” may throw the error as shown in Figure 1 and Figure 2.
03:32:03:764]:
MainEngineThread is returning 1618
Figure 1: Error -1
<03/03/14 03:32:03>
srsrp.msi exited with return code: 1618
Figure 2: Error -2
Reason: All the two logs indicate an error return code 1618. From the KB below you may know what
the return code means.
ERROR_INSTALL_ALREADY RUNNING
1618
Another installation is already in progress. Complete that installation before proceeding with this install.
KB link:
http://support.microsoft.com/kb/290158 “it is related to an Office Suite KB, anyway, the MSI return code is the same meaning”
You can look into Resource Manager and Event Viewer to find the other currently running MSI installation. You may get a warning in Event Log that means the MSI wants to install a SQL Server
related Component (Figure 3). The Resource Manager confirms this (Figure 4).
Event Log:
Event ID: 1004
Source: Msinstaller
Level: Warning
Detection of product '{A7037EB2-F953-4B12-B843-195F4D988DA1}',
feature 'SQL_Tools_ANS', component '{0CECE655-2A0F-4593-AF4B-EFC31D622982}' failed. The resource '' does not exist.
Figure 3: Event Log
Figure 4: Resource Manager
Resolution: the error is exactly what the following KB describes.
KB Link:
http://support.microsoft.com/kb/2793634
After we resolve the SQL Server 2012 issue, the Reporting Service Role is installed successfully.
Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.This implies that ODP.NET does NOT need to be installed on a client. However, I cannot find OraOPs9.dll on a machine with Client Release 9.2 installed. Should OraOps?.dll automatically come with a Client installation of 9.2 or higher?
ODP.NET needs to be installed on the client. OraOps9.dll is part of ODP.NET, not the Oracle Client.
Also, if an application is built with the 10g ODP.NET, can it be run from a machine with OraOps9.dll?
If an application is built with 10g ODP.NET, it can be run with 9.2 ODP.NET as long as you do not use any 10g APIs. The new features in 10g ODP.NET are included in the doc and the ODP.NET FAQ for your reference. -
Running SQL Server Function and Procedures from Oracle
I am trying to run SQL Server 2005 functions and/or procedures from a SQL statement in Oracle. I have gone throught the hetergeneous services and have connected to the SQL Server database successfully. I can also do a query to a table in SQL Server successfully; but I have not been able to execute a procedure or a function.
Have you tried Oracle syntax? It seems to me that you have only tried T-SQL syntax, e.g. execute proc.
Wrap it in a begin..end tag like you would a normal PL/SQL function or proc call. Assumption is that as Oracle makes the remote database (via the dblink) look like an Oracle database, you should also play along and pretend it is one and treat it as such.
E.g.declare
r integer;
begin
-- execute remote proc
procFoo@dblink( 'ABC' );
-- call a remote function
r := funcFoo@dblink( 123 );
end; -
Reading data from Sybase SQL Anywhere 7 database to write into a SQL Server database
Hi,
I need to import data from a Sybase SQL Anywhere vers. 7 database. This RDBMS was used more 10-12 years ago. I want to write Sybase data into a SQL Server 2008 R2-2012 database. For testing purposes I'm using SQL Server 2005.
After that I've installed Sybase SQL Anywhere vers. 7 I can use the Adaptive Anywhere 7.0 ODBC. I'd like to use SSIS to import Sybase data, but I cannot create an OLE DB connection in a right manner while I can create and ODBC connection manager and so I
can use an Execute SQL task (and not a data flow task, unfortunately!).
Well, after using this Execute SQL task to read fe a table with thousands of data rows how can I write the entire data collection on a SQL Server table?
ThanksBelow link may be helpful,
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/184c937a-2b2c-4e59-b4d7-e8d3d1b476b3/net-provider-for-oledb-sybase-adaptive-server-anywhere-ole-db-provider-90-cant-be-located-when?forum=sqlintegrationservices
http://supun-biz.blogspot.in/2010/11/extracting-data-from-sybase-sql.html
Regards, RSingh -
Winsock error when running SQL Server Stored Proc
I have a SQL Server stored procedure that is trying to read emails from an IMAP server (I am using mail.dll from www.limilabs.com).
The SP works fine on my local computer/db, and the code also runs fine when run from a console application on my remote server. When I try to run it from SQL Server however I get this error message:
Msg 6522, Level 16, State 1, Procedure GetEmails, Line 0A .NET Framework error occurred during execution of user-defined routine or aggregate "GetEmails": Limilabs.Client.ServerException: The requested name is valid, but no data of the requested type was found ---> System.Net.Sockets.SocketException: The requested name is valid, but no data of the requested type was foundSystem.Net.Sockets.SocketException: at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6) at System.Net.Dns.GetHostAddresses(String hostNameOrAddress) at System.Net.Sockets.Socket.Connect(String host, Int32 port) at Limilabs.Client.ClientBase.Connect(String host, Int32 port, Boolean useSSL)Limilabs.Client.ServerException: at Limilabs.Client.ClientBase.Connect(String host, Int32 port, Boolean useSSL) at StoredProcedures.GetEmails()
I suspect it is something to do with permissions (??) but it is beyond my knowledge of SQL Server. Anyone have some pointers? I am using the IP for the IMAP server, I have switched off the firewall.
ThanksReading emails in a stored procedure? Hm...
Unless you are impersonating the actual user in your CLR procedure, the access will be under the service account for SQL Server. If this is Local Servic or similar and may not have the permission or configuration to access whatever System.Net.Dns.InternalGetHostByName
is trying to access.
Try running SQL Server under a domain account to see what happens.
Erland Sommarskog, SQL Server MVP, [email protected] -
Hi,
What is the proper way to demote a Windows 2003 Domain Controller running SQL Server 2008 WorkGroup Edition?
I will be migrating AD from Win 2003 to 2012....
Thanks in advanced.Running SQL on a domain controller is highly not recommended for performance reasons and for complexities it introduces in the management of both systems (You are already facing this situation now).
I would recommend proceeding like the following before demoting your domain controller:
Install a new SQL server on a member server
Migrate your databases to the new SQL server
Once done, you can safely demote your DC.
More if you ask them here: http://social.technet.microsoft.com/Forums/windowsserver/en-US/home?category=sqlserver
This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.
Get Active Directory User Last Logon
Create an Active Directory test domain similar to the production one
Management of test accounts in an Active Directory production domain - Part I
Management of test accounts in an Active Directory production domain - Part II
Management of test accounts in an Active Directory production domain - Part III
Reset Active Directory user password -
What version of sql anywhere will run to windows 8.1
Hi, can i ask some help what version of sql anywhere that will run in windows 8.1 ?
Thank you in advance.You can find the latest platfrom support here:
SAP SQL Anywhere Supported Platforms and Engineering Support Status
For specific patch levels required, check the link above, but basically the latest patch levels of versions 12 and 16 are supported on Windows 8.x.
--Jason
Maybe you are looking for
-
64 bit OS and Applications for Mac Pro
I was all set to replace my ailing G5 PM with a MBP when Apple released the Mac Pros today. I originally bought the G5 because I wanted to be able to run 64 bit software when that became the standard. With the switch to 32 bit Intel chips, I thought
-
this is on behalf of my wife, who has had this weird problem where whenever people try to facetime her, they end up getting some guy in San Francisco. ATT says it is not their problem and Apple can't find an answer. Sometimes turning facetime off and
-
Can't access Web Site, super slowly and time out!
Hi all, I am using Server 2012 R2 with Hyper-V, HP DL360 G6 Server The Master OS have a NIC1 to VLAN1 Switch (Also in the Cisco SG300 Switch) Plus other NIC2 connect to Cisco SG300 28 Switch (Running in L3 Mode), this Cisco then connect to a SonicWA
-
Session Beans and TIBCO E4JMS and Weblogic JMS 8.1
Setup:- Weblogic Server 8.1 SP2 on Linux TIBCO E4JMS 3.1.2 I have a two Staeless Session Beans which are deployed in both sides of the cluster - Cluster is made up of two servers(ManagedServer1 and Ma
-
I installed Lightroom on the Creative Cloud, trial version, then I was offered LR 5 disc. I thus installed it and entered the serial number but it doesn't work now that the trial version is over on CC. I don't understand... Can anybody help me with t