Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS SQL Server






SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





First Connection After SQLServer Restart Fails


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 Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
Linkserver Connection Fails Between SqlServer 2005 And Oracle 10g
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 Replies !   View Related
How Often To Restart SQLServer/tempdb
If the only way to truncate the tempdb fully is to stop SQLServer, how often should this be done? OK I know it depends on your system and the amount of up time, but...

Is there a better way of truncating the tempdb, without stopping SQLServer?

Thanks, Neil.

View Replies !   View Related
Restart Of SqlServer 2000 Local Or Remote Causes 2nd Exception
Hi All,Im testing error handling on my website and if I stop my local sql server 2000 then run the web app, I get a SqlException which is good, but when I restart the sql server then I get a System.InvalidOperationException that will not go away. ( its coming from a ExecuteScalar() call)  This happens on my remote database as well.It also happens if I kill the connection on my remote machine then reconnect.  after I reconnect I can access the database using dbvis so I know its there.Am I not clearing something after the first error?  If I restart the machine all is well.Thanks in advance for you help!-Keith

View Replies !   View Related
Visual Studio 2005 The Remote Connection To The Device Has Been Lost. Please Verify The Device Connection And Restart Debugging.
Basically I've been using Visual Studio 2005 for a few weeks now moving a Pocket PC project from 2003 to 2005. When I hit the Start Debugging Button every time until today the project would rebuild and deploy to my pocket PC allowing me to debug etc but now I get

The remote connection to the device has been lost.

Please verify the device conection and restart debugging.

I used to get this problem in VS2003 sometimes and just like the numerous posts on different sites that I've looked at the problem eventually goes away and I'm none the wiser. One guy said that he found that if he went to bed the problem was resolved when he came back!

My PDA running Windows 2003 2nd Edition is directly connected to my PC via a USB port. I've rebooted my PC and done a soft reset on the PDA but it didn't help. I'm using ActiveSync 4.1.

Does anyone know how to resolve this problem?

View Replies !   View Related
Package Fails When I Use ODBC Connection (Fails On SQL Server Agent, OK In Visual Studio)
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 Replies !   View Related
SQL Connection In Vista With Trusted Connection Fails Under Local System Account Until Reboot
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 Replies !   View Related
[help]:SQLServer 2000 Setup Fails!
Dear All:
I receive the error with _INS5576._MP.exe when i installed sqlserver 2000
pls help me to solve this problem

Thanks

View Replies !   View Related
SQLServer And SQL Browser Fails To Start With An Event ID 7000
I just finished installing SQL Server 2005 Express including the Toolkit.

During installtaion I selected instance name  as SQLExpress.

I cannot start SQLServer nor SQL Browser services and reports Event ID 7000 with a message Path not found.

Although, the entire installation ran error free. I am running Winodws XP Professional w/SP2 and up-to date patches. Please help!

yaj

View Replies !   View Related
Db Connection Fails In C#
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 Replies !   View Related
SQL Connection Fails
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 Replies !   View Related
ADO Connection Fails
I have an intermittent problem in a ADO application that cannot
connec to a SQL 7.0 server. The error message is similar to,
" USER 'null' is not a trusted login id user etc...... ".
Then a login box appears with the ' trusted connection' option
already selected. If I deselect it and try a standatd login with
a non-existant login id, obviously it fails. But then the interesting
thing is, if I select the' trusted connection ' option again in
the same login box, the connection thsi time is successful.

Any help from any body please?


Thanks.

Ranjit

View Replies !   View Related
TCP/IP Connection To SQL 7.0 Fails
Hi,

Recently I read in a listserver message about the bug BUG #: 56445 which causes the TCP/IP connection
to SQL 7.0 SP1 servers to fails and that a fix has been relased. I could however not find any reference
to this bug neither in MSDN not in TechNet. Has anybody seen this anywhere?


Thanks.

Ranjit

