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


ADVERTISEMENT

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

How Often To Restart SQLServer/tempdb

Sep 30, 1998

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 3 Replies View Related

Restart Of SqlServer 2000 Local Or Remote Causes 2nd Exception

May 17, 2006

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 2 Replies View Related

Visual Studio 2005 The Remote Connection To The Device Has Been Lost. Please Verify The Device Connection And Restart Debugging.

Jun 19, 2006

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 54 Replies View Related

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

[help]:SQLServer 2000 Setup Fails!

Jan 9, 2004

Dear All:
I receive the error with _INS5576._MP.exe when i installed sqlserver 2000
pls help me to solve this problem

Thanks

View 13 Replies View Related

SQLServer And SQL Browser Fails To Start With An Event ID 7000

May 14, 2006

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 4 Replies View Related

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

Sqlserver Db2 Connection

Jul 24, 2004

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 2 Replies View Related

ASP / SQLServer Connection

Jul 20, 2005

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 2 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

SqlServer Connection Error

Jul 19, 2006

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 5 Replies View Related

Not Associated With Trusted Sqlserver Connection

Aug 14, 2004

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 2 Replies View Related

SQLSERVER Connection Problem

Jun 5, 2007

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 1 Replies View Related

Sqlserver Connection String

Mar 6, 2007

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 3 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

Sqlserver 2005 Does Not Allow Remote Connection

Jan 27, 2007

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 2 Replies View Related

Connection String For MS SQLServer 2000

Aug 31, 2005

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 15 Replies View Related

Connection To SqlServer Not Responding Or Very Slow

Jan 16, 2002

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 1 Replies View Related

Connection To SQLServer 2005 Express

Oct 10, 2006

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 1 Replies View Related

Connection String OLEDB - SqlServer

Jul 23, 2005

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 2 Replies View Related

Very Strange Behavior Of SQLServer With Connection From CGI

Jul 23, 2005

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 1 Replies View Related

Question About SQLServer Connection Script

Jun 19, 2007

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 2 Replies View Related

Changing DB Connection From SqlServer To Oracle

Jan 23, 2007

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 3 Replies View Related

Connection To Oracle / Sqlserver / Db2 Databases

Jan 23, 2007

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 2 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







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