SQL Connection Fails

Apr 13, 2004

Hello,





I'm trying to get a handel on ASP.NET and I've put together a new SQL connection to display a view inside of a datagrid.





When I go to run it (before or after compile) I get the error:





------------------------------------------------------------------------------------------------------





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()








--------------------------------------------------------------------------------








Here is the connection string I am using:





Me.SqlConnection1.ConnectionString = "workstation id=MyWorkstation;packet size=4096;integrated security=SSPI;data source=MyServer;" & _


"persist security info=False;initial catalog=Northwind"





-------------------------------------------------------------------------------





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:





Me.SqlConnection1.ConnectionString = "user id=aspnet;password=;workstation id=MyWorkstation;packet size=4096;integrated security=SSPI;data source=MyServer;" & _


"persist security info=False;initial catalog=Northwind"





Any ideas?





Thanks,


Dale

View 2 Replies


ADVERTISEMENT

Package Fails When I Use ODBC Connection (Fails On SQL Server Agent, OK In Visual Studio)

Jun 11, 2007

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:

dtexec /f "C:Program FilesMicrosoft SQL Server90DTSPackagesIntegration Services Project estcom.dtsx"
pause

Why it's not running with SQL Server Agent???

View 7 Replies View Related

SQL Connection In Vista With Trusted Connection Fails Under Local System Account Until Reboot

Mar 4, 2008

Hi All,

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?

Any help or thoughts greatly appreciated.

View 2 Replies View Related

Db Connection Fails In C#

Feb 1, 2006

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?

View 2 Replies View Related

OLE DB Connection Fails....!

May 9, 2008

Dear All,

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)

but it fails when i try to create.

what am I missing, in your opinion.....???

Thanks,

View 1 Replies View Related

Connection To Sql Server Fails

Sep 17, 2005

Hi

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


Thanks

View 3 Replies View Related

VB6 ADO Connection To SQL Server 2K5 Fails

Dec 21, 2006

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.

Thanks for any help.

View 1 Replies View Related

Report Connection Fails With DNS Name

Apr 3, 2007

Hi,

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.

View 2 Replies View Related

BDE Connection Via ODBC To MS SQL Server Fails

May 4, 2006

Hi,

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,

Thanks.

View 4 Replies View Related

OLE DB Connection Fails; Native Client Does Not

Feb 4, 2008

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.

Thoughts?

Possibly related: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=96732

View 1 Replies View Related

First Connection After SQLServer Restart Fails

Dec 3, 2007

Hello everybody.

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(); } } }}

View 7 Replies View Related

Login Fails: No Connection To SQL Express 2005

May 2, 2007

Hello
 
I have copied my web site to the default folder on IIS 5.1 (I am using XP Pro), and now when i run the app, i get to the login page and after hitting "Login" button the page refreshes and clears the fields but no error message.
I am not sure what to do.
 
 

View 2 Replies View Related

Known Good Data Connection In VWDEE Fails...

Mar 3, 2008

Hi All: Not sure what's causing this problem...
I have a win2k webserver running FPSE and .NET 2.0 on a private subnet (192.168.x.x). The webserver connects to a separate SQL 2005 server running win2003 on the same subnet.
I have an alias on the webserver pointing to the dB server, and in web.config I'd have a connection string like: 
<connectionStrings>
<add name="webConnectionString" connectionString="Data Source=sql2005serveralias;Initial Catalog=webdB;Persist Security Info=True;User ID=webUser;Password=webPWD;Network Library=dbmssocn"providerName="System.Data.SqlClient" />
</connectionStrings>
 That connection string, as is, works...pages on the website connect to the server fine.
If, however, I open the website in VWD2005 from a remote location (using FPSE over HTTP), and try to create a new page with a sql data connector, using the existing connection string in the web.config, I can't connect to the database. I get a  "TCP Provider, error: 0 ...database is not accessible" type of error.
Is this because I'm outside the subnet, and my local copy of VWD is trying to connect to the server on "192.168.x.x" and of course can't? If so, is the only way to work off the server is to VPN into the firewall and thereby get a local IP address assigned to my computer?

View 1 Replies View Related