View Replies !   View Related
OLE DB Connection Fails....!
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 Replies !   View Related
ASP / SQLServer Connection
Hi, I'm having trouble connecting to SQLServer in my ASP program.here's the code<%dim objConnection, ObjRecorSet, strConnection, strOut, objCmd, objParametersSet objConnection = Server.CreateObject ("ADODB.Connection")strConnection = "DSN=SQL_Tracker;Database=Tracker;UID=sa;PWD=;"objConnection.Open strConnection....%>I'm getting this error on the line that opens the connection.Error Type:Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user'HOMEIUSR_HOME'./Tracker/list_team.asp, line 11Notes:I've set up the DSN called 'SQL_Tracker' in my ODBC settings.When I use the Test Connection button it's successful.The SQL Server is running on my own computer, and so I havefull DBA rights on itany ideas what's wrong?

View Replies !   View Related
Sqlserver Db2 Connection
Hi,
I have a project to do. It is a web application. Web client will connect to sqlserver and sqlserver connect to db2 (AS400). But i don't know how can i connect 2 database. If you have any solution pls contact me.

db2 version 5.1

Thanks.

mtoptan@prosisyazilim.com.tr

View Replies !   View Related
ODBC Connection Fails
I am attempting to connect to Altiris Deployment Server through ODBC and this is the error I get:

Microsoft SQL Server ODBC Driver Version 03.70.1146

Running connectivity tests...

Attempting connection
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]General network error. Check your network documentation.

TESTS FAILED!

I am connecting through a workstation shortcut. Funny thing is when I log onto the server that is actually running DS the ODBC connection connects immediately. Soemthing tells me it is a rights issue but I can not seem to isolate the problem.

Any help with this problem is greatly appreciated!

