Tuesday, March 27, 2012
Error encountered when creating a new datasource
I am new with the Reporting services.
When I tried creating a data source with the following connection string
with the following options:
Conenction Type: SQLServer or OLE DB
Connect using: credentials supplied by the user running the report)
Connection String:
Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial
Catalog=Northwind;Data Source=venkat-wxp2;Use Procedure for Prepare=1;Auto
Translate=True;Packet Size=4096;Workstation ID=VENKAT-WXP2;Use Encryption for
Data=False;Tag with column collation when possible=False
I get the following error:
The underlying connection was closed: Could not establish trust relationship
with remote server.
I am on a standalone Windows 2003 Server named venkat-wxp2.
Any help will be appreciated. Thanks in advance.
VenkiTry a simple connection string first and see if it works.
Initial Catalog=Northwind;Data Source=venkat-wxp2;
--
| Thread-Topic: Error encountered when creating a new datasource
| thread-index: AcVrkf5jtPegPMTmTqyEkHE51Kcf9A==| X-WBNR-Posting-Host: 24.56.142.17
| From: "=?Utf-8?B?dnZlbms=?=" <vvenk@.discussions.microsoft.com>
| Subject: Error encountered when creating a new datasource
| Date: Tue, 7 Jun 2005 11:52:03 -0700
| Lines: 28
| Message-ID: <577C1F19-4A5B-4E75-B15D-C81CFDD9BD9D@.microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.reportingsvcs
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.reportingsvcs:45474
| X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
|
| Hello:
|
| I am new with the Reporting services.
|
| When I tried creating a data source with the following connection string
| with the following options:
| Conenction Type: SQLServer or OLE DB
| Connect using: credentials supplied by the user running the report)
| Connection String:
|
| Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial
| Catalog=Northwind;Data Source=venkat-wxp2;Use Procedure for
Prepare=1;Auto
| Translate=True;Packet Size=4096;Workstation ID=VENKAT-WXP2;Use Encryption
for
| Data=False;Tag with column collation when possible=False
|
| I get the following error:
|
| The underlying connection was closed: Could not establish trust
relationship
| with remote server.
|
| I am on a standalone Windows 2003 Server named venkat-wxp2.
|
| Any help will be appreciated. Thanks in advance.
|
| Venki
|
|
|
||||Brad:
Yes, I did try the simpler connection string. I encounter the same issue.
Thanks.
venki
""Brad Syputa - MS"" wrote:
> Try a simple connection string first and see if it works.
> Initial Catalog=Northwind;Data Source=venkat-wxp2;
> --
> | Thread-Topic: Error encountered when creating a new datasource
> | thread-index: AcVrkf5jtPegPMTmTqyEkHE51Kcf9A==> | X-WBNR-Posting-Host: 24.56.142.17
> | From: "=?Utf-8?B?dnZlbms=?=" <vvenk@.discussions.microsoft.com>
> | Subject: Error encountered when creating a new datasource
> | Date: Tue, 7 Jun 2005 11:52:03 -0700
> | Lines: 28
> | Message-ID: <577C1F19-4A5B-4E75-B15D-C81CFDD9BD9D@.microsoft.com>
> | MIME-Version: 1.0
> | Content-Type: text/plain;
> | charset="Utf-8"
> | Content-Transfer-Encoding: 7bit
> | X-Newsreader: Microsoft CDO for Windows 2000
> | Content-Class: urn:content-classes:message
> | Importance: normal
> | Priority: normal
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> | Newsgroups: microsoft.public.sqlserver.reportingsvcs
> | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
> | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
> | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.reportingsvcs:45474
> | X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
> |
> | Hello:
> |
> | I am new with the Reporting services.
> |
> | When I tried creating a data source with the following connection string
> | with the following options:
> | Conenction Type: SQLServer or OLE DB
> | Connect using: credentials supplied by the user running the report)
> | Connection String:
> |
> | Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial
> | Catalog=Northwind;Data Source=venkat-wxp2;Use Procedure for
> Prepare=1;Auto
> | Translate=True;Packet Size=4096;Workstation ID=VENKAT-WXP2;Use Encryption
> for
> | Data=False;Tag with column collation when possible=False
> |
> | I get the following error:
> |
> | The underlying connection was closed: Could not establish trust
> relationship
> | with remote server.
> |
> | I am on a standalone Windows 2003 Server named venkat-wxp2.
> |
> | Any help will be appreciated. Thanks in advance.
> |
> | Venki
> |
> |
> |
> |
>|||While I do not know the cause of your error, a good article to read is at :
http://www.awprofessional.com/articles/article.asp?p=357694&rl=1
--
| Thread-Topic: Error encountered when creating a new datasource
| thread-index: AcVrvSNw13tsTe+nTPeEUMl0Hpblcw==| X-WBNR-Posting-Host: 24.56.142.17
| From: "=?Utf-8?B?dnZlbms=?=" <vvenk@.discussions.microsoft.com>
| References: <577C1F19-4A5B-4E75-B15D-C81CFDD9BD9D@.microsoft.com>
<btNl$X6aFHA.2476@.TK2MSFTNGXA01.phx.gbl>
| Subject: RE: Error encountered when creating a new datasource
| Date: Tue, 7 Jun 2005 17:00:53 -0700
| Lines: 71
| Message-ID: <12ECD0E6-E614-4932-96D5-1AEF2B80B125@.microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.reportingsvcs
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.reportingsvcs:45502
| X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
|
| Brad:
|
| Yes, I did try the simpler connection string. I encounter the same issue.
|
| Thanks.
|
| venki
|
| ""Brad Syputa - MS"" wrote:
|
| > Try a simple connection string first and see if it works.
| >
| > Initial Catalog=Northwind;Data Source=venkat-wxp2;
| > --
| > | Thread-Topic: Error encountered when creating a new datasource
| > | thread-index: AcVrkf5jtPegPMTmTqyEkHE51Kcf9A==| > | X-WBNR-Posting-Host: 24.56.142.17
| > | From: "=?Utf-8?B?dnZlbms=?=" <vvenk@.discussions.microsoft.com>
| > | Subject: Error encountered when creating a new datasource
| > | Date: Tue, 7 Jun 2005 11:52:03 -0700
| > | Lines: 28
| > | Message-ID: <577C1F19-4A5B-4E75-B15D-C81CFDD9BD9D@.microsoft.com>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.public.sqlserver.reportingsvcs
| > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.sqlserver.reportingsvcs:45474
| > | X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
| > |
| > | Hello:
| > |
| > | I am new with the Reporting services.
| > |
| > | When I tried creating a data source with the following connection
string
| > | with the following options:
| > | Conenction Type: SQLServer or OLE DB
| > | Connect using: credentials supplied by the user running the report)
| > | Connection String:
| > |
| > | Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial
| > | Catalog=Northwind;Data Source=venkat-wxp2;Use Procedure for
| > Prepare=1;Auto
| > | Translate=True;Packet Size=4096;Workstation ID=VENKAT-WXP2;Use
Encryption
| > for
| > | Data=False;Tag with column collation when possible=False
| > |
| > | I get the following error:
| > |
| > | The underlying connection was closed: Could not establish trust
| > relationship
| > | with remote server.
| > |
| > | I am on a standalone Windows 2003 Server named venkat-wxp2.
| > |
| > | Any help will be appreciated. Thanks in advance.
| > |
| > | Venki
| > |
| > |
| > |
| > |
| >
| >
||||Brad:
I just de-installed SQL Server 2000 and installed SQL Server 2005 instead
and I was able to create a datasource.
Thanks.
""Brad Syputa - MS"" wrote:
> While I do not know the cause of your error, a good article to read is at :
> http://www.awprofessional.com/articles/article.asp?p=357694&rl=1
> --
> | Thread-Topic: Error encountered when creating a new datasource
> | thread-index: AcVrvSNw13tsTe+nTPeEUMl0Hpblcw==> | X-WBNR-Posting-Host: 24.56.142.17
> | From: "=?Utf-8?B?dnZlbms=?=" <vvenk@.discussions.microsoft.com>
> | References: <577C1F19-4A5B-4E75-B15D-C81CFDD9BD9D@.microsoft.com>
> <btNl$X6aFHA.2476@.TK2MSFTNGXA01.phx.gbl>
> | Subject: RE: Error encountered when creating a new datasource
> | Date: Tue, 7 Jun 2005 17:00:53 -0700
> | Lines: 71
> | Message-ID: <12ECD0E6-E614-4932-96D5-1AEF2B80B125@.microsoft.com>
> | MIME-Version: 1.0
> | Content-Type: text/plain;
> | charset="Utf-8"
> | Content-Transfer-Encoding: 7bit
> | X-Newsreader: Microsoft CDO for Windows 2000
> | Content-Class: urn:content-classes:message
> | Importance: normal
> | Priority: normal
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> | Newsgroups: microsoft.public.sqlserver.reportingsvcs
> | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
> | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
> | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.reportingsvcs:45502
> | X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
> |
> | Brad:
> |
> | Yes, I did try the simpler connection string. I encounter the same issue.
> |
> | Thanks.
> |
> | venki
> |
> | ""Brad Syputa - MS"" wrote:
> |
> | > Try a simple connection string first and see if it works.
> | >
> | > Initial Catalog=Northwind;Data Source=venkat-wxp2;
> | > --
> | > | Thread-Topic: Error encountered when creating a new datasource
> | > | thread-index: AcVrkf5jtPegPMTmTqyEkHE51Kcf9A==> | > | X-WBNR-Posting-Host: 24.56.142.17
> | > | From: "=?Utf-8?B?dnZlbms=?=" <vvenk@.discussions.microsoft.com>
> | > | Subject: Error encountered when creating a new datasource
> | > | Date: Tue, 7 Jun 2005 11:52:03 -0700
> | > | Lines: 28
> | > | Message-ID: <577C1F19-4A5B-4E75-B15D-C81CFDD9BD9D@.microsoft.com>
> | > | MIME-Version: 1.0
> | > | Content-Type: text/plain;
> | > | charset="Utf-8"
> | > | Content-Transfer-Encoding: 7bit
> | > | X-Newsreader: Microsoft CDO for Windows 2000
> | > | Content-Class: urn:content-classes:message
> | > | Importance: normal
> | > | Priority: normal
> | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> | > | Newsgroups: microsoft.public.sqlserver.reportingsvcs
> | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
> | > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
> | > | Xref: TK2MSFTNGXA01.phx.gbl
> microsoft.public.sqlserver.reportingsvcs:45474
> | > | X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
> | > |
> | > | Hello:
> | > |
> | > | I am new with the Reporting services.
> | > |
> | > | When I tried creating a data source with the following connection
> string
> | > | with the following options:
> | > | Conenction Type: SQLServer or OLE DB
> | > | Connect using: credentials supplied by the user running the report)
> | > | Connection String:
> | > |
> | > | Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial
> | > | Catalog=Northwind;Data Source=venkat-wxp2;Use Procedure for
> | > Prepare=1;Auto
> | > | Translate=True;Packet Size=4096;Workstation ID=VENKAT-WXP2;Use
> Encryption
> | > for
> | > | Data=False;Tag with column collation when possible=False
> | > |
> | > | I get the following error:
> | > |
> | > | The underlying connection was closed: Could not establish trust
> | > relationship
> | > | with remote server.
> | > |
> | > | I am on a standalone Windows 2003 Server named venkat-wxp2.
> | > |
> | > | Any help will be appreciated. Thanks in advance.
> | > |
> | > | Venki
> | > |
> | > |
> | > |
> | > |
> | >
> | >
> |
>
Error during Synchronization
While synchronizing data between the PDA and MS SQL Server database, using Active Sync connection, the sync process fails at times and displays an empty error message box and occasionally it shows the following exception:
Error During Synchronization:
A native exception occurred.
ExceptionCode:0xc0000005
ExceptionAddress:0x01627b28
Reading: 0x1e000000
OK to terminate
CANCEL to debug
Moreover the .SDF file on the PDA gets corrupted. The ActiveSync connection drops as soon as the sync process fails. Later when the .SDF file is deleted and restored the synchronization is successful.
Note: The replication monitor in the SQL Server indicates that the synchronization was successful even when the above error occurs.
========================================================
** Sample code where the app crashes we encounter the issue:
Public Sub Synchronize (ByVal vShowMessage As Boolean)
Dim ce As SqlCeReplication = Nothing
Try
ce = New SqlCeReplication
'Set Internet properties.
ce.InternetUrl = vInternetURL ' "http://xx.xx.xx.xx/SQLCE/sscesa20.dll"
'Set Publisher properties.
ce.Publisher = vPublisher
ce.PublisherLogin = vPublisherLogin '"sa"
ce.PublisherPassword = vPublisherPassword '"xxxxxx"
ce.PublisherSecurityMode = SecurityType.DBAuthentication
ce.PublisherNetwork = NetworkType.DefaultNetwork
ce.PublisherDatabase = vPublisherDatabase
ce.Publication = vPub_Name
'Set Subscriber properties.
ce.Subscriber = vSub_Name
ce.SubscriberConnectionString = "Data Source=" & DB_PATH & vDatabase_Name
If File.Exists(DB_PATH & vDatabase_Name) = False Then
ce.AddSubscription(AddOption.CreateDatabase)
End If
ce.Synchronize()
Catch ex As SqlCeException
If vShowMessage = True Then
MsgBox(ex.Message)
End If
Throw ex
Catch ex1 As Exception
If vShowMessage = True Then
MsgBox(ex1.Message)
End If
Throw ex1
Finally
ce = Nothing
End Try
End Sub
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=96703
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=96832
Thanks,
Laxmi NRO, MSFT, SQL Mobile
Error during Synchronization
While synchronizing data between the PDA and MS SQL Server database, using Active Sync connection, the sync process fails at times and displays an empty error message box and occasionally it shows the following exception:
Error During Synchronization:
A native exception occurred.
ExceptionCode:0xc0000005
ExceptionAddress:0x01627b28
Reading: 0x1e000000
OK to terminate
CANCEL to debug
Moreover the .SDF file on the PDA gets corrupted. The ActiveSync connection drops as soon as the sync process fails. Later when the .SDF file is deleted and restored the synchronization is successful.
Note: The replication monitor in the SQL Server indicates that the synchronization was successful even when the above error occurs.
========================================================
** Sample code where the app crashes we encounter the issue:
Public Sub Synchronize (ByVal vShowMessage As Boolean)
Dim ce As SqlCeReplication = Nothing
Try
ce = New SqlCeReplication
'Set Internet properties.
ce.InternetUrl = vInternetURL ' "http://xx.xx.xx.xx/SQLCE/sscesa20.dll"
'Set Publisher properties.
ce.Publisher = vPublisher
ce.PublisherLogin = vPublisherLogin '"sa"
ce.PublisherPassword = vPublisherPassword '"xxxxxx"
ce.PublisherSecurityMode = SecurityType.DBAuthentication
ce.PublisherNetwork = NetworkType.DefaultNetwork
ce.PublisherDatabase = vPublisherDatabase
ce.Publication = vPub_Name
'Set Subscriber properties.
ce.Subscriber = vSub_Name
ce.SubscriberConnectionString = "Data Source=" & DB_PATH & vDatabase_Name
If File.Exists(DB_PATH & vDatabase_Name) = False Then
ce.AddSubscription(AddOption.CreateDatabase)
End If
ce.Synchronize()
Catch ex As SqlCeException
If vShowMessage = True Then
MsgBox(ex.Message)
End If
Throw ex
Catch ex1 As Exception
If vShowMessage = True Then
MsgBox(ex1.Message)
End If
Throw ex1
Finally
ce = Nothing
End Try
End Sub
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=96703
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=96832
Thanks,
Laxmi NRO, MSFT, SQL Mobilesql
Wednesday, March 21, 2012
error creating mdf - Connection to SQL server files (*.mdf) require SQL express 2005 to...
Connection to SQL server files (*.mdf) require SQL express 2005 to function properly. please verify the installation of the component or download fromhttp://go.microsoft.com/fwlink/?linkid=49251
I AM GOING TO RIP MY HAIR OUT WITH THIS PROBLEM. I have reinstalled both sql server express 2005 and VWD about 5 times with the same problem. please, please, please someone throw me a bone here and help me resolve this problem.
When I create a new EMPTY website and I rightclick on my website in the solution explorer and choose add item, I chooe SQL Database, I give it a name 'database.mdf' and click add. I get the following message:
you are attempting to add a database to an asp.net application. for a database to be gfenerally consumable in your site, it should be placed inside the 'app_data' folder. would you like to place the database inside the 'app_data' folder? I click YES (I know this message is normal)
then I get the following message:
Connection to SQL server files (*.mdf) require SQL express 2005 to function properly. please verify the installation of the component or download fromhttp://go.microsoft.com/fwlink/?linkid=49251
I can add anything else but this damn mdf file.
thanks for all your help in advance.
FYI to anyone who has had this problem and cannot find a resolution. I have found the solution in a another forum:
Not yet rated
Rating:
Thanks Jeffrey, the problem turned out to be a problem in Visual Studio
with an incorrect setting.
What I did was go into Tools, Options, Database Tools, Data Connections.
UnderSQLServer Instance Name (blank for default) i had the following
in there: MyComputerName\SQLEXPRESS
I changed it to the following: SQLEXPRESS
I also tested it just leaving it blank and working too.
Of course I would love to say a favorite end user quote "I never changed
it", but I'm too geeky to know that.
Happy Coding!
Brian Piesik
Thanksbigdbingo, for this valuable post
Monday, March 19, 2012
Error create a second independent transaction inside a CLR stored procedure?
But I need to commit some data in every case. So I need to create a second transaction which is independent from the calling transaction.
What is the best way to do this inside a CLR procedure?
Thanx a lot
Hi!
Create another connection to the server and create a transaction on this second connection. Please note that since your main connection is inproc (“context connection=true” in the connection string), the second connection should be non-inproc (network. Of cause, you can connect to the same server.).
|||Thank you,I tried this already. But I got an error when I call BeginTransaction on the second connection. When I remember correctly it as "Transcation already in use by another session". I call the procedure from t-sql inside a begin tran block
Any idea about that?
I will try to build a small example an post it here.|||
Hello,
I made a small example to reproduce the error.
CLR procedure
<Microsoft.SqlServer.Server.SqlProcedure()> _
Public Shared Sub Test(ByVal sConnectString As String)
Dim t As SqlClient.SqlTransaction = Nothing
Dim c As SqlClient.SqlConnection = Nothing
c = New SqlClient.SqlConnection(sConnectString)
c.Open()
t = c.BeginTransaction()
t.Commit()
c.Close()
End Sub
T-SQL caller:
begin tran
execute Test 'Server=(local);database=cpwerx;user Id=sa;password=xyz'
commit tran
Error:
A .NET Framework error occurred during execution of user defined routine or aggregate 'Cas':
System.Data.SqlClient.SqlException: Transaction context in use by another session.
System.Data.SqlClient.SqlException:
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.TdsExecuteTransactionManagerRequest(Byte[] buffer, TransactionManagerRequestType request, String transactionName, TransactionManagerIsolationLevel isoLevel, Int32 timeout, SqlInternalTransaction transaction, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.PropagateTransactionCookie(Byte[] cookie)
at System.Data.SqlClient.SqlInternalConnection.EnlistNonNull(Transaction tx)
at System.Data.SqlClient.SqlInternalConnection.Enlist(Transaction tx)
at System.Data.SqlClient.SqlInternalConnectionTds.Activate(Transaction transaction)
at System.Data.ProviderBase.DbConnectionInternal.ActivateConnection(Transaction transaction)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
Hi!
Modify your connection string so that it has "Enlist=false" in it. Otherwise the connection inherits current transaction.
More on "Enlist" option is in doc on SqlConnection.ConnectionString property
|||Than you!
We've been stuck for a week. We had a .Net CLR stored procedure that worked locally but, failed when invoked remotely. That connection string setting is exactly what we needed.
-Joe
Error Could establish connection to the database
Hi,
I encounter few errors when I try to create a login page using tool in Microsoft Visual Studio 2005, please refer to below :
'--------------------------
When I try to configure the setting for Provider Configuration in the ASP.NET Website Administration Tool using Select a single provider for all site management data or Select a different provider for each feature (advanced) options, the error 'Could not establish a connection to the database' appear.
I have tried to run aspnet_regsql to configure the server and database and return to this tool to configure the Provider configuration but the same error 'Could not establish a connection to the database.' appear.
When I click the Security Configuration link in ASP.NET Configuration, the error as shown below appear :
'There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the below button to be redirected to a page where you can choose a new data store.
The following message may help in diagnosing the problem: An error has occured while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact under the default settings SQL Server does not allow remote connections.(provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)'
When I try to choose Data Store in the Security Configuration screen(Figure 4), the same error('Could not establish a connection to the database') appear.
I also have tried to configure the SQL Server Surface Area Configuration but the same error still appear….
Is there any other configuration I need to set before I can create this login page?
Thank you.
Hi Vickie,
Based on the errors, have you verified that you can manually connect to the data source with the connection string information you are using? You can use the information at this link to see if the 'role manager' feature is enabled,http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/paght000013.asp. And, you can use this link to verify that your server will allow remote connections,http://support.microsoft.com/kb/265808/en-us. I hope this helps.
~des
Friday, March 9, 2012
Error connectiong to database
I am designing a webpage with the DbNetGrid control on it. I am folloing
its documentation and using the following connection string to connect the
grid control to a database:
'Provider=SQLOLEDB;Driver={SQL
Server};Server=(local);Database=pubs;Tru
sted_Connection=yes;'
But DbNetGrid keeps giving me the following error. I have tried different
variations of this connection string but nothing seems to work.
[Microsoft][ODBC Driver Manager] Data source name not found and no default
driver specified (-2147467259)
Thanks.helpful sql wrote:
> Hi,
> I am designing a webpage with the DbNetGrid control on it. I am folloin
g
> its documentation and using the following connection string to connect the
> grid control to a database:
> 'Provider=SQLOLEDB;Driver={SQL
> Server};Server=(local);Database=pubs;Tru
sted_Connection=yes;'
> But DbNetGrid keeps giving me the following error. I have tried different
> variations of this connection string but nothing seems to work.
> [Microsoft][ODBC Driver Manager] Data source name not found and no default
> driver specified (-2147467259)
You have to create ODBC Data Source object as the message states.
Look for Data Sources icon in the Control Panel/Administrative Tools.
Then use its name in the connection string.|||Not neccessarily.
http://www.connectionstrings.com
And no need really to cross-post so much!
Jeff
"Sericinus hunter" <serhunt@.flash.net> wrote in message
news:a2P_f.23982$NS6.16336@.newssvr30.news.prodigy.com...
> helpful sql wrote:
> You have to create ODBC Data Source object as the message states.
> Look for Data Sources icon in the Control Panel/Administrative Tools.
> Then use its name in the connection string.|||Jeff Dillon wrote:
> Not neccessarily.
> http://www.connectionstrings.com
Thanks, I did not know that.
> And no need really to cross-post so much!
I hope your intention was to say that to the original poster.
> Jeff
> "Sericinus hunter" <serhunt@.flash.net> wrote in message
> news:a2P_f.23982$NS6.16336@.newssvr30.news.prodigy.com...
>|||No, I had already tried this website and all their examples for Sql Server
2000 connection strings. They did work from my test application but they did
not work with DbNetGrid. I had to create an ODBC Data Source in
Administrative Tools. Then it worked fine.
Thanks all for help.
"Sericinus hunter" <serhunt@.flash.net> wrote in message
news:ACR_f.3328$mu2.302@.newssvr24.news.prodigy.net...
> Jeff Dillon wrote:
> Thanks, I did not know that.
>
> I hope your intention was to say that to the original poster.
>
Error Connection with instance
After create it , how to add into ODBC?have any different for the login
authentication between instance and local server?> How i can create the Instance into my sql server?
> After create it , how to add into ODBC?have any different for the login
> authentication between instance and local server?
It is hard to say what went wrong from your info. You can check how to
connect to SQL Server at
http://msdn2.microsoft.com/en-gb/library/ms190944.aspx. You can check
different connection string, including ODBS connection strings, at
http://www.connectionstrings.com/.
Dejan Sarka
http://www.solidqualitylearning.com/blogs/
Error Connection with instance
After create it , how to add into ODBC?have any different for the login
authentication between instance and local server?> How i can create the Instance into my sql server?
> After create it , how to add into ODBC?have any different for the login
> authentication between instance and local server?
It is hard to say what went wrong from your info. You can check how to
connect to SQL Server at
http://msdn2.microsoft.com/en-gb/library/ms190944.aspx. You can check
different connection string, including ODBS connection strings, at
http://www.connectionstrings.com/.
--
Dejan Sarka
http://www.solidqualitylearning.com/blogs/
Error connection to SSRS via SSMS; SQL Server 2005
SQL Server Management Studio, however I get an error; "Cannot connect
to <<Server>>". In addition there is an HTTP status 404 error.
I am running this in a VPC with Windows 2003 Standard and SQL Server
Enterprise.
Within the VPC, I can connect to the Report Manager and view my
reports, I can access the report through web services and Visual
Studio and the ReportServer database exists in the SQL Server; I just
cannot connect to SSRS via SSMS.
Any Thoughts?
PaulWhen you connect to Report Manager via MSIE, what is the server name within
the URL?
http://servername/reports
Are you using that same name when you try to connect to SSRS via SSMS? Did
you try localhost?
--
Alain Quesnel
alainsansspam@.logiquel.com
www.logiquel.com
"Paul" <blackwell_paul@.hotmail.com> wrote in message
news:3fbe13c7-b839-45e7-8785-2657f2081c96@.e25g2000prg.googlegroups.com...
>I am trying to connect to SQL Server Reporting Services through the
> SQL Server Management Studio, however I get an error; "Cannot connect
> to <<Server>>". In addition there is an HTTP status 404 error.
> I am running this in a VPC with Windows 2003 Standard and SQL Server
> Enterprise.
> Within the VPC, I can connect to the Report Manager and view my
> reports, I can access the report through web services and Visual
> Studio and the ReportServer database exists in the SQL Server; I just
> cannot connect to SSRS via SSMS.
> Any Thoughts?
> Paul|||On Nov 19, 9:25 am, "Alain Quesnel" <alainsanss...@.logiquel.com>
wrote:
> When you connect to Report Manager via MSIE, what is the server name within
> the URL?http://servername/reports
> Are you using that same name when you try to connect to SSRS via SSMS? Did
> you try localhost?
> --
> Alain Quesnel
> alainsanss...@.logiquel.com
> www.logiquel.com
> "Paul" <blackwell_p...@.hotmail.com> wrote in message
> news:3fbe13c7-b839-45e7-8785-2657f2081c96@.e25g2000prg.googlegroups.com...
>
> >I am trying to connect to SQL Server Reporting Services through the
> > SQL Server Management Studio, however I get an error; "Cannot connect
> > to <<Server>>". In addition there is an HTTP status 404 error.
> > I am running this in a VPC with Windows 2003 Standard and SQL Server
> > Enterprise.
> > Within the VPC, I can connect to the Report Manager and view my
> > reports, I can access the report through web services and Visual
> > Studio and the ReportServer database exists in the SQL Server; I just
> > cannot connect to SSRS via SSMS.
> > Any Thoughts?
> > Paul- Hide quoted text -
> - Show quoted text -
I am using http://labs:81/reports/... I am using W2K3 Standard and
have a second website (not localhost). It uses portal 81. The server
name is LABS. Even when I use LABS:81 in the Connect to Server dialog
box of the SSMS, I get the same error.|||Can you switch to port 80 (momentarily) and try again?
--
Alain Quesnel
alainsansspam@.logiquel.com
www.logiquel.com
"Paul" <blackwell_paul@.hotmail.com> wrote in message
news:32c86d58-1ff2-4b7f-9b36-635bf7868a69@.d4g2000prg.googlegroups.com...
> On Nov 19, 9:25 am, "Alain Quesnel" <alainsanss...@.logiquel.com>
> wrote:
>> When you connect to Report Manager via MSIE, what is the server name
>> within
>> the URL?http://servername/reports
>> Are you using that same name when you try to connect to SSRS via SSMS?
>> Did
>> you try localhost?
>> --
>> Alain Quesnel
>> alainsanss...@.logiquel.com
>> www.logiquel.com
>> "Paul" <blackwell_p...@.hotmail.com> wrote in message
>> news:3fbe13c7-b839-45e7-8785-2657f2081c96@.e25g2000prg.googlegroups.com...
>>
>> >I am trying to connect to SQL Server Reporting Services through the
>> > SQL Server Management Studio, however I get an error; "Cannot connect
>> > to <<Server>>". In addition there is an HTTP status 404 error.
>> > I am running this in a VPC with Windows 2003 Standard and SQL Server
>> > Enterprise.
>> > Within the VPC, I can connect to the Report Manager and view my
>> > reports, I can access the report through web services and Visual
>> > Studio and the ReportServer database exists in the SQL Server; I just
>> > cannot connect to SSRS via SSMS.
>> > Any Thoughts?
>> > Paul- Hide quoted text -
>> - Show quoted text -
> I am using http://labs:81/reports/... I am using W2K3 Standard and
> have a second website (not localhost). It uses portal 81. The server
> name is LABS. Even when I use LABS:81 in the Connect to Server dialog
> box of the SSMS, I get the same error.
>|||On Nov 19, 1:44 pm, "Alain Quesnel" <alainsanss...@.logiquel.com>
wrote:
> Can you switch to port 80 (momentarily) and try again?
> --
> Alain Quesnel
> alainsanss...@.logiquel.com
> www.logiquel.com
> "Paul" <blackwell_p...@.hotmail.com> wrote in message
> news:32c86d58-1ff2-4b7f-9b36-635bf7868a69@.d4g2000prg.googlegroups.com...
>
> > On Nov 19, 9:25 am, "Alain Quesnel" <alainsanss...@.logiquel.com>
> > wrote:
> >> When you connect to Report Manager via MSIE, what is the server name
> >> within
> >> the URL?http://servername/reports
> >> Are you using that same name when you try to connect to SSRS via SSMS?
> >> Did
> >> you try localhost?
> >> --
> >> Alain Quesnel
> >> alainsanss...@.logiquel.com
> >>www.logiquel.com
> >> "Paul" <blackwell_p...@.hotmail.com> wrote in message
> >>news:3fbe13c7-b839-45e7-8785-2657f2081c96@.e25g2000prg.googlegroups.com...
> >> >I am trying to connect to SQL Server Reporting Services through the
> >> > SQL Server Management Studio, however I get an error; "Cannot connect
> >> > to <<Server>>". In addition there is an HTTP status 404 error.
> >> > I am running this in a VPC with Windows 2003 Standard and SQL Server
> >> > Enterprise.
> >> > Within the VPC, I can connect to the Report Manager and view my
> >> > reports, I can access the report through web services and Visual
> >> > Studio and the ReportServer database exists in the SQL Server; I just
> >> > cannot connect to SSRS via SSMS.
> >> > Any Thoughts?
> >> > Paul- Hide quoted text -
> >> - Show quoted text -
> > I am usinghttp://labs:81/reports/... I am using W2K3 Standard and
> > have a second website (not localhost). It uses portal 81. The server
> > name is LABS. Even when I use LABS:81 in the Connect to Server dialog
> > box of the SSMS, I get the same error.- Hide quoted text -
> - Show quoted text -
Problem solved!
The account that ReportServer was running under did not have the
appropriate access. In addition, the url in the config file was
incorrect; Alain, you nailed it or at least would have if I hand not
already discovered it, thanks for your expertise anyways.
Unfortunately both items I noticed early on, but "didn't think" they
were issues. I just wonder if this is the answer to many blogs that I
have seen regarding this, all resulting with no solution.
Error Connection to MSDE with SQL JDBC Driver
It looks like the JDBC Driver only supports full SQL Server 2000 and not MSDE?D, What JDBC driver are you using?
If the driver you are using supported only TCP connection, make sure that TCP is enabled on the server side for MSDE.
Error connection to MSDE
I have the Windows 2003 Server in my company and the MSDE SP3 install with
an instance for a program. But the program can't access the database, I have
tried to create a new data source to SQL Server in ODBC and it tells me SQL
Server Error: 11004 (Connection failed) and SQL Server Error: 6 (Specified
SQL server not found).
The MSDE is running with the name "SERVER\INSTANCE". I have enabled the
protocols in SVRNETCN.
Does anyone know what to do?
Thanks
Hi,
From the SQL server MSDE installed machine can you try to connect to SQL
server using both authentication using OSQL.
OSQL -Sservername -Usa -Ppassword
The aove command is suppose to go to a SQL Prompt. If it does then your SQL
server is working fine.If it is not look into sql serevr logs and find the
rason why sql server is down.
If your first stpe passed then, From command prompt execute a PING from your
client PC to MSDE server.
If it fail "Request time out" then it is a network issue.
Thanks
Hari
MCDBA
"Pedro" <pedronazario@.timetech.pt> wrote in message
news:4065ce47$0$3527$a729d347@.news.telepac.pt...
> Hi all,
>
> I have the Windows 2003 Server in my company and the MSDE SP3 install with
> an instance for a program. But the program can't access the database, I
have
> tried to create a new data source to SQL Server in ODBC and it tells me
SQL
> Server Error: 11004 (Connection failed) and SQL Server Error: 6 (Specified
> SQL server not found).
>
> The MSDE is running with the name "SERVER\INSTANCE". I have enabled the
> protocols in SVRNETCN.
>
> Does anyone know what to do?
>
> Thanks
>
|||By default only shared memory is enabled when you install MSDE. If the
connection is being made from a remote machine or uisng TCP/IP or named
pipes to connect locally the connection will fail. You can use svrnetcn.exe
(SQL Server Network Utiltiy) to enable TCP/IP and/or named pipes.
Rand
This posting is provided "as is" with no warranties and confers no rights.
Error connection to MSDE
I have the Windows 2003 Server in my company and the MSDE SP3 install with
an instance for a program. But the program can't access the database, I have
tried to create a new data source to SQL Server in ODBC and it tells me SQL
Server Error: 11004 (Connection failed) and SQL Server Error: 6 (Specified
SQL server not found).
The MSDE is running with the name "SERVER\INSTANCE". I have enabled the
protocols in SVRNETCN.
Does anyone know what to do?
ThanksHi,
From the SQL server MSDE installed machine can you try to connect to SQL
server using both authentication using OSQL.
OSQL -Sservername -Usa -Ppassword
The aove command is suppose to go to a SQL Prompt. If it does then your SQL
server is working fine.If it is not look into sql serevr logs and find the
rason why sql server is down.
If your first stpe passed then, From command prompt execute a PING from your
client PC to MSDE server.
If it fail "Request time out" then it is a network issue.
Thanks
Hari
MCDBA
"Pedro" <pedronazario@.timetech.pt> wrote in message
news:4065ce47$0$3527$a729d347@.news.telepac.pt...
> Hi all,
>
> I have the Windows 2003 Server in my company and the MSDE SP3 install with
> an instance for a program. But the program can't access the database, I
have
> tried to create a new data source to SQL Server in ODBC and it tells me
SQL
> Server Error: 11004 (Connection failed) and SQL Server Error: 6 (Specified
> SQL server not found).
>
> The MSDE is running with the name "SERVER\INSTANCE". I have enabled the
> protocols in SVRNETCN.
>
> Does anyone know what to do?
>
> Thanks
>|||By default only shared memory is enabled when you install MSDE. If the
connection is being made from a remote machine or uisng TCP/IP or named
pipes to connect locally the connection will fail. You can use svrnetcn.exe
(SQL Server Network Utiltiy) to enable TCP/IP and/or named pipes.
Rand
This posting is provided "as is" with no warranties and confers no rights.
Error Connection pooling ODBC - SQLConnect where Database this down
Sorry that I don't completely understand your scenario. Can you describe more clearly? Or can you post a short repro?
Thanks,
Junfeng
|||Database: MySql, Programming Language: C++My application uses ODBC connection pooling, now when the database is operational everything works out fine, but as
soon as I stop it the SQLConnect function doesn't return the error but kills abruptly the application.
I've solved the problem... I've found it to be a bug in the MySql ODBC driver, I was working with version 3.51.10, when
I switched to 3.51.14 the problem dissapeared.
Thanks...
Error connecting to SQL Server 2005 Express from Access
DSN-less connection string, but I keep encountering errors. What happens is
that I have a login form with 2 text boxes for users to enter their username
and password. When they have entered them, they click OK and Access tries to
connect using the connection string below.
After waiting a while I get an error, however the SQL Server Login box
appears and I am able to login using my sa login. So, since I know I can
connect to SQL Server, I think the problem must be with my connection string:
stConnect = "ODBC;DRIVER={SQL Native Client}" _
& ";Trusted_Connection=no" _
& ";SERVER=CHRIS\SQLEXPRESS" _
& ";Address=10.0.0.17,1433" _
& ";Network=DBMSSOCN" _
& ";DATABASE=authorDB 2005_11_11SQL" _
& ";UID=" & stUID _
& ";PWD=" & stPWD & ";"
These are the error messages I get when I try to connect:
Connection failed:
SQLState: '08001'
SQL Server Error: 10061
[Microsoft][SQL Native Client]TCP Provider: No connection could be made
because the target machine actively refused it.
Connection failed:
SQLState: '08001'
SQL Server Error: 10061
[Microsoft][SQL Native Client]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.
Connection failed:
SQLState: 'S1T00'
SQL Server Error: 0
[Microsoft][SQL Native Client]Login timeout expired
I should mention that I was able to use a similar connection string to
connect to an MSDE instance with no problems, so if need be I can just use
MSDE. Still, I would prefer to use SQL Server Express since it doesn't have
a workload governor. Also, this is on my local machine, so there shouldn't
be any network issues.
I would appreciate any assistance that anyone can offer.
Thanks,
Chris
By default SQL Express does not accept remote connections over TCP or Named
Pipes, you need to enable that explicitly.
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"Chris Burnette" <ChrisBurnette@.discussions.microsoft.com> wrote in message
news:4FAF0093-8C11-4030-8E4C-8621DE179732@.microsoft.com...
>I am trying to connect to SQL Server 2005 Express from Access using a
> DSN-less connection string, but I keep encountering errors. What happens
> is
> that I have a login form with 2 text boxes for users to enter their
> username
> and password. When they have entered them, they click OK and Access tries
> to
> connect using the connection string below.
> After waiting a while I get an error, however the SQL Server Login box
> appears and I am able to login using my sa login. So, since I know I can
> connect to SQL Server, I think the problem must be with my connection
> string:
> stConnect = "ODBC;DRIVER={SQL Native Client}" _
> & ";Trusted_Connection=no" _
> & ";SERVER=CHRIS\SQLEXPRESS" _
> & ";Address=10.0.0.17,1433" _
> & ";Network=DBMSSOCN" _
> & ";DATABASE=authorDB 2005_11_11SQL" _
> & ";UID=" & stUID _
> & ";PWD=" & stPWD & ";"
> These are the error messages I get when I try to connect:
> Connection failed:
> SQLState: '08001'
> SQL Server Error: 10061
> [Microsoft][SQL Native Client]TCP Provider: No connection could be made
> because the target machine actively refused it.
> Connection failed:
> SQLState: '08001'
> SQL Server Error: 10061
> [Microsoft][SQL Native Client]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.
> Connection failed:
> SQLState: 'S1T00'
> SQL Server Error: 0
> [Microsoft][SQL Native Client]Login timeout expired
>
> I should mention that I was able to use a similar connection string to
> connect to an MSDE instance with no problems, so if need be I can just use
> MSDE. Still, I would prefer to use SQL Server Express since it doesn't
> have
> a workload governor. Also, this is on my local machine, so there
> shouldn't
> be any network issues.
> I would appreciate any assistance that anyone can offer.
> Thanks,
> Chris
|||Gert, I know that. I started the Browser and enabled TCP/IP. Like I said, I
can connect using the sa login, and techinically it's not a remote connection
as it's on a local machine. Thanks for the response, but I already checked
and that isn't the problem.
-Chris
"Gert E.R. Drapers" wrote:
> By default SQL Express does not accept remote connections over TCP or Named
> Pipes, you need to enable that explicitly.
> GertD@.SQLDev.Net
> Please reply only to the newsgroups.
> This posting is provided "AS IS" with no warranties, and confers no rights.
> You assume all risk for your use.
> Copyright ? SQLDev.Net 1991-2005 All rights reserved.
> "Chris Burnette" <ChrisBurnette@.discussions.microsoft.com> wrote in message
> news:4FAF0093-8C11-4030-8E4C-8621DE179732@.microsoft.com...
>
>
|||I figured it out. I just needed to change the default port for TCP/IP since
MSDE was using port 1433.
-Chris
"Chris Burnette" <ChrisBurnette@.discussions.microsoft.com> wrote in message
news:BD09DFBD-66E6-411D-AA16-2A89D9672C1B@.microsoft.com...[vbcol=seagreen]
> Gert, I know that. I started the Browser and enabled TCP/IP. Like I
> said, I
> can connect using the sa login, and techinically it's not a remote
> connection
> as it's on a local machine. Thanks for the response, but I already
> checked
> and that isn't the problem.
> -Chris
> "Gert E.R. Drapers" wrote:
Error connecting to SQL Server 2005 Express from Access
DSN-less connection string, but I keep encountering errors. What happens is
that I have a login form with 2 text boxes for users to enter their username
and password. When they have entered them, they click OK and Access tries to
connect using the connection string below.
After waiting a while I get an error, however the SQL Server Login box
appears and I am able to login using my sa login. So, since I know I can
connect to SQL Server, I think the problem must be with my connection string:
stConnect = "ODBC;DRIVER={SQL Native Client}" _
& ";Trusted_Connection=no" _
& ";SERVER=CHRIS\SQLEXPRESS" _
& ";Address=10.0.0.17,1433" _
& ";Network=DBMSSOCN" _
& ";DATABASE=authorDB 2005_11_11SQL" _
& ";UID=" & stUID _
& ";PWD=" & stPWD & ";"
These are the error messages I get when I try to connect:
Connection failed:
SQLState: '08001'
SQL Server Error: 10061
[Microsoft][SQL Native Client]TCP Provider: No connection could be made
because the target machine actively refused it.
Connection failed:
SQLState: '08001'
SQL Server Error: 10061
[Microsoft][SQL Native Client]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.
Connection failed:
SQLState: 'S1T00'
SQL Server Error: 0
[Microsoft][SQL Native Client]Login timeout expired
I should mention that I was able to use a similar connection string to
connect to an MSDE instance with no problems, so if need be I can just use
MSDE. Still, I would prefer to use SQL Server Express since it doesn't have
a workload governor. Also, this is on my local machine, so there shouldn't
be any network issues.
I would appreciate any assistance that anyone can offer.
Thanks,
Chris
By default SQL Express does not accept remote connections over TCP or Named
Pipes, you need to enable that explicitly.
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"Chris Burnette" <ChrisBurnette@.discussions.microsoft.com> wrote in message
news:4FAF0093-8C11-4030-8E4C-8621DE179732@.microsoft.com...
>I am trying to connect to SQL Server 2005 Express from Access using a
> DSN-less connection string, but I keep encountering errors. What happens
> is
> that I have a login form with 2 text boxes for users to enter their
> username
> and password. When they have entered them, they click OK and Access tries
> to
> connect using the connection string below.
> After waiting a while I get an error, however the SQL Server Login box
> appears and I am able to login using my sa login. So, since I know I can
> connect to SQL Server, I think the problem must be with my connection
> string:
> stConnect = "ODBC;DRIVER={SQL Native Client}" _
> & ";Trusted_Connection=no" _
> & ";SERVER=CHRIS\SQLEXPRESS" _
> & ";Address=10.0.0.17,1433" _
> & ";Network=DBMSSOCN" _
> & ";DATABASE=authorDB 2005_11_11SQL" _
> & ";UID=" & stUID _
> & ";PWD=" & stPWD & ";"
> These are the error messages I get when I try to connect:
> Connection failed:
> SQLState: '08001'
> SQL Server Error: 10061
> [Microsoft][SQL Native Client]TCP Provider: No connection could be made
> because the target machine actively refused it.
> Connection failed:
> SQLState: '08001'
> SQL Server Error: 10061
> [Microsoft][SQL Native Client]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.
> Connection failed:
> SQLState: 'S1T00'
> SQL Server Error: 0
> [Microsoft][SQL Native Client]Login timeout expired
>
> I should mention that I was able to use a similar connection string to
> connect to an MSDE instance with no problems, so if need be I can just use
> MSDE. Still, I would prefer to use SQL Server Express since it doesn't
> have
> a workload governor. Also, this is on my local machine, so there
> shouldn't
> be any network issues.
> I would appreciate any assistance that anyone can offer.
> Thanks,
> Chris
|||Gert, I know that. I started the Browser and enabled TCP/IP. Like I said, I
can connect using the sa login, and techinically it's not a remote connection
as it's on a local machine. Thanks for the response, but I already checked
and that isn't the problem.
-Chris
"Gert E.R. Drapers" wrote:
> By default SQL Express does not accept remote connections over TCP or Named
> Pipes, you need to enable that explicitly.
> GertD@.SQLDev.Net
> Please reply only to the newsgroups.
> This posting is provided "AS IS" with no warranties, and confers no rights.
> You assume all risk for your use.
> Copyright ? SQLDev.Net 1991-2005 All rights reserved.
> "Chris Burnette" <ChrisBurnette@.discussions.microsoft.com> wrote in message
> news:4FAF0093-8C11-4030-8E4C-8621DE179732@.microsoft.com...
>
>
|||I figured it out. I just needed to change the default port for TCP/IP since
MSDE was using port 1433.
-Chris
"Chris Burnette" <ChrisBurnette@.discussions.microsoft.com> wrote in message
news:BD09DFBD-66E6-411D-AA16-2A89D9672C1B@.microsoft.com...[vbcol=seagreen]
> Gert, I know that. I started the Browser and enabled TCP/IP. Like I
> said, I
> can connect using the sa login, and techinically it's not a remote
> connection
> as it's on a local machine. Thanks for the response, but I already
> checked
> and that isn't the problem.
> -Chris
> "Gert E.R. Drapers" wrote:
Error connecting to SQL Server 2005 Express from Access
DSN-less connection string, but I keep encountering errors. What happens is
that I have a login form with 2 text boxes for users to enter their username
and password. When they have entered them, they click OK and Access tries t
o
connect using the connection string below.
After waiting a while I get an error, however the SQL Server Login box
appears and I am able to login using my sa login. So, since I know I can
connect to SQL Server, I think the problem must be with my connection string
:
stConnect = "ODBC;DRIVER={SQL Native Client}" _
& ";Trusted_Connection=no" _
& ";SERVER=CHRIS\SQLEXPRESS" _
& ";Address=10.0.0.17,1433" _
& ";Network=DBMSSOCN" _
& ";DATABASE=authorDB 2005_11_11SQL" _
& ";UID=" & stUID _
& ";PWD=" & stPWD & ";"
These are the error messages I get when I try to connect:
Connection failed:
SQLState: '08001'
SQL Server Error: 10061
[Microsoft][SQL Native Client]TCP Provider: No connection could be m
ade
because the target machine actively refused it.
Connection failed:
SQLState: '08001'
SQL Server Error: 10061
[Microsoft][SQL Native Client]An error has occurred while establishi
ng 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 no
t
allow remote connections.
Connection failed:
SQLState: 'S1T00'
SQL Server Error: 0
[Microsoft][SQL Native Client]Login timeout expired
I should mention that I was able to use a similar connection string to
connect to an MSDE instance with no problems, so if need be I can just use
MSDE. Still, I would prefer to use SQL Server Express since it doesn't have
a workload governor. Also, this is on my local machine, so there shouldn't
be any network issues.
I would appreciate any assistance that anyone can offer.
Thanks,
ChrisBy default SQL Express does not accept remote connections over TCP or Named
Pipes, you need to enable that explicitly.
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"Chris Burnette" <ChrisBurnette@.discussions.microsoft.com> wrote in message
news:4FAF0093-8C11-4030-8E4C-8621DE179732@.microsoft.com...
>I am trying to connect to SQL Server 2005 Express from Access using a
> DSN-less connection string, but I keep encountering errors. What happens
> is
> that I have a login form with 2 text boxes for users to enter their
> username
> and password. When they have entered them, they click OK and Access tries
> to
> connect using the connection string below.
> After waiting a while I get an error, however the SQL Server Login box
> appears and I am able to login using my sa login. So, since I know I can
> connect to SQL Server, I think the problem must be with my connection
> string:
> stConnect = "ODBC;DRIVER={SQL Native Client}" _
> & ";Trusted_Connection=no" _
> & ";SERVER=CHRIS\SQLEXPRESS" _
> & ";Address=10.0.0.17,1433" _
> & ";Network=DBMSSOCN" _
> & ";DATABASE=authorDB 2005_11_11SQL" _
> & ";UID=" & stUID _
> & ";PWD=" & stPWD & ";"
> These are the error messages I get when I try to connect:
> Connection failed:
> SQLState: '08001'
> SQL Server Error: 10061
> [Microsoft][SQL Native Client]TCP Provider: No connection could be
made
> because the target machine actively refused it.
> Connection failed:
> SQLState: '08001'
> SQL Server Error: 10061
> [Microsoft][SQL Native Client]An error has occurred while establis
hing 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.
> Connection failed:
> SQLState: 'S1T00'
> SQL Server Error: 0
> [Microsoft][SQL Native Client]Login timeout expired
>
> I should mention that I was able to use a similar connection string to
> connect to an MSDE instance with no problems, so if need be I can just use
> MSDE. Still, I would prefer to use SQL Server Express since it doesn't
> have
> a workload governor. Also, this is on my local machine, so there
> shouldn't
> be any network issues.
> I would appreciate any assistance that anyone can offer.
> Thanks,
> Chris|||Gert, I know that. I started the Browser and enabled TCP/IP. Like I said,
I
can connect using the sa login, and techinically it's not a remote connectio
n
as it's on a local machine. Thanks for the response, but I already checked
and that isn't the problem.
-Chris
"Gert E.R. Drapers" wrote:
> By default SQL Express does not accept remote connections over TCP or Name
d
> Pipes, you need to enable that explicitly.
> GertD@.SQLDev.Net
> Please reply only to the newsgroups.
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> You assume all risk for your use.
> Copyright ? SQLDev.Net 1991-2005 All rights reserved.
> "Chris Burnette" <ChrisBurnette@.discussions.microsoft.com> wrote in messag
e
> news:4FAF0093-8C11-4030-8E4C-8621DE179732@.microsoft.com...
>
>|||I figured it out. I just needed to change the default port for TCP/IP since
MSDE was using port 1433.
-Chris
"Chris Burnette" <ChrisBurnette@.discussions.microsoft.com> wrote in message
news:BD09DFBD-66E6-411D-AA16-2A89D9672C1B@.microsoft.com...[vbcol=seagreen]
> Gert, I know that. I started the Browser and enabled TCP/IP. Like I
> said, I
> can connect using the sa login, and techinically it's not a remote
> connection
> as it's on a local machine. Thanks for the response, but I already
> checked
> and that isn't the problem.
> -Chris
> "Gert E.R. Drapers" wrote:
>
Error connecting to SQL Server 2005 - ... does not allow remote connections?
to the local SQL Server but tries to connect to another SQL Server 2005
Server in another State. When I run the application from Visual Studio 2005
it connects just fine. When I published the website to the Live Server I
receive the below 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.
Any ideas?
Peace in Christ
Marco Napoli
http://www.ourlovingmother.orgCheck this url for troubleshooting:
http://blogs.msdn.com/sql_protocols.../22/506607.aspx
Jack Vamvas
___________________________________
Receive free SQL tips - www.ciquery.com/sqlserver.htm
___________________________________
"Marco Napoli" <marco@.avantitecnospam.com> wrote in message
news:#14p4JoaGHA.5004@.TK2MSFTNGP02.phx.gbl...
> I have an ASP.NET 2.0 Website that in the connection string does not
connect
> to the local SQL Server but tries to connect to another SQL Server 2005
> Server in another State. When I run the application from Visual Studio
2005
> it connects just fine. When I published the website to the Live Server I
> receive the below 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.
> Any ideas?
> --
> Peace in Christ
> Marco Napoli
> http://www.ourlovingmother.org
>
>|||Thank you.
Marco
"Jack Vamvas" <delete_this_bit_jack@.ciquery.com_delete> wrote in message
news:euqdnWInVNe2O8zZRVnyjg@.bt.com...
> Check this url for troubleshooting:
> http://blogs.msdn.com/sql_protocols.../22/506607.aspx
> --
> Jack Vamvas
> ___________________________________
> Receive free SQL tips - www.ciquery.com/sqlserver.htm
> ___________________________________
>
> "Marco Napoli" <marco@.avantitecnospam.com> wrote in message
> news:#14p4JoaGHA.5004@.TK2MSFTNGP02.phx.gbl...
> connect
> 2005
>
Wednesday, March 7, 2012
Error connecting to Report Manager
System.Net.Sockets.SocketException: No connection could be made because the
target machine actively refused it 127.0.0.1:443
Can someone help me with that error?
ThanksThats a bit unusual. Try this post
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=552017&SiteID=1
Cheers
Shai
On Nov 19, 11:46 pm, "Mark Goldin" <mgol...@.ufandd.com> wrote:
> System.Net.WebException: Unable to connect to the remote server -->
> System.Net.Sockets.SocketException: No connection could be made because the
> target machine actively refused it 127.0.0.1:443
> Can someone help me with that error?
> Thanks
Error connecting to remote SQL 2000 Server
I'm experiencing a problem connecting to a SQL 2000 server through my ASP code. My connection string is as follows:
<addname="TheConnectionString"connectionString="driver={Sql Server};provider=MSDASQL;server=10.0.1.42;database=dbname;uid=*********;pwd=*********"providerName="System.Data.Odbc" />
The problem doesn't occur when I run my ASP code from my workstation using VS.NET's builtin webserver. It makes the connections and executes the CRUD commands successfully. However, when I publish my site to the webserver (which resides on 10.0.1.16) it fails out with the following error:
System.Data.Odbc.OdbcException: ERROR [08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.
ERROR [01000] [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()).
I've verified that the webserver can talk to the DB server by connecting to the remote DB server through SQL Enterprise Manager running locally on the webserver. If I try to do this with a DSN I get the same results. I get the same error from any other webserver on the internal network. The difference between my workstation and the internal network is that I'm using a VPN to connect to our internal network while the webservers are physically connected to it. Firewalling isn't the issue in this case because the webservers and DB server are on a trusted network. I've seen other ways of connecting to the DB server including using Named Pipes (which I would rather not do because I don't want to setup a named pipe on the production db server).
I'm relatively new to ASP.NET 2.0, so the above connection string is an adaptation of some old ASP code. If anybody has any suggestions on a better way to construct this connection string, please let me know. I've been racking my brains trying to get this to work outside of the devel env.
Try with this:
|||<add name="TheConnectionString" connectionString="Server=10.0.1.42;Database=dbname;User ID=*********;Password=*********;"/>
johnladda:
System.Data.Odbc.OdbcException: ERROR [08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.
ERROR [01000] [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()).
First, this error is a generic one so your actual problem may range from incorrect credentials to a network problem.
Second, I'm not too sure why you've used ODBC library to connect to SQL while you've the SQL library.
johnladda:
I'm relatively new to ASP.NET 2.0, so the above connection string is an adaptation of some old ASP code. If anybody has any suggestions on a better way to construct this connection string, please let me know.
Third, you can use "Data Source=xxx;Initial Catalog=xxx;User ID=xxx;Password=xxx" to connect to SQL Server. You can referwww.connectionstrings.com . This site provides a number of connection string examples for almost every database.
Hope this will help.
|||This site is fantastic. It's exactly what I needed. I was wondering if the "Data Source" property of the connection string works similar to the "Server" property in that you can specify the port number too? If not, how would I go about specifying the port number in the connection string. I only just recently found out that the person who implimented the database server put it on an alternate port.
|||
johnladda:
I was wondering if the "Data Source" property of the connection string works similar to the "Server" property in that you can specify the port number too? If not, how would I go about specifying the port number in the connection string. I only just recently found out that the person who implimented the database server put it on an alternate port.
No, you've mistaken the Data Source property of the connection string. It is no way similar to any server control. In fact, you can user Data Source or Server property in your connection string. Below are some of the alternatives you can use in your connection string.
Data Source = Server
Initial Catalog = Database
User Id = uId
Password = pwd
The default port is 1433 for SQL Server TCP/IP connection. You can specify any other port in your connection string as below:
"Data Source=xxx,portNumber;Initial Catalog=xxx;User ID=xxx;Password=xxx". That is, after either the IP or the name of the server put a comma and then provide the port number.