Sql Connection Fails With Integrated Security=SSPI

Apr 9, 2008

I am using windows impersonation in a CLR that is retrieving folder structure. In order to use impersonation I need to pass the windows credential to the SQL server so I am trying to use "integrated security=SSPI" and I also tried "integrated security=true" as well with the same result...I get the error: Login failed for user ''. The user is not associated with a trusted SQL Server connection.
The SQL Server and IIS are located in different un-trusted domain. I am however able to connect to the SQL Server using user id and password. In my web.config file:
<add name="ConnectionName1" connectionString="Data Source=IpAddress,Port#;Initial Catalog=DatabaseName;Integrated Security=true;persist security info=False; Trusted_Connection=Yes;" providerName="System.Data.SqlClient"/> à Doesn’t work
<add name="ConnectionName2" connectionString="Data Source=IpAddress,Port#;Initial Catalog=DatabaseName;uid=user;pwd=password;" providerName="System.Data.SqlClient"/> Ã WorksBased on the error message it looks like there is no user passed to the SQL server.
What am I missing? At this point I am thankful for any input…
 
 

View 5 Replies View Related

HTTP Connection From Iis Fails But Works From Excel

May 20, 2008

Hi,

I can use Http connection to Analysis Services 2005 from Excel but when I try to use IIS it fails.
AS and IIS are on different machines and not in the same domain.


In the event log of the server with AS i can see following event:


Event Type: Information
Event Source: MSOLAP ISAPI Extension: \?C:Inetpubwwwrootolapmsmdpump.dll
Event Category: (269)
Event ID: 10
Date: 5/20/2008
Time: 10:17:02 AM
User: N/A
Computer: *******
Description:
The description for Event ID ( 10 ) in Source ( MSOLAP ISAPI Extension: \?C:Inetpubwwwrootolapmsmdpump.dll ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: .


I assume it's permission issue. Excel and IIS must be using different user to connect to AS. I tried with different authentication methods on the iis but without success.

How can I make IIS connect with proper permissions?

Dariusz

View 1 Replies View Related

Same Connection String Succeeds From XP, Fails On Vista

Jul 12, 2007

From an XP machine I can get a connection using a Widnows Authentication connection string:



oConnection.ConnectionString="Driver={SQL Server};SERVER=RANDY3PPServer;DATABASE=PPData;UID=;PWD=;"
ret=oConnection.Open



from the Vista machine hosting SQL server express the same connection string fails, but succeeds if the database is changed to master



oConnection.ConnectionString="Driver={SQL Server};SERVER=RANDY3PPServer;DATABASE=master;UID=;PWD=;"

ret=oConnection.Open


How can this be and how do I fix it?

View 3 Replies View Related

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.

View 4 Replies View Related

ODBC Connection Fails From Cluster Node

May 22, 2007

I had a stand alone sql server that I upgraded to a cluster. I have an odbc connection called my_connection. The odbc test works fine. When I call the dsn from a php script it fails with this message:



Warning: odbc_connect(): SQL error: [Microsoft][ODBC SQL Server Driver][DBNETLIB
]SQL Server does not exist or access denied., SQL state 08001 in SQLConnect in D
:storage est.php on line 3
Could not connect to my_connection!



This same script works fine from any other computer. Is there an issue with connecting to a virtual server from the node via ODBC? Is there something I need to change in the client protocols?



Thanks in advance.

View 6 Replies View Related

Linkserver Connection Fails Between SqlServer 2005 And Oracle 10g

Jun 18, 2007

This is what I did:



The instructions for changing the registry entries per previous MSDN postings were:

For Windows 2000
Oracle

8.1 [HKEY_LOCAL_MACHINESOFTWARE
MicrosoftMSDTCMTxOCI]
"OracleXaLib"="oraclient8.dll"
"OracleSqlLib"="orasql8.dll"
"OracleOciLib"="oci.dll"

Changed the registry entries on my WindowsXP machine:


entry name old value new values
"OracleXaLib" xa80.dll oraclient10.dll
"OracleSqlLib" sqllib80.dll orasql10.dll
"OracleOciLib" oci.dll oci.dll



Then created the Linkserver definition:



EXEC sp_addlinkedserver 'ORA10G', 'ORACLE', 'MSDAORA', 'ORA10G'
Command(s) completed successfully.

EXEC sp_addlinkedsrvlogin 'ORA10G', 'FALSE',NULL, 'scott', 'tiger'

Command(s) completed successfully.

Note:

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.



Thank you.

View 15 Replies View Related

Remote Connection To SSIS Fails With Access Is Denied

May 24, 2007

I'm new to SSIS and I'm having problems getting a remote connection to the SSIS service using Management Studio on my workstation. If I terminal Service onto the Server I have no problems connecting to SSIS, but if I try to connect remotely I get the "Access is denied" error message. I have completed the following steps:


To configure rights for remote users on Windows Server 2003 or Windows XP
1. If the user is not a member of the local Administrators group, add the user to the Distributed COM Users group. You can do this in the Computer Management MMC snap-in accessed from the Administrative Tools menu.
2. Open Control Panel, double-click Administrative Tools, and then double-click Component Services to start the Component Services MMC snap-in.
3. Expand the Component Services node in the left pane of the console. Expand the Computers node, expand My Computer, and then click the DCOM Config node.
4. Select the DCOM Config node, and then select MsDtsServer in the list of applications that can be configured.
5. Right-click on MsDtsServer and select Properties.
6. In the MsDtsServer Properties dialog box, select the Security tab.
7. Under Launch and Activation Permissions, select Customize, then click Edit to open the Launch Permission dialog box.
8. In the Launch Permission dialog box, add or delete users, and assign the appropriate permissions to the appropriate users and groups. The available permissions are Local Launch, Remote Launch, Local Activation, and Remote Activation. The Launch rights grant or deny permission to start and stop the service; the Activation rights grant or deny permission to connect to the service.
9. Click OK to close the dialog box. Close the MMC snap-in.
10. Restart the Integration Services service.


But I still get the Access is denied error from my workstation??



I have Power User rights on the server and I'm a sysadmin in the database instance. The SSIS packages I am trying to access are stored in the database. If I add myself to the local administrators group on the server I CAN get remote access, but this is not an acceptable solution in our production environment.



Thanks for any help



View 3 Replies View Related

SQLConnect To SQL Server Fails When Connection Intialized From A Service

Mar 8, 2006

I have an
issue where SQL Server is refusing a connection that is initiated from
within a Windows service. The connection is attempted using the
SQLConnect ODBC function (yes I know there are newer and better things
out there but I'm stuck with ODBC for now ). SQLConnect returns
SQL_ERROR and the error code that is returned is:

28000

Invalid authorization specification
The value specified for the argument UserName or the value specified for the argument Authentication violated restrictions defined by the data source.

Now
it sounds like a username/password problem but when we attempt a
connection to the same server via a non-service program, everything
works fine (using the same username/password). We thought it might be
an ODBC issue at first but we can connect to a MySQL server using the
same programs/services just fine.

Checking the SQL Server setup, we do have both Windows accounts and SQL Server authentication enabled (under Security tab).

Anyone have any ideas?

thanks!
-Pete

View 10 Replies View Related

JDBC Connection Fails After Windows Server 2003 SP2

Apr 3, 2007

In testing new patches, I tried Windows 2003 Server SP2 and our JDBC connections stopped working. I uninstalled SP2 and they started working again. Anyone know where the problem is?



I have already read pages of documentation, but I will keep looking. Please let me know if you know the setting that needs to be changed. I'm assuming it is a new "security enhancement" but I'm just not sure exactly where.



Thanks in advance.

Hugh

View 8 Replies View Related

Connection Fails In Linking SQL Server 2005 Tables Into Access Using DAO 3.51

Aug 21, 2006

Hi,

I have an app that creates and attaches tables from SQL Server into an Access mdb using an ODBC link from VB6 using DAO 3.51 on Windows 2000. Recently I upgraded to SQL Server Express edition and tested it. It worked fine against the Express Edition. So, I installed SQL Server 2005 Standard Edition on our Server hoping that they operate identically. How wrong one can be! the same code that worked against Express Edition does not work on Standard Edition.

It is strange that the App works for about 5 seconds which attaches about 38 tables and after that the connection drops and I have a hell of a time to get the rest of the tables linked. The error that comes up is:

Connection failed:
SQLState: '01000'
SQL Server Error: 10060
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionOpen (connect()).
Connection failed:
SQLState: '08001'
SQL Server Error: 11
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]General network error. Check your network documentation.

The PC that I am using to connect is in a different domain to the Server where the SQL Server database resides. I thought that domains might be the reason. But even joining the PC to the same domain as the server still does not work and behaves the same. So I do not think it is a domain related issue.

I have also looked at the SQL Server and database configurtaions. I cannot see anywhere any specific time out of around 5 seconds. Even the time out through the SQL Server ODBC driver is set to 30 seconds by default as far as I know. So, it looks like there is a time out somewhere but I am absolutely confused as to where this 5 second time out is comming from.

I also thought permissions on the database or tables might be the issue but after looking at the database and table permissions, they all look OK. The user has prettymuch the same access as the SA on the database.

Has anybody came across this problem? If so, I appreciate if someboday can give me a hint as to where I can start.

Thanks,

View 3 Replies View Related

Applying The Snapshot For Merge Rep Fails Everytime Because Connection Is Reset?

May 14, 2007

Hi guys, Im desperately hoping someone here can help me. Ive been trying to set up merge replication between 2 servers all weekend and it keeps failing. Im setting this up as follows
The Publisher/Distributor is a SQL Server 2005 machine, the database being replicated is 4gb, and the only subscriber is a SQL Server 2000 SP4 machine. I set up my publication normally, and set up the push subscription, adn set it to initialize immediately. It weill then start bulk copying and go on for about 3-4 hours before it fails and gives me the errors:

Error messages:
The merge process was unable to deliver the snapshot to the Subscriber. If using Web synchronization, the merge process may have been unable to create or write to the message file. When troubleshooting, restart the synchronization with verbose history logging and specify an output file to which to write. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147201001)
Get help: http://help/MSSQL_REPL-2147201001
The process could not bulk copy into table '"dbo"."CONTENT"'. (Source: MSSQL_REPL, Error number: MSSQL_REPL20037)
Get help: http://help/MSSQL_REPL20037
An existing connection was forcibly closed by the remote host. (Source: MSSQLServer, Error number: 0)
Get help: http://help/0
One or more BLOB columns could not be sent to the server, attempt to recover from the problem failed. (Source: MSSQLServer, Error number: 0)
Get help: http://help/0
Communication link failure (Source: MSSQLServer, Error number: 0)
Get help: http://help/0
Unspecified error (Source: MSSQLServer, Error number: 0)
Get help: http://help/0
Failed to send batch after max errors (Source: MSSQLServer, Error number: 0)




