Connection To Oracle Fails When Using SQLNET.AUTHENTICATION_SERVICES = (NTS)
Jul 20, 2007
I'll say up front that this is going to be a long post because I plan on explaining my situation and what I've tried up front. It requires some explanation of how our application is secured since that appears to be interfering with SSIS being able to connect.
First the background scenario.
My company writes software that can use MS SQL or Oracle as the back end. I've begun work on an initiative to extract data to a star schema prior to purge in an attempt to improve reporting and analysis available to our customers. Initial plan is to use MS SQL Integration/Analysis/Reporting services for this. Even for our Oracle customers.
The problem symtoms.
I'm attempting to get a connection to Oracle with either an OLE DB or .Net provider. I've tried all available and get a ORA-12638: Credential retrieval failed error on all of them. I validate that a development username and password work using both SQL*Plus and Toad so troubleshooting begins. After some research I find that if I change my line for SQLNET.AUTHENTICATION_SERVICES in my sqlnet.ora file on the server from NTS to NONE that I can now get a connection with the SSIS Connection Manager.
The problem is, our application is secure and having this value set to NONE will never happen in production. I don't use it in dev or qa either. I also found that once I set this to none I could no longer connect with integrated security (EXTERNAL in Oracle speak) with Toad.
How our application is secured and why.
When setting up our application with Oracle as the back end we create only two users. One is the schema and owns all objects. It can't even log into the server though. The other is an external user. This users only rights are to log on and membership in a role. The role can execute stored procedures and nothing more. The application server services for our software run under the username of the external user in Oracle. That way we can use integrated security and no usernames or passwords are hard coded anywhere. Using an external user allows us to have our Windows application server work correctly with Oracle regardless of the OS that is hosting Oracle. This has made it easy on my developers since they just code for using integrated security and we have nearly identical data abstraction layers for both MS SQL and Oracle.
I've tried using the Integrated Security = True option in the .Net provider and still get the same error. I've tried passing / as the username and get the same error. I have a regular Oracle username/password in dev and qa environments that I provide the developers. It has more rights that the external user the services runs under so they can investigate what is happening behind the scenes. It works with Toad and SQL*Plus. When I use it in SSIS CM I get the same error message.
How do you use integrated security with Oracle from SSIS? I don't want to have to tell my boss that SSIS won't work for our Oracle customers.
scott/tiger is given as an example here; used my real userid/pw instead. BTW, I am able to connect
to the Oracle database using the userid/pw from the same host that is running the Sqlserver db.So, the
Oracle client software is installed and is working correctly.
Then attempted to query a table on the Oracle database:
select count(*) from ORA10G..<schemaname>.<tablename>
Got the following error message(s)
OLE DB provider "MSDAORA" for linked server "ORA10G" returned message "ORA-12154: TNS:could not resolve the connect identifier specified ". Msg 7303, Level 16, State 1, Line 1 Cannot initialize the data source object of OLE DB provider "MSDAORA" for linked server "ORA10G".
All the previous discussions and suggested solutions are all for SqlServer 2000 and Oracle8. But I did not see much discussions on SqlServer2005 and Oracle10g. Any help to resolve this problem will be appreciated.
I did a small package with only one ODBC connection (Merant 3.70 32-Bit Progess). This package runs well in Visual Studio and fails when runs by SQL Server Agent.
Configuration:
SQL Server Agent on a 32Bit server.
The ODBC connection configuration in available on System DSN on this server.
The user of Server Agent have full access (Admin).
Connect Manager Provider: ".Net ProvidersOdbc Data Provider"
SQL Server version: 9.0.3042
Error Message:
Executed as user: TEKCON cadmin. ...ion 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 16:50:33 Error: 2007-06-11 16:50:33.62 Code: 0xC0047062 Source: Data Flow Task DataReader Source [1] Description: System.Data.Odbc.OdbcException: ERROR [HYC00] [MERANT][ODBC PROGRESS driver]Optional feature not implemented. ERROR [HY000] [MERANT][ODBC PROGRESS driver]msgOpen: unable to open message file: PROMSGS ERROR [IM006] [MERANT][ODBC PROGRESS driver]Driver's SQLSetConnectAttr failed. ERROR [HYC00] [MERANT][ODBC PROGRESS driver]Optional feature not implemented. ERROR [HY000] [MERANT][ODBC PROGRESS driver]msgOpen: unable to open message file: PROMSGS ERROR [IM006] [MERANT][ODBC PROGRESS driver]Driver's SQLSetConnectAttr failed. at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode) at System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection connection, OdbcCon... The package execution fa... The step failed.
I created a .bat file with this instruction and It's run well:
On my dev server I have working ssis packages that use connections Microsoft OLEDB provider for Oracle MSDAORA.1 and Oracle provider for oledb and OracleClient data provider.
I use one or the other according to my needs.
In anticipation and to prepare for the build of a new production server, I have build a test server from scratch and deployed to it the entire dev.
Almost everything works except Microsoft OLEDB provider for Oracle.
ssis packages on the test machine will return an error
Error at Pull Calendar from One [OLE DB Source [1]]: The AcquireConnection method call to the connection manager "one.oledb" failed with error code 0xC0202009.
Error at Pull Calendar from One [DTS.Pipeline]: component "OLE DB Source" (1) failed validation and returned error code 0xC020801C.
[Connection manager "one.oledb"]: An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft OLE DB Provider for Oracle" Hresult: 0x80004005 Description: "Oracle error occurred, but error message could not be retrieved from Oracle.".
I have used the same installers for OS, SQL and Oracle SQL*Net on both dev and test machines. The install and then the restore/deployment on Test went fine.
Does anyone could point me to the right direction to solve this issue?
We are using the Windows Task Scheduler as a substitute for the SQL Server Agent, which isn't available in the Express edition. The scheduled task just calls a batch file, which in turn, runs a stored procedure using osql with the -E option for a Trusted Connection.
SQL Server Express has been installed using the defaults, which means the service is running in the "NT AUTHORITYNETWORK SERVICE" account. The scheduled task we create is set to run using the "NT AUTHORITYSYSTEM" account.
Now we find that on Windows Vista (tested using Ultimate Edition) that the scheduled task fails to run the stored procedure until the machine is rebooted the first time after installing SQL Server Express. When I say "fail", I mean that the stored procedure isn't executed. The scheduled task however completes and reports no errors. On Windows XP, we do not run into this problem so I suspect it has something to do with the UAC in Vista?
We further found that after installing SQL Server Express and creating the scheduled task in the "NT AUTHORITYNETWORK SERVICE" account, the scheduled task (and stored procedure) runs fine WITHOUT requiring a reboot.
Can anyone explain why a reboot is needed to get SQL Server Express to run the scheduled task correctly under Windows Vista and the SYSTEM account?
I am trying to use a lookup in a package and check for some conditions. On the advanced tab, I am trying to modify the condition from = to <=. But the same doesnt work when the target is on oracle, but the same works fine on SQL Server and DB2.
Im getting the following error when I try to export from Oracle 9i and import into SQL Server 2005 using Oracle and SQL OLE DB Provider's respectively.
Cannot retrieve the column code page infor from the OLE DB Provider. If the component supports the "DefaultCodePage" property, the code page from that property value will be used. Change the value of the property if the current string code page values are incorrect. If the component does not support the property, the code page from the component's locale ID will be used.
I know there is a way to change the property settings for the OLE DB Provider in the Data flow section of the development studio BUT ...
1) Is there a way to change this outside of the development studio?
2) I can't create the package to setup in the studio because even when I uncheck execute immediately and check save package, it still fails and never creates anything.
I have 53 tables I need to load from Oracle into SQL Server as part of a migration to a new system. All but three of the tables load perfectly. Three tables load approximately 95% of the rows. The problem tables have between 300,000 and 1,300,000 rows. Oddly some of the tables that migrate successfully have more than 10,000,000 rows. What to check to determine why these tables are failing to load?
I have created a DTS package that pulls data in from Oracle into SQLServer. When I run it directly on the server (from EnterpriseManager), it works fine. When I run it from Enterprise Manager on aclient machine that does not have the Oracle client software, it doesnot run, giving me the error: "The Oracle client and networkingcomponents were not found...". I was hoping I wouldn't need to havethe client software installed on a machine other than the server whereSql Server is running. The problem here is that there are a number ofmachines from where I would like to execute this DTS package that I donot want to install/configure the Oracle client software. I don'tquite understand why the configuration of the client is importanthere. In my mind, when I am using enterprise manager from a clientmachine, I am using it sort of like a terminal services client toconnect to the server. I guess there is a lot more happening in thebackground.Thanks for any feedback,Marcus
I am extracting data from an Oracle database and have installed the latest x64 ODAC. When I run the 64 bit dtexec in cmd the package runs fine with no errors, but when creating and executing a SSIS job in the agent it fails. I've tried creating the job using CmdExec as well and I get the same errors:
Microsoft (R) SQL Server Execute Package Utility Version 9.00.3042.00 for 64-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 11:12:43 AM Error: 2007-08-15 11:12:45.63 Code: 0xC0202009 Source: Load Dimension Data Connection manager "ora" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x800703E6. An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x800703E6 Description: "Invalid access to memory location.". End Error Error: 2007-08-15 11:12:45.65 Code: 0xC020801C Source: CopyCustomers CustomerSource [1] Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "ora" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed. End Error Error: 2007-08-15 11:12:45.65
The CmdExec job step uses the _exact_ same command as the one I execute successfully in cmd: "c:Program FilesMicrosoft SQL Server90DTSBinnDTExec.exe" /FILE "C:PackagesLoad Dimension Data.dtsx" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING EW
I have managed to find two work arounds, but they are quite ugly:
1) Schedule the package execution using Windows Task Scheduler, basically create a bat file which runs the package. 2) Schedule the package in SQL Server agent, but as T-SQL script and use xp_cmdshell, i.e. EXEC xp_cmdshell 'dtexec /FILE "C:PackagesLoad Dimension Data.dtsx" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING EW'
Both work and use the 64 bit dtexec. Not that elegant though..
CmdExec and the 32 bit version of dtexec works, but is not good enough for me since we bought new hardware and 64 bit software just to be able to address more memory. Has anyone managed to execute a SSIS package successfully using the agent and the 64 bit OraOLEDB.Oracle.1?
Any help would be greatly appreciated. Thanks!
Btw, I am using Windows Server 2003 x64 and SQL Server with SP2.
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection
Line 57: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Line 58: Dim ds As New DataSet Line 59: SqlDataAdapter1.Fill(ds) Line 60: Line 61: DataGrid1.DataSource = ds
Stack Trace:
[SqlException: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.] System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) System.Data.SqlClient.SqlConnection.Open() System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) jtio8.WebForm1.Page_Load(Object sender, EventArgs e) in c:inetpubwwwrootjtio8WebForm1.aspx.vb:59 System.Web.UI.Control.OnLoad(EventArgs e) System.Web.UI.Control.LoadRecursive() System.Web.UI.Page.ProcessRequestMain()
Now, I've created a new login to the SQL server using the ASPNET user id (as well as several others for testing), set up the premissions for each UID and I'm still getting this error.
I have also tried to setup the user info in the connection string by doing the following:
I have this line of db connection code that works in vb.net but not in c#: con = new ADODB.ConnectionClass(); //for vb.net I used ADODB.Connection() instead and it workscon.Open("Provider=SQLOLEDB;" + ConfigurationSettings.AppSettings["connectionString"]); Error message:CS1501: No overload for method 'Open' takes '1' arguments Searched the web but can't find the answer... Does anyone have a clue?
I am using Crystal Report XI to create OLE DB connection to SQL Server 2005 domain user that is already added to database logins and has public and read rights. (Using Integrated Security)
I need a way to connect to an Oracle database and pull the information from that database into a Sql Server Database. An Oracle gateway is not an option. Is there a way to set up an odbc connection to connect to the database or is there another way to connect?
I am moving dta afrom an Oracle source to SQL serevr 2005 using SSIS
Used: Provider: Microsoft OLE DDDB provider for Oracle and typed in Server and username with password.
When executed the package with defaul settimngs( Package ProtectionLevel: EncrptSensitiveWith userkey OR DONTSAVESENSITIVE, EncrptAllwithPassword) and Isolationlevel: serializable/ read comitted) the package responded fine.
When I try to do 'Package Configuration' and type in password in config file the package doesn't responds. it gives following error.
TITLE: Microsoft Visual Studio ------------------------------
Error at Package2 [Connection manager "DEV04.XYZ"]: An OLE DB error has occurred. Error code: 0x80040E21. An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040E21 Description: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.".
Error at Data Flow Task [OLE DB Source [1]]: The AcquireConnection method call to the connection manager "DEV04.XYZ" failed with error code 0xC0202009.
Exception from HRESULT: 0xC020801C (Microsoft.SqlServer.DTSPipelineWrap)
------------------------------ BUTTONS:
OK ------------------------------ I also get this error:
Executed as user: XYZUHSQLServer. ...042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 1:01:42 PM Error: 2008-05-19 13:01:43.22 Code: 0xC0016016 Source: Description: Failed to decrypt protected XML node "DTSassword" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available. End Error Error: 2008-05-19 13:01:43.96 Code: 0xC0202009 Source:ExtAWMData Connection manager "XYZ ABC" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E4D. An OLE DB record is available. Source: "Microsoft OLE DB Provider for Oracle" Hresult: 0x80040E4D Description: "ORA-01017: invalid username/password; logon denied ". End Error Error: 2008-05-19 13:01:43.96 Code: 0xC020801C... The package execution fa... The step failed.
Please advice on 1) Selection of provider for Oracle connection 2) ProtectionLevel 3) Isolation Level 4) Package configuration - Connection Strings (MSDAORA.1) 5) Publishing the package on Server best way.
Thnak a lot for all your valuable time and efforts.
I've installed 32 and 64 bit oracle drivers. I was testing running the two different dtexec.exe programs the other day, logged in as the sql agent and they both worked. Running the 64 bit as a job did not work. 32 bit does not work, since the agent process is 64 bit, from what I understand.
Today I'm working on it again and trying the same steps. Running the 32 bit executable dtexec is now returning "not a valid win32 executable". I swear this worked the other day, and works on our other server.
Running the 64bit executable from the agent just hangs up on this log entry:
HRD1.Cardiff (my oracle connection)
ExternalRequest_pre: The object is ready to make the following external request: 'IDataInitialize::GetDataSource'.
Anyone know what is going on?
http://support.microsoft.com/kb/918760/
I read this article, but didn't think it applied,since I chose for protectionLevel = sql to handle permission (I think they ) - So I created a proxy using my credentials and gave it access to cmdexec and ssis and it worked. Can anyone explain this to me??
I have created a simple report that reads data from Oracle within Visual Studio. I have no problem with previewing the report within Visual Studio. When I deploy the report to the Report Server (same machine) and try to open the report through Report Manager, I get the following error message:
An error has occurred during report processing.
Cannot create a connection to data source 'xxxx'.
System.Data.OracleClient requires Oracle client software version 8.1.7 or greater.
I am aware of the following issue that requires extra security to be assigned to the Oracle directories: http://support.microsoft.com/Default.aspx?kbid=870668
Even after applying the Read/Execute access to the Network Service account that is running the Reporting Service, I still get the error message.
Can anyone help me with the debugging of this issue?
I have created reports in SQl Server 2005 Reporting Services using an Oracle Data Sources. When I Preview the report in VS 2005, It runs fine but when I deploy it, it fails to make a coonection to the oracle data source.
Reports off the SQL Server Data Sources arerunning fine.
Can any one out there help me out on this. I will really appreaciate.
I have a SQL Server that uses mixed mode , I have given it a real IP ....from home when i connect on the dial up & use the EM & then try registering it using the real ip & the sa username & pasword .It says that Access denmied to the SQL Server..... or the server does not exists
There is no firewall ... I am directly connected to the Internet & so is the SQL Box
Can anyone please let me the reason for it & how to solve this problem
I have a legacy visual basic application that connects to a newly installed SQL Server 2005. On occasion (about once or twice a day) I will receive several errors in a row about not being able to open a connection to the database.
Since I am catching any errors generated I post the number and description of the Err object to the screen in a message box for notice to the user. The error is 0 and the description is blank. There are no corresponding events in Window Event Log or in the SQL Server Logs other than standard informational messages about the regular operation of the server.
I am connecting to a SQL Server 2k5 Workgroup Edition, with ODBC, using named pipes. The connection works at all other times, so I know I am set up correctly. The program loops thru the same processing section of code so there is no chance special operations being done on the database could hose the connection.
I am facing problem while setting connection string in Report Service project. Problem is when I specify DNS name instead of machine name as the Server in the connection string.
When I specify DNS name in the connection string it gives error that "A connection cannot be made.Ensure that the server is running" on click of "Test Connection" Also I am not able to view reports directly through IE. I.e. http://<DNS_NAME>/Reports. When I access Reports, it prompts me to enter username/password. Even after specifying valid username, it shows me the prompt again n again.
Is there some known issue with Reporting Service or with IIS setting not able to connect to a DNS name? I did not face with any issue when I specified DNS name in the connection string of Analysis Service project.
Did anyone encountered DNS related problem with SQL Server 2005 Reporting Service?
We also verified that: 1: Ping with both machine name and DNS name returns same result. 2: nslookup with both machine name and DNS name resolves to same IP.
3: Tried putting the DNS name in the hosts file.
Eagerly awaiting some positive reply.
Note: I am working with SQL Server 2005 Standard Edition.
I am having some difficulty to update a record in a table from SQL Server 6.5 to Oracle 7.3 DB.
Basically I want to write a insert trigger in Sql Server 6.5 table and I want to update the same inserting record to Unix Oracle table. I tried by writing a DLL and use that in SQL Server External Stored Procedure, but I dont know how to pass the parameter for that. Parameter here is record which I want to insert in to Oracle Table.
Is there any easy way to do that? Did any body did that before? Please help me out.
We are in the process of setting up some type of interface between 2 applications that utilize SQL Server(ours) and theirs which utilizes Oracle. These servers will actually sit in the same server room. My thought was to take the simple approach of each DB setting up views needed by the other and assigning a user and security so the other DB can look at the data. We currently do this in house. THeir solution is to use a somewhat sophisticated mesaging system which will pass XML information back and forth between the systems. I hate to take the simpleton approach but why go through all that trouble where a simple view not only provides the same functionality, but is a dynamic as it gets. If anything goes wrong with the messaging system itself or problems with a specific message this needs to be resolved before the data is available. Non of this is a problm with the view. Any input from anyone who has this in place(either solution) appreciated. Or any arguments against my point of view
Hi,For a customer we have implemented a datawarehouse with a connection toOracle. From the beginning of the project the connection to Oraclegives troubles. The next morning is the connection still active andwhen the customer looks in the processes of SQL Server a " Wait type,RESOURCE_SEMAPHORE." is shown. For what i know. SQL Server is waitingfor a resource, in this case Oracle but doesn't tell me anything aboutwhat could be the problem.The customer uses the Oracle driver instead of a microsft oracledriver.What could it be? and how can we tackle this problem? Are there ways tolook from Oracle point of view? Can we monitor something?Greetz,Hennie
We are trying to change our current SSRS reports to point to an Oracle 10g database. I can connect to the Oracle db from the report server via the ODBC Administrator and also through the BI 2005 studio. The connections work fine. However, when I publish the reports and try to run them from the web I always get a connection error. When I use the oracle connection it acts as if it doesn't see the oracle client and when I use ODBC it throws a werid 114 error.
Is there anything I am missing? I just don't understand why the report will work in BI Studio, but not when it is published (on the same machine)?
I'm trying to get some developers going with ssis on their desktops running
XP sp 2
Microsoft SQL Server Integration Services Designer Version 9.00.3042.00
Oracle client drivers 9.2.0.1.0
Oracle Enterprise 8.1.7.4.0 and 9.2.0.1.0
I have the same setup on my machine and it's working fine. I duplicated steps I used to get data on the develoeper machine and got these errors.
Code Block
Pre-Execute Execute phase is beginning. Execute phase is beginning. PrimeOutput will be called on a component. : 1 : OLE DB Source
SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "OraOLEDB" Hresult: 0x80004005 Description: "ORA-01403: no data found".
SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "OraOLEDB" Hresult: 0x80004005 Description: "ORA-01403: no data found".
SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "OLE DB Source" (1) returned error code 0xC0202009. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.
SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "OLE DB Source" (1) returned error code 0xC0202009. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.
I'm at a loss of where to go next and I need to get these guys rolling! Next step is to reinstall drivers...but I'm doubting that is going to have any effect.
I have a strange problem accessing a MS SQL Database from my network. I'm using an application that is based on BDE which uses ODBC to connect to a MS SQL DB. When I tried to connect from the network with BDE,I got this error message:
BDE Error : 13059 [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server does not exist or access denied. [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionOpen (Connect()).
On the server side I'm using W2003 EE ,MS SQL 2000 Standard with SP4, BDE5.11. On the client side it's an XP SP2 with MS SQL Client installed, same BDE 5.11 When I create an alias using ODBC and mapping to my server, it connects and the communication with the Database Server succeds: TESTS COMPLETED SUCCESSFULLY! When I'm trying to connect using BDE Admin and double clicking on the + sign of the alias I created usind ODBC admin I get the message I listed above. Any help would be appreciated,
I cannot connect to my SQL2005 server using the old SQL ODBC drivers, I have to use the Native client drivers. The database I am trying to connect to is a SQL 2000 db I just attached. Its owner is a SQL user login, which works fine and can connect remotely.
I'm having an odd issue here. First off, let me tell you I've already spent hours trying to solve this and looking for any similar problem in forums with no luck.
I have a very simple application (built to test this issue) which connects to SQLServer 2K, and retrieves some information from a table. It works fine. Then I stop the server, wait, and bring it up again. When I try to execute the query, it will fail only the first time, and then work.
The application was written in C#. The exception thrown is "...A transport-level error has occurred when sending the request to the server....". Please, remember, the server IS up, and working fine. I've also tried variants of this code, not just with select querys, but also insert.. with different objects as well.
I'll post some of this codes, so you can check. If anyone knows about what may be happening I'd be truly thankfull for your input.
Thank's in advance!
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Data.SqlClient;using System.Drawing;using System.Text;using System.Windows.Forms;namespace ABMprueba{ public partial class Form1 : Form { private SqlConnection conn; public Form1() { conn = new SqlConnection(); conn.ConnectionString = "Server=USER;Database=test;User ID=sa;Password=1234;Application Name=ABMPrueba"; InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { try { conn.Open(); SqlCommand cmd = conn.CreateCommand(); cmd.CommandType = CommandType.Text; cmd.CommandText ="select * from a;"; SqlDataAdapter adapter = new SqlDataAdapter(cmd); DataSet output = new DataSet(); adapter.Fill(output); this.dataGridView1.DataSource = output.Tables[0].DefaultView; } catch (Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message); } finally { conn.Close(); } } }}
=========================== option 2
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Data.SqlClient;using System.Drawing;using System.Text;using System.Windows.Forms;namespace ABMprueba{ public partial class Form1 : Form { private SqlConnection conn; public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { try { conn = new SqlConnection("Server=MBESTEIRO;Database=prue;User ID=sa;Password=barza04;Application Name=ABMPrueba"); conn.Open(); SqlCommand cmd = conn.CreateCommand(); cmd.CommandType = CommandType.Text; cmd.CommandText = "select * from test;"; SqlDataReader dr = cmd.ExecuteReader(); DataTable dt = new DataTable(); dt.Load(dr); this.dataGridView1.DataSource = dt.DefaultView; } catch (Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message); } finally { conn.Close(); } } }}
=========================== option 3
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Data.SqlClient;using System.Drawing;using System.Text;using System.Windows.Forms;namespace ABMprueba{ public partial class Form1 : Form { private SqlConnection conn; public Form1() { conn = new SqlConnection(); conn.ConnectionString = "Server=MBESTEIRO;Database=prue;User ID=sa;Password=barza04;Application Name=ABMPrueba"; InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { try { conn.Open(); SqlCommand cmd = conn.CreateCommand(); cmd.CommandType = CommandType.Text; cmd.CommandText = "insert into a values ('John');"; int recordsAffected = cmd.ExecuteNonQuery(); } catch (Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message); } finally { conn.Close(); } } }}
Using the DTS Wizard, on the Choose a Data Source screen, I pick the following:
Data Source: Microsoft ODBC Drive for Oracle Server: Username: Password:
I don't know what I should put into the other fields, given what I have above, i.e. what to put in for Server, Username, and Password! Or should I use a different procedure to import this Oracle data? I am almost positive I was not supplied the username/password. I was told I could connect given the above TNS information. What do you all recommned?
I am trying to switch between oracle and sqlserver databases to read the source data. I have used a parameter file to specify the connection parameters. For SQLserver the connection looks like in the file as below:
The error which i get when running from oracle source is this:
Information: 0x40016041 at Package: The package is attempting to configure from the XML file "C:oraTOsql-DataTXIntegration Services Project1Integration Services Project1Integration Services Project1 estConfig.dtsConfig". SSIS package "Package.dtsx" starting. Information: 0x4004300A at Data Flow Task, DTS.Pipeline: Validation phase is beginning. Error: 0xC0202009 at Package, Connection manager "dl.PM_DW": An OLE DB error has occurred. Error code: 0x80040E21. An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040E21 Description: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.". Error: 0xC020801C at Data Flow Task, OLE DB Source [1]: The AcquireConnection method call to the connection manager "dl.PM_DW" failed with error code 0xC0202009. Error: 0xC0047017 at Data Flow Task, DTS.Pipeline: component "OLE DB Source" (1) failed validation and returned error code 0xC020801C. Error: 0xC004700C at Data Flow Task, DTS.Pipeline: One or more component failed validation. Error: 0xC0024107 at Data Flow Task: There were errors during task validation. SSIS package "Package.dtsx" finished: Failure. The program '[7264] Package.dtsx: DTS' has exited with code 0 (0x0).
Please let me know if you guys have any suggestion in what i am doing wrong.