Showing posts with label connection. Show all posts
Showing posts with label connection. Show all posts

Monday, March 26, 2012

how to remote connection to an SQL server on the same network?

hi
i added 2 databases to my SQL server on a machine next door using Microsoft SQL server management studio express... I made sure that the server allows remote connection

then from this computer i pass a connection string to my SQLCLient in VB2005 that looks a bit like this

Code: ( text )

  1. ConnString = "Server=USER-PTDH8Z5ESH\SQLEXPRESS;Database=FSS.MDB;Trusted_Con nection=True;User Instance=True"

for which it gives me this error when i open the connection
SQLConnecton.Open()

System.Data.SqlClient.SqlException: 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)
at System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.Att emptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.Log inNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
at System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.Creat ePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateOb ject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCrea teRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at Flying_School_Scheduler.DBEngine.StartConnection() in

whats the big idea?
i'm in a bit of a tight schedule here... can anyone help me here? ?

First, let me express my aplogies for not getting to your question sooner. It would be not too trite to say that since most of us that take our time to respond to questions such as yours, are volunteers, and we are often also on a tight schedule. Simple, straightforward requests for assistance are looked at and perhaps even responded to far sooner than demanding, whining ones...

As to the 'big deal' with your connection string: There are a couple of possibilites:

Often using 'prohibited' characters in a server name requires extra handling, such as enclosing the name in square brackets. You might try:
Server=[USER-PTDH8Z5ESH\SQLEXPRESS]; Is the database itself named FSS.MDB, or could that, by mistake, be the database file name?|||

Normally, error 26 is caused by a few common problems that are easily fixed. Please take a look at this posting as it should probably fix your problem: http://blogs.msdn.com/sql_protocols/archive/2007/05/13/sql-network-interfaces-error-26-error-locating-server-instance-specified.aspx

Thanks,

Il-Sung.

Monday, March 19, 2012

How to recover sql server database data

Hi all. A few days ago i installed mcafee total protection 2007 and that disabled my internet connection totally!! I couldn't fix it so i had to uninstall it. After uninstalling mcafee total protection 2007 still i couldn't join Internet!!

So i got mad and went and made repair installation of windows xp pro. After repair installation i couldn't activate it since Internet connection was still not working!! So i went and installed another copy of xp pro on different folder and named it WINDOWS (old one was WINDOWS2).Thanks god now i could join Internet but all my shortcuts and menu items are not visible.

Unfortunately I can't even start sql server 2000 either!! could any one tell me what should i do in order to get access to all database tables and data that i had in sql server and make a back up. I didn't install any new sql server yet. I be happy if an expert tell me what should i do. The installation folder of old windows(WINDOWS2) is still available along with sql server installation folder.Thank and looking forward for reply.As this question is really more of a Windows / Microsoft SQL Server question than a true SQL language question, I'm going to move the thread to the Microsoft SQL Server forum so it will get more attention.

-PatP|||what I presume, when you install a new copy of Windows leaving behind the old copy will not copy all your applications onto new winodws software. You need to install all your applications and sql server as well because when you install the new copy of windows xp, this will create a new registry file which may not have your old windows application registry details...
I hope this will you.

Wednesday, March 7, 2012

how to read database connection data from a properties file?

Hi guys,
I am very new to Reporting Services, so please bear with me here. I am
curious about how we can configure the database server, database name, and
login data using data from a properties file so that when Reporting Services
and the Report Server start up, they have all the data they need to connect
to the appropriate database. Has anyone tried this yet? If so how would it
be possible?
Thanks a bunch,
Carolyn
cvoREMOVE_ALL_CAPS@.REMOVE_ALL_CAPSacornsys.comWhen you design reports you have the option of using shared data sources for
running the report. Or each report can use its own data source. I always use
the shared datasources. The shared data source is referred to when you
design the report. When you deploy the default is that the shared datasource
does not get written over. What this means is you can configure the shared
datasource on the server and it can be different than what the developers
are using. For the credentials for the shared datasource I use a specific
username. The db username I use is one I have setup for reporting that has
only read access to the database. An advantage of this is it allows
connection pooling since all the connections for reporting will use the
exact same connection string (a necessity for connection pooling).
Note that what I am talking about here is getting to the database which has
the data for the report. RS also has a database which is used for caching of
the reporting objects. This can be the same or different database from which
you are reporting on.
Bruce L-C
"Carolyn Vo" <cvoREMOVE_ALL_CAPS@.REMOVE_ALL_CAPSacornsys.com> wrote in
message news:O3lMQ9BhEHA.556@.tk2msftngp13.phx.gbl...
> Hi guys,
> I am very new to Reporting Services, so please bear with me here. I am
> curious about how we can configure the database server, database name, and
> login data using data from a properties file so that when Reporting
Services
> and the Report Server start up, they have all the data they need to
connect
> to the appropriate database. Has anyone tried this yet? If so how would
it
> be possible?
> Thanks a bunch,
> Carolyn
> cvoREMOVE_ALL_CAPS@.REMOVE_ALL_CAPSacornsys.com
>