This is driving me crazy as I havent slept in ages trying to get this fixed. Anyone have any idea whats going on? Its always one of 2 tables so far that keep failing, ContactLog and Content, what can I do?

View 3 Replies View Related

Excel Connection Manager Fails When Package Called Programatically

Jan 25, 2008

I've put together a SSIS package that, once a user uploads an Excel spreadsheet from a webpage, grabs it, does a mess of calculations and spits it out into a datareader (this last part is tricky, but I haven't even gotten to this point yet). In BIDS, the package works fine. Run using the 32-bit version of dtexec, it runs fine. But when I try to call it from the page, I keep getting an error. The errors look familiar enough that I'm thinking it's due to the package trying to run 64-bit, and that not playing nicely with Excel. If that's true, is there an easy way to force the 32-but version to be used? I've already set the project properties to Run64BitRuntime = false, which I'd hoped would help. but no luck.

Here's the code I'm using:




Code Snippet
string pkg = @"pathpackage.dtsx";
Application app = new Application();
Package p = app.LoadPackage(p, null);
Variable varFileName = p.Variables["strExcelFileName"];
varFileName.Vaue = strFileName;
Variable varFilePath = p.Variables["strExcelFilePath"];
varFilePath.Value = strFilePath;

DTSExecResult dte = p.Execute();