Thanks again! griedel :(

View Replies !   View Related
Report Connection Fails With DNS Name
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 Replies !   View Related
VB6 ADO Connection To SQL Server 2K5 Fails
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 Replies !   View Related
Connection To Sql Server Fails
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 Replies !   View Related
SqlServer Connection Error
Hi
 Iam Fed up with sqlconnection open error. Can Any one help me in isolating the problem.
I am creating a asp.net application .
I want to pull the data from sql server and display in a grid.
The sql server is running in a different machine.(connected thru lan)
The IIS and application is running in one machine
For the sqlconnectionstring i have given it as like this
server=POO01;uid=sa;pwd=newsql;database=CPI_CIVIL_TRANS;
I Get an error as "sql server does not exists or access denined"
I search google for this problem , but could not find a solution.
Iam struck up with the work because of the problem.
Thanks In Advance For help.
Jai Ganesh.J
 

View Replies !   View Related
Not Associated With Trusted Sqlserver Connection
i was got this error when i am trying to connecting to my local sql server
any one to help me how i can do to solve this problem

-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~


Login failed for user 'ASPNET'. Reason: Not associated with a trusted SQL Server connection.
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~

View Replies !   View Related
Sqlserver Connection String
I have to supply a sqlserver connection string in the format:

ip address:port, how do i go about finding out what the port number is on the sqlserver server ??? This is for an R25 collegent interface connection, if that helps .

View Replies !   View Related
SQLSERVER Connection Problem
Hi,

Server Details : Serv

Windows 2003 sp1
SQL SERVER 2005 with Mixed Mode Authentication
Server not in domain.

Client Details : cli1

Windows XP prof
SQL Server 2005 Express - Mixed Mode Authentication



I am able to connect serv from cli1 using SQL Authentication sa. But I am not able to use windows autherntication and login the server

The connection explorer always says cli1 system windows credentials if I select windows authentication. So iam not able to enter serv systems username and password if I select windows authentication

Why I am trying the above:

I am installing BTS 2006 where I have to specify the server credentials where my Database is located.

if I give serv details it is failing. Eventhough I am able to connect serv/sqlserver using sa login, BTS installation fails with sa loging of serv.

[img src="d:BTSInstallatin.GIF][/img]


Kindly do the needful. It's very urgent.

Please let me know if you need any extra info



Thanks

Vijay

View Replies !   View Related
Connection Pooling Login Fails
Setup:
    Environment: ASP.NET application running on Windows Server 2003 and using SQL Server 2000.
Problem:
    I can log into the app and run through a few
database hits (via user interaction), but around the 4th or 5th time a
sql connection is created I recieve a "Login Failed for user" error
(See top portion of Error Stack Below).  I am including the user
id and password in the connection string (until I migrate to Staging,
at which point I will change to impersonation) and I am using the
Microsoft Data Access Block to retrieve my datasets (so I am pretty
sure that all connections are being closed appropriately). 
    System.Data.SqlClient.SqlException:
Login failed for user 'testuser'.

   at
System.Data.SqlClient.ConnectionPool.CreateConnection()

   at
System.Data.SqlClient.ConnectionPool.UserCreateRequest()

   at
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean&
isInTransaction)

Question:

Does anybody have any ideas as to what could generate this error?  Thanks in advance for your time.

View Replies !   View Related
BDE Connection Via ODBC To MS SQL Server Fails
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 Replies !   View Related
OLE DB Connection Fails; Native Client Does Not
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 Replies !   View Related
Sqlserver 2005 Does Not Allow Remote Connection
I am using the VB 2005 login controls in a web application together with a wizard created sqlserver 2005 database stored in the application's appData directory. The controls work ok on my local development computer but when I deploy the application to a web hosting server (ASP.Net) I get the following error message when using any of the log-in controls:
 An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Any suggestions on how to eliminate this error? Thanks for your help.
 Ken McLean

View Replies !   View Related
Connection String For MS SQLServer 2000
For nearly 6 wks I have been trying to workout with GoDaddy.com a connection string that will connect to the SQL Server 2000 from my ASP.Net web application.  In my programming, I have placed the connection string in the web.config file and then call it from there within code behind using the SQLConnection object.  My web.config entry has the following form:
<appSettings>
<add key="Conn" value="server=GoDaddyserver;integrated security=SSPI;database=databaseonGoDaddyserver;" />
</appSettings>I have also written the key supplying the UID and pwd.  Nothing works and their support is of no help.Has anyone else had this difficulty either in general or with GoDaddy in particular?

View Replies !   View Related
Connection String OLEDB - SqlServer
I need to conect my software from a remote client to a server, mystandard connection:Provider=SQLOLEDB.1;Persist Security Info=False;UserID=sa;Password=;Initial Catalog=MyDb;DataSource=192.168.0.100;Network=DBMSSOCN;andProvider=SQLOLEDB.1;Persist Security Info=False;UserID=sa;Password=;Initial Catalog=MyDb;DataSource=192.168.0.100;Network=DBNMPNTW;make a error connection,i have tryed with ODBC connection and its OK only in Named Piped.Can any one help me write the right connection string?thanksrm

View Replies !   View Related
Very Strange Behavior Of SQLServer With Connection From CGI
Hello,I developed a win32 .exe CGI that connects to a clustered SQLServer toreport some data.The software is written with Borland C++Builder.This is the oledb string:Name=Provider=SQLOLEDB;Password=xxx;Persist Security Info=True;UserID=xxxx;Data Source=xxxxx;Initial Catalog=xxxxx;NetworkLibrary=dbmssocnIt suddendly stopped working on my customer network, so I made sometest and I verivied that the problem is on the connection withSQLServer: my test program just opens a connection, closes it andexits, reporting in a log file if the open was successful or failed.If I run the program locally, just launching it, no problem, it works.I can run it mutilple time continuosly and is connects every time.If I run the program through my webserver, as a CGI that's how it issupposed to work (http:\localhostscriptsconnect.exe), it connectsthe first time, and then I have to wait 40 seconds to connect againsuccessfully, or it fails.If I try against MY sqlserver on my laptop or on my network no 40 secproblems, but on my customer network, with THEIR SQLServer , if I tryto connect from their webserver, or from my laptop webserver, I havethis 40sec problem.I analyzed the network traffic, and I discovered that when I run mytest program locally it originates only TCP/IP packets, and SQLServeranswers only with TCP/IP.But when I use it from the webserver as a CGI, it originates an UDPpacket, then SQL answers with another UDP packet, and then theycommunicate over TCP/IP.This when it works: the second time my program continues to send theUDP packet, but it receives no answer, and fails the communication.I can only say that:- we haven't touched the program for months, and it really stoppedworking suddendly, so I suspect that something in my customer netowrkhas changed- I tried many different OLEDB strings, disabling connection poolingand all the services, calling the SQLServer by name or IP...- the problem can't be related to my program, because now is reallyjust an oledb connection testAnyone have an idea?Thank you very much,Mattia

View Replies !   View Related
Problem Connection Jdeveloper To Sqlserver
When I try to connect sqlserver to jdeveloper I have message :
[Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.[Microsoft][SQLServer 2000 Driver for JDBC]Connection refused: connect

Connection
Driver class : com.microsoft.jdbc.sqlserver.SQLServerDriver
Url : jdbc:microsoft:sqlserver://GEO-TEST-SQL:1433

Can you help me please?

View Replies !   View Related
Connection To SqlServer Not Responding Or Very Slow
I am trying to connect sql server on my local system to view databases, or any server on LAN. But Enterprise Manager is not responding to show me databases. Even my application takes a long time to get connection to database. Would you please help me out. That where is the problem?

View Replies !   View Related
Sqlserver 2000 Connection In Proxy
Hi
I have a vb application which connects to online sql server for fetching few data. Problem occurs if the sysetm where my application runs is behind a proxy or firewall.In this case it is not connecting, gives connection error.
I have made sure that my online sqlserver has port 1433 open.

Do i need to do anything in connection code for my application(which is behind a proxy) to connect to online sql server.

My connection string looks like this

connstring= "Provider=SQLOLEDB;Password=" & pass & ";User ID=" & user & ";Initial Catalog=" & initcata & ";Data Source=" & ip & ";Internet Security=SSPI"

Please advice

Santhosh

View Replies !   View Related
Changing DB Connection From SqlServer To Oracle
Hi

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:

<?xml version="1.0"?><DTSConfiguration><DTSConfigurationHeading><DTSConfigurationFileInfo GeneratedBy="abvsh" GeneratedFromPackageName="Package" GeneratedFromPackageID="{8A304BF7-5325-4079-9D92-2B9BBF8793AA}" GeneratedDate="1/23/2007 4:46:08 PM"/></DTSConfigurationHeading><Configuration ConfiguredType="Property" Path="Package.Connections[dl.PM_DW].Properties[ConnectionString]" ValueType="String"><ConfiguredValue>Data Source=dl;Initial Catalog=PM_DW;Provider=SQLNCLI.1;Integrated Security=SSPI;Auto Translate=False;</ConfiguredValue></Configuration><Configuration ConfiguredType="Property" Path="Package.Connections[dl.PM_DW].Properties[Description]" ValueType="String"><ConfiguredValue></ConfiguredValue></Configuration><Configuration ConfiguredType="Property" Path="Package.Connections[dl.PM_DW].Properties[InitialCatalog]" ValueType="String"><ConfiguredValue>PM_DW</ConfiguredValue></Configuration><Configuration ConfiguredType="Property" Path="Package.Connections[dl.PM_DW].Properties[Name]" ValueType="String"><ConfiguredValue>dl.PM_DW</ConfiguredValue></Configuration><Configuration ConfiguredType="Property" Path="Package.Connections[dl.PM_DW].Properties[Password]" ValueType="String"><ConfiguredValue></ConfiguredValue></Configuration><Configuration ConfiguredType="Property" Path="Package.Connections[dl.PM_DW].Properties[ProtectionLevel]" ValueType="Int32"><ConfiguredValue>1</ConfiguredValue></Configuration><Configuration ConfiguredType="Property" Path="Package.Connections[dl.PM_DW].Properties[RetainSameConnection]" ValueType="Boolean"><ConfiguredValue>0</ConfiguredValue></Configuration><Configuration ConfiguredType="Property" Path="Package.Connections[dl.PM_DW].Properties[ServerName]" ValueType="String"><ConfiguredValue>dl</ConfiguredValue></Configuration><Configuration ConfiguredType="Property" Path="Package.Connections[dl.PM_DW].Properties[UserName]" ValueType="String"><ConfiguredValue></ConfiguredValue></Configuration></DTSConfiguration>

the pacakge runs fine. But when i change the connection to Oracle, it gives me error.

The config file looks like when i put oracle connection is as follows:

<?xml version="1.0"?><DTSConfiguration><DTSConfigurationHeading><DTSConfigurationFileInfo GeneratedBy="I2vshrivas" GeneratedFromPackageName="Package" GeneratedFromPackageID="{8A304BF7-5325-4079-9D92-2B9BBF8793AA}" GeneratedDate="1/23/2007 4:46:08 PM"/></DTSConfigurationHeading><Configuration ConfiguredType="Property" Path="Package.Connections[dl.PM_DW].Properties[ConnectionString]" ValueType="String"><ConfiguredValue>Data Source=pm62;User ID=pcm_62;Provider=OraOLEDB.Oracle.1;Persist Security Info=True;</ConfiguredValue></Configuration><Configuration ConfiguredType="Property" Path="Package.Connections[dl.PM_DW].Properties[Description]" ValueType="String"><ConfiguredValue></ConfiguredValue></Configuration><Configuration ConfiguredType="Property" Path="Package.Connections[dl.PM_DW].Properties[InitialCatalog]" ValueType="String"><ConfiguredValue></ConfiguredValue></Configuration><Configuration ConfiguredType="Property" Path="Package.Connections[dl.PM_DW].Properties[Name]" ValueType="String"><ConfiguredValue>dl.PM_DW</ConfiguredValue></Configuration><Configuration ConfiguredType="Property" Path="Package.Connections[dl.PM_DW].Properties[Password]" ValueType="String"><ConfiguredValue></ConfiguredValue></Configuration><Configuration ConfiguredType="Property" Path="Package.Connections[dl.PM_DW].Properties[ProtectionLevel]" ValueType="Int32"><ConfiguredValue>1</ConfiguredValue></Configuration><Configuration ConfiguredType="Property" Path="Package.Connections[dl.PM_DW].Properties[RetainSameConnection]" ValueType="Boolean"><ConfiguredValue>0</ConfiguredValue></Configuration><Configuration ConfiguredType="Property" Path="Package.Connections[dl.PM_DW].Properties[ServerName]" ValueType="String"><ConfiguredValue>i2pm62</ConfiguredValue></Configuration><Configuration ConfiguredType="Property" Path="Package.Connections[dl.PM_DW].Properties[UserName]" ValueType="String"><ConfiguredValue>pcm_62</ConfiguredValue></Configuration></DTSConfiguration>

 

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.

Thanks,

Vipul

View Replies !   View Related
Connection To Oracle / Sqlserver / Db2 Databases
Hi All,

Is there a way in SSIS to change the database connection to sqlserver or oracle or db2 without choosing the connection manager in the source.

For e.g. I ran a package which is reading data from sqlserver and later i want to connect to oracle to read the data but without changing the connection manager in the source.

Basically, i want to find out from you gurus is about a way to switch between databases without changing the connection managers. OR the only way is to make different sets of packages for oracle / db2 and sqlserver sources ?

Thanks,

Vipul

View Replies !   View Related
Question About SQLServer Connection Script
I have been asked to write a script to hit about 50 SQLServer databases to check the individual status of those dbs. and i need help to write this script.

what i need to do is.

1. hit sqlserver#1 and hit all the databases from that box and see whether the sqlserver dbs are
ok or are suspect. if they are anything else other then OK then I send an email via sendfile.
2. hit sqlserver#2 and continue doing this.

is this possible? do anyone of you know how i can do this programatically via a job or have a script that I can use?


I have both SQL2k and SQL2k5

thanks

View Replies !   View Related
Connection To SQLServer 2005 Express
Hi to all GURUS,

I am very (almost two days) new to SQL Server Express (in fact SQL Server). In my old applications I am using VB.Net 2005 Express with MS Access database and now I wants to go for SQL Server Express.

One thing I am unable to find till now is : if SQLServer Express is installed on my Server machine (say ServerPC) with attached database (say MyDB.mdf), how I can access it through ADO.Net 2.0 from client machine. (using VB.Net Express)

Thanks and hope you will encourge me to use SQL Server .

View Replies !   View Related
Known Good Data Connection In VWDEE Fails...
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 Replies !   View Related
Login Fails: No Connection To SQL Express 2005
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 Replies !   View Related
Connection To Oracle Fails When Using SQLNET.AUTHENTICATION_SERVICES = (NTS)
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 Replies !   View Related
Same Connection String Succeeds From XP, Fails On Vista
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 Replies !   View Related
HTTP Connection From Iis Fails But Works From Excel
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 Replies !   View Related
ODBC Connection Fails From Cluster Node
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 Replies !   View Related
BulkCopy Object Gets SQLServer Connection Error
I am using the Bulk Copy object to move some data from an SQL Server 2005 audit table to Teradata (NCR) data table.  We are using the Terdata .NET data provider which seems to work.
We have used the Bulk copy to BulkCopy data from Teradata into SQL Server 2005 with no problems.
 We are getting an error "ERROR: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) "
We have tested the SQL data reader by inserted a do while drAudit.read - loop in the code and it reads the rows from the SQL Server table.
We have been using the SQL server connection for 9 months now and change all the defaultconnection to allow for IP and remote connections.  This is only happening with the BulkCopy object.
If anyone has any suggestions or a direction it would be greatly appreciated., the sample code is show belowssample code
-----------------------------------------------------------------------
            '*--- Read current audit information from SQL server            dbNSA = DatabaseFactory.CreateDatabase("nsasqlConnectionString")            Dim sSQL As String = "select * from auditTrack where AuditID > " & lLast            cmdSQLAudit = dbNSA.GetSqlStringCommand(sSQL)            cmdSQLAudit.CommandType = Data.CommandType.Text            '*--- Get a DataReader back (On [dnNSA] database [ExecuteReader] using the [cmdSQLAudit] command )            Dim drSQLAudit As SqlDataReader = dbNSA.ExecuteReader(cmdSQLAudit)            'Dim i As Integer = 0            'Do While drSQLAudit.Read            ' i = i + 1            ' Loop            '            '*--- Create the bulk copy objects            '*--- Open the Teradata as the Bulk copy destination database                       Dim bulkcopy As New SqlBulkCopy(jdwConnectString)            '*--- Name the table to load data into            bulkcopy.DestinationTableName = "AuditTrack"            '*--- Read the SQL server audit  data and copy intoTeradata version of the same table            '*    NOTE: The (Teradata AuditTrack) table has the same NAMED columns as the SQL Server            '*    table does.  This avoid the requirement of a (BulkCopy) Column transform            bulkcopy.BulkCopyTimeout = 600            bulkcopy.WriteToServer(drSQLAudit)       <--- Error happens here after ab 10-15 seconds delay
 

View Replies !   View Related
AspX Page Connection Error Using Sqlserver
Dear i am using visual studio.net.......... when i connect database (in sqlserver) using sqldataAdapter with datagrid in visual basic.net every thing work properly........... but when i use the same in asp.net then i get an error message on the resultant explorer page give below.


Server Error in '/studentData' Application.
--------------------------------------------------------------------------------

Login failed for user 'RAMIZSARDARASPNET'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'RAMIZSARDARASPNET'.

Source Error:


Line 85: 'Put user code to initialize the page here
Line 86: Dim ds As New DataSet()
Line 87: SqlDataAdapter1.Fill(ds)
Line 88: DataGrid1.DataSource = ds.Tables(0)
Line 89: DataGrid1.DataBind()


Source File: c:inetpubwwwrootstudentDataWebForm1.aspx.vb Line: 87

Stack Trace:


[SqlException: Login failed for user 'RAMIZSARDARASPNET'.]
System.Data.SqlClient.SqlConnection.Open()
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
System.Data.Common.DbDataAdapter.Fill(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)
studentData.WebForm1.Page_Load(Object sender, EventArgs e) in c:inetpubwwwrootstudentDataWebForm1.aspx.vb:87
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.0.3705.0; ASP.NET Version:1.0.3705.0


Plz solve my problem and Reply me on ramiz_ch@hotmail.com
Plz solve my problem and Reply me on ramiz_ch@hotmail.com
Plz solve my problem and Reply me on ramiz_ch@hotmail.com

Ramiz

View Replies !   View Related
Package Abort If Sqlserver Connection Failed
Hello,

I am connecting with various sqlservers in a package to get the information. If connection failed with any sqlserver, package failed after 3 tries.

I would like that if connection failed with any sqlserver, package should not end rather move ahead.

I already tried to increase the number of error from 3 to 1000 but still package failed as soon sqlserver connection failed.

Any help is appreciated.

Thanks.

View Replies !   View Related
SQLServer 2005 - SP2 - Connection Pool Issues
Hi,
 
I have recently installed SP2 for SQLServer 2005 and started to have connection pool issues. I have tried to explicitly mention the pool settings in connection string and yet pooling doesn't seem to work. I have one more box with no service packs applied and is pooling is perfect!. Has any one experienced this??
 
Thank you,
 
Viswanath Ivatury

View Replies !   View Related

Copyright © 2005-08 www.BigResource.com, All rights reserved