Error handling

p.Dispose();




And it kicks out the following:

-1071636471
TestReports_UploadTestReport
Connection manager "Excel Connection Manager"
Microsoft.SqlServer.Dts.Runtime.DtsError0{8BDFE898-E9D8-4D23-9739-DA807BCDC2AC}
SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040154. An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040154 Description: "Class not registered".
-1071611876
DFT - Upload spreadsheet to dataset
Excel Source [1]
Microsoft.SqlServer.Dts.Runtime.DtsError0dtsmsg.rll{8BDFE893-E9D8-4D23-9739-DA807BCDC2AC}
SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
-1073450985
DFT - Upload spreadsheet to dataset
DTS.Pipeline
Microsoft.SqlServer.Dts.Runtime.DtsError0dtsmsg.rll{8BDFE893-E9D8-4D23-9739-DA807BCDC2AC}
component "Excel Source" (1) failed validation and returned error code 0xC020801C.
-1073450996
DFT - Upload spreadsheet to dataset
DTS.Pipeline
Microsoft.SqlServer.Dts.Runtime.DtsError0dtsmsg.rll{8BDFE893-E9D8-4D23-9739-DA807BCDC2AC}
One or more component failed validation.
-1073594105
DFT - Upload spreadsheet to dataset

View 3 Replies View Related

SQL Server Job Fails When SSIS Package Is Having Excel Connection On 64 Bit Machine

May 29, 2008

Hello,

I've SQL Server running on 64 bit. When I schedule a package to run every night which has excel data transformation, it fails. Initally I had a problem running through BIDS also but then I found in project properties you can switch this off by specifying property Run64BitRuntime by false. After going through some forums, many have suggested that when scheduling a package, modify the command arguments to run as 32bit runtime. These command argumnents can be generated from making use of tool DTExecUI.exe Even after using generated command arguments from this tool, it doesn't help.

Below is my command argument and the error message generated.

/FILE "D:DevDWLoadAll.dtsx"
/CONFIGFILE "D:DevDWdevCongig.dtsConfig"
/CONNECTION "customers.dtsx";"D:DevDWcustomers.dtsx"
/CONNECTION "Addresses.dtsx";"D:DevDWAddresses.dtsx"
/CONNECTION "Counties.dtsx";"D:DevDWCounties.dtsx"
/CONNECTION "Countries.dtsx";"D:DevDWCountries.dtsx"
/CONNECTION "ExcelLoad.dtsx";"D:DevDWExcelLoad.dtsx"
/CONNECTION Test;""Data Source=TestDW;Initial Catalog=TestStagingDW;Provider=SQLNCLI.1;Integrated Security=SSPI;Auto Translate=False;"" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING E



Message
Executed as user: DWUserSQLServiceAcc. ...0.3042.00 for 64-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 00:05:00 Error: 2008-05-28 00:06:02.31 Code: 0xC0202009 Source: Excel Load Connection manager "Excel Connection Manager" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040154. An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040154 Description: "Class not registered". End Error Error: 2008-05-28 00:06:02.31 Code: 0xC020801C Source: Copy Data Excel Source [5052] Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed. End... The package execution fa... The step failed.

Any suggestions???

Circuit

View 3 Replies View Related

DB Engine :: Connection To Server Instance From SSMS Fails Without Specifying Port

Oct 27, 2015

connecting to a SQL Server Instance. I have a SQL server DB on a server having an Instance not running on the default port. Let's say ServerAInstanceA has the services exposed on Port 12345. When I'm trying to connect to ServerAInstanceA without specifying the port number, while I can connect from one client machine (ClientA), I am unable to connect from a different client machine (ClientB).On a side note, when I provide the port number, I can connect both from clients A and B. My question is, when I do not provide the port number, why is one client machine able to connect while the other isn't?

View 4 Replies View Related

SQL 2012 :: Client Connection Fails But Then User Is Prompted To Select Server

Apr 7, 2015

We have a database residing on a SQL Server 2012 Express system running under Windows Server 2012. I have installed the SQL 2012 Native Client on the user's workstation. I created the System DSN with the required settings and when I test the connection all tests pass. I am able to ping the server as well as connect to it via SQL Server Management Studio.

Now when the user launches the application he is presented with the dialog window as in Screenshot1 (see attached). After clicking on Ok he is next presented with the dialog window where he has to select the SQL server. See attached Screenshot2. The user selects the SQL server from the drop down list and he is then able to access the application and work normally. I cannot understand why this is happening because I have included the correct server instance in the DSN settings i.e. sqlserversqlexpress

Telling the user to select the server himself is not an option for us.

I have checked the settings on the SQL Server. TCP/IP is enabled, remote connections are allowed and there is no firewall blocking. Port 1433 has been set as the default port to use.

View 6 Replies View Related

Object Explorer Connection Fails - Failed To Retrieve Data.......SmoEnum)

Oct 17, 2006

Hi

First up - my apologies if this is not the right forum for this question. Please let me know if there is a more appropriate one for this question.

I have come across an issue with my SQL Server 2005 Express Edition install. It has been running fine since the install (a few months back). And I can still interact (query, update etc) the databases just fine. However, SQL Management Server Studio Express has started to produce an error message when I attempt to connect the Object Explorer.

The error message is shown below.

I have tried to access the link shown in the error message but there is no information provided there.

I can use SQL Management Server Studio Express to run queries on the databases so it would appear that the underlying services are all running OK.

The SQL Server is installed using SQL Authentication only and I have not made any changes to Service accounts or the services themselves. The protocols all appear to be in order too - Shared Memory, Named Pipes, TCP/IP are all enabled.

I have restarted the SQL services and even rebooted the machine, but to no avail.

I would really appreciate if anyone out there could give me some guidance on what may be causing this issue.

Note: The SQL Server is installed on WinXP Pro SP2 running in a VirtualPC. All apps are release versions (no beta or CTP)





TITLE: Microsoft SQL Server Management Studio Express
------------------------------

Failed to retrieve data for this request. (Microsoft.SqlServer.Express.SmoEnum)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)

------------------------------

A severe error occurred on the current command. The results, if any, should be discarded.
A severe error occurred on the current command. The results, if any, should be discarded. (Microsoft SQL Server, Error: 0)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=0&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------

View 10 Replies View Related

Execute Package Task Often Fails For FlatFile Connection -- Very Hard To Troubleshoot

Jul 18, 2007



I have a simple parent package that calls 3 small simple child packages (child1, child2, and child3). Each child package does nothing but contains a FlatFile connection. I run these 3 child packages in parallel inside parent package. The parent package fails sometimes (i.e. sometimes success, but sometimes failed). And the failure is replicable.

I would like to send you all of 4 simplest packages via email if anyone is interested in helping out.



Here is the error info




Code Snippet

SSIS package "parent.dtsx" starting.

Executing ExecutePackageTask: C:SSISDasLoaderchlid3.dtsx

Executing ExecutePackageTask: C:SSISDasLoaderchld2.dtsx

Executing ExecutePackageTask: C:SSISDasLoaderchild1.dtsx

Error: 0xC0014005 at : The connection type "FLATFILE" specified for connection manager "_MedicalClaimServiceLine_070713_161742152820" is not recognized as a valid connection manager type. This error is returned when an attempt is made to create a connection manager for an unknown connection type. Check the spelling in the connection type name.

Error: 0xC0010018 at : Error loading value "<DTS:ConnectionManager xmlns:DTS="www.microsoft.com/SqlServer/Dts"><DTS:Property DTS:Name="DelayValidation">0</DTS:Property><DTS:Property DTS:Name="ObjectName">_MedicalClaimServiceLine_070713_161742152820</DTS:Property><DTS:Property DTS:Name="DTSID">{CA12C" from node "DTS:ConnectionManager".

Error: 0xC00220DE at child2: Error 0xC0010014 while loading package file "C:SSISDasLoaderchld2.dtsx". One or more error occurred. There should be more specific errors preceding this one that explains the details of the errors. This message is used as a return value from functions that encounter errors.

.

Task failed: child2

Warning: 0x80019002 at parent: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (3) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.

Information: 0x40016042 at chlid3: The package is attempting to configure from the parent variable "z".

Information: 0x40016042 at child1: The package is attempting to configure from the parent variable "x".

Information: 0x4004300A at Data Flow Task, DTS.Pipeline: Validation phase is beginning.

Information: 0x4004300A at Data Flow Task, DTS.Pipeline: Validation phase is beginning.





View 5 Replies View Related

AcquireConnection Method Call Fails When Scheduling A Job With Excel Connection Manager?

May 9, 2006

I have a SSIS package that reads the data from an Excel file using an Excel Connection Manager and imports the data to a table on a SQL Server 2005 DB instance.

When I run this package locally on the server the package being on the file system, the package executes perfectly. Now I upload the package to the msdb database and the run the package from there and the package still executes successfully.

Now I schedule the package to run as a SQL Server Agent job and the package fails and when the logging is enabled I see this in the log file;

OnError,WEB-INTSQL,NT AUTHORITYSYSTEM,Copy to CRN-ALLOCATION_COMMENTS_TEMP,{40A6BF6E-7121-448B-A49D-DED58FDC746A},{BD991566-F4BD-41BC-AEBF-264032D8D0D3},5/9/2006 1:54:52 PM,5/9/2006 1:54:52 PM,-1071611876,0x,The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009.

OnError,WEB-INTSQL,NT AUTHORITYSYSTEM,Copy to CRN-ALLOCATION_COMMENTS_TEMP,{40A6BF6E-7121-448B-A49D-DED58FDC746A},{BD991566-F4BD-41BC-AEBF-264032D8D0D3},5/9/2006 1:54:52 PM,5/9/2006 1:54:52 PM,-1073450985,0x,component "Allocation Comments" (1) failed validation and returned error code 0xC020801C.

I am wondering why the AcquireConnection method call is failing when the package is scheduled? I am running the step as a SQL Agent Service Account and it is the Local System account that starts up the SQL Server Agent and Server and is an Administrator on the box.

Any inputs will be much appreciated.

Thanks,

M.Shah

View 7 Replies View Related

SQL Server 2000 Standard Edition - Distribution Agent Dieing When Network Connection Fails

May 21, 2007

Hi,


We have replication setup on a sql server 2000. We encountered issue that the distribution agent goes down (distrib.exe stop running) in the event of network connection broken. We would like to know:

is this the expected result that the distribution agent will go down in the event of communication failure between the distribution server and subscriber server?
if not, is there a way to programmatically control and restart the agent?
Is there any sp in SQL server which can monitor the replication communication error message?
is there any sp in SQL server which can be run to restart the agent?
For the best practice, what do you think we can do to achieve an €˜event-driven€™ kind of mechanism so when an communication breaks, the agent can be restarted by the triggered event (or at least a simple way to automatically restart)?



Thanks

Bill

View 3 Replies View Related

Inserting Image Data Fails With Connection Broken (SQL Server 2000 And SQL Native Client)

May 28, 2008

Dear all,

we have tables with many image columns. We fill these image columns via ODBC and SQLPutData as described in MSDN etc (using SQL_LEN_DATA_AT_EXEC(...), calling SQLParamData and sending the data in chunks of 4096 bytes when receiving SQL_NEED_DATA).

The SQLPutData call fails under the following conditions with sqlstate 08S01

- The database resides on SQL Server 2000
- The driver is SQL Native Client
- The table consists e.g. of one Identity column (key column) and nine image columns
- The data to be inserted are nine blocks of data with the following byte size:


1: 6781262
2: 119454

3: 269
4: 7611

5: 120054

6: 269

7: 8172

8: 120054

9: 269
The content of the data does not matter, (it happens also if only zero bytes are written), nor does the data origin (file or memory).

All data blocks including no 7 are inserted. If the first chunk of data block 8 should be written with SQLPutData the function fails and the connection is broken. There are errors such as "broken pipe" or "I/O error" depending on the used network protocol.

If data no 7 consists of 8173 bytes instead of 8172 all works again.
(Changing the 4096 chunk size length does not help)

Has anybody encountered this or a similar phenomenon?

Thank you

Eartha

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved