Showing posts with label express. Show all posts
Showing posts with label express. Show all posts

Friday, March 30, 2012

problem in Installing SQl Server Management studio express _ (ctp)

I'm very new to MS SQl Server, i Downloaded MS SQl Server express edition, the problem is i can't deal with it, when i downloaded (Microsoft SQL Server Management Studio Express - Community Technical Preview (CTP) November 2005) every time i try to install it , it give me error message says "The system administrator has set policies To Prevent this installation"
How can i over come this problem and install this interface to be able to deal with sql server?
is there any other software can do this job "making interface for the sql server express edition"?
ThxI downloaded the Nov CTP as well of the Management studio, but can't go beyond this error.

This installation package cannot be installed by the windows installer service. You must install a windows service pack that contains a newer version of the windows installer service.

I have Windows 2000 SP4 and also the Windows Installer 3.0, MSXML 6.0 Still Sad

Thanks in advance for any help.
Kalyan.|||Go to the following link an install the latest update to Windows Installer: http://www.microsoft.com/downloads/details.aspx?FamilyID=889482fc-5f56-4a38-b838-de776fd4138c&DisplayLang=en

Cheers,
Dan|||hi,
I have the windows installer 3.1 but yet i can't install (TCP) managment studio keep getting the same error "administrator has set policies to prevent this installation"
additional hint : - i use windows xp_sp2 - when i used to counter this problem i downloaded MS Visual Web developer express 2005 and i was able to connect to sql server, but really i'm new to sql and i need to see interface to be able to learn it at least|||Sorry for the messege, i downloaded the SQl Server Management Studio Express Again and when i tried to install it , it worked seems it was a problem in the first time i downloaded it something was wrong in it
anyway thx guys

Problem in installing SQL express

If you know how to fix my problem , pls let me know. I am trying to install SQL express version with XP SP2 . iIt stops at the screen of "Detecting Installed IIS" . I have tried the same installation in server 2003. It is ok.

I too have the exact same problem. I've got a case logged into MS support and I'll post back whenever they get around to returning my call.
|||OK - I resolved the problem on two identicial clean machines, but we were not sure what exactly resolved the problem. First off, I have two, out-of-the-box Dell 9150s and both came with a Norton Internet Security installed with 'Personnal Firwewall' turned ON. I turned the firewall off and also installed the service packs listed below and I was able to install SQL Express without issue on both machines.

I hope this helps.
Security Update for Windows XP (KB890859)

- Update for Windows XP (KB894391)

- Security Update for Windows XP (KB896428)

- Security Update for Windows XP (KB905749)

- Security Update for Windows XP (KB904706)

- Security Update for Microsoft .NET Framework, Version 1.1 Service Pack 1 (KB886903)

- Critical Update for Windows XP (KB886185)

- Security Update for Windows XP (KB900725)

- Security Update for Windows XP (KB888302)

- Security Update for Windows XP (KB905414)

- Security Update for Windows XP (KB899589)

- Security Update for Windows XP (KB893066)

- Cumulative Security Update for Internet Explorer for Windows XP (KB896688)

- Security Update for Windows XP (KB890046)

- Security Update for Windows XP (KB902400)

- Security Update for Microsoft Windows (KB898458)

- Security Update for Windows XP (KB896358)

- Update for Windows XP (KB887742)

- Security Update for Windows XP (KB896423)

- Security Update for Windows XP (KB893756)

- Security Update for Windows XP (KB896424)

|||

I was having the same problem with the install haning up at the IIS detection on my laptop. I didn't have any problem installing it on my desktop. Both machines are running XP Home. The difference is the desktop has ZoneAlarms as a firewall, while the laptop is running the Norton firewall.

I couldn't install on the laptop either from the download or from a SQL Server Standard Edition CD. They both stopped at the IIS detection.

I turned off the Norton firewall, downloaded the install to my desktop, ran it from there and it installed very quickly.

Problem in Installing Microsoft SQL Server Management Studio Express - Community Technology Prev

Hi,

I installed SQL Server Express Edition and trying to install Management Studio Express but not successful.

Following Error is thrown while installing MSSMSE.

"The Installation Package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer Package"

I downloaded the software from http://www.microsoft.com/downloads/details.aspx?FamilyId=82AFBD59-57A4-455E-A2D6-1D4C98D40F6E&displaylang=en

Please help me. I am struck.

Shyam

This sounds like a problem with the download. Try turning off anti-virus protection when you do the download. Also, make sure you save the download to a drive that is not near capacity.

problem in inserting an integer into a database table

i am using visual web developer 2005 and SQL Express 2005 with VB as the code behind

i want to insert an integer into my database table and this is my code

i = i + 1
productionstatus.UpdateCommand = "UPDATE productionprogressbar SET completedprocess = i WHERE order_id = 10"
productionstatus.Update()

"i" is declared at the top of the page like this

Partial Class production_processlist
Inherits System.Web.UI.Page
Dim i As Integer = 0

when i run the program i get the error

input string is not in the correct format

what is wrong in my code ?

please help me

you are treating your variable "i" as a literal character

try it like this:

"UPDATE productionprogressbar SET completedprocess =" & i.ToString & "WHERE order_id = 10"

Wednesday, March 28, 2012

problem in deploying the website developed in visual web developer 2005

Hi,

I am new to asp.net.I am trying to deploy the website on IIS created in visual web developer 2005 express.I am having problem with the aspnetdb.mdf for login.
I have copied my entire contents to the physical directory( shared floder),from where the iis virtual directory can access the contents.I can see my login form but when i enter my username and password and click login it gives my error
"error occured in establishing the connection".

I am using the sql server 2005.I don't know what should i do with aspnetdb.mdf?

thanks and urgent help needed

The following article mentions similar issue, you can take a look to see if it solves your problem.

http://forums.asp.net/1257344/ShowPost.aspx

Monday, March 26, 2012

Problem in connection to sqlexpress witn ASP.nET

hi all

When I use asp.net 2.1 to connect sql 2005 express locally I got error message to say

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: 25 - Connection string is not valid)

I use following connection string

ConnectToDb.ConnectionString = "Data Source=servername;InitialCatalog=PushToMail;Integrated Security=true";

for more information : when I open SQLEXPRESS this oblige me to inter

servername : servername\sqlexpress

authentification: windowsauthentification

and when i try this connection

ConnectToDb.ConnectionString = "Data Source=servername\sqlexpress;InitialCatalog=PushToMail;Integrated

Security=true";

l got this erreur "inorganised sequence space"

next time u install sql 2005 ,use both authentication ,windows and sql.

or try to connect sql using your VS 2005 ,if u have.

|||

Read this thread,

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=327846&SiteID=1

It has answer that explains how to enable remote connections.

problem in connecting to sql server Express

Hi to all,

i'm installing sql server in my pc as netwrok service.

when i try to connect it, it showing me a error
sql server does not allow remote connections error 26 error locating server/instance (MS Sql server )

how can i resolve this
plz help me out.

it not able to connect the server locally.
when i try to connect it with .\SQLEXPRESS or localhost\SQLEXPRESS it will connect to the DB
But when i use ServerName\SQLEXPRESS it wont connect to DB what the problem plz help me

with Regards
Amjath

Hi Amjath,

Ensure that you have enable remote connection in Surface Area Configuration for Service and also check you have enable TCP/IP and Named Pipe too.

Hemantgiri S. Goswami

|||Hi Goswami,

this time also i faced the same problem Goswami.

the message contains the Following

Cannot connect to ServerName\SQLEXPRESS

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 that under the default settings sql server does not allow remote connections.(provider: sql network interfaces, error: 26 - error locating server/instance specified)(Microsoft sql server)

i enabled the remote connection in Surface Area Configuration for Service and also check the third option enable both TCP/IP and Named Pipe .

but this time also i can enter the db using the .\SQLEXPRESS or localhost\SQLEXPRESS.
wat can i do now, plz help me

with Regards

Amjath|||

Hi Amjath,

ensure NET DDE and NET DDE DSDM and SQL Browser Service are started in Control Panel -> Administrative Tools-> Services and firewall rules are also set properly .

Refer sp_setname which will set network name sys.servers .... When did you get this error !? From Application!? Which? Or from SSMS ?

Hemantgiri S. Goswami

|||Hi Goswami,

sorry to ask this what is mean by NET DDE and NET DDE DSDM,
but SQL Browser by defult is in disabled(I have to change that thing to Automatic and then i have to start it manually right).

Right now I'm using sql server studio express only.

With Regards
-Amjath|||

Hi,

These are the Services , SQL Broswer service required because it gives connection information to client computers, start them and see if it works.

And what about the other question i asked !!! When did you get this error ?! While runing any application or while connecting SQL Express from another machine on network ?

Hemantgiri S. Goswami

|||

Sorry to butt in, but I got the same problem and was looking for a solution as well thus found this thread

I get exactly the same message when I try to connect to the SQL EXpress Database from Visual Basic in Visual Studio Express

Both when running Visual Studio Express from a PC with the SQL server loaded on that PC and on another PC with SQL on a network

I click on 'Tools' in VBE then

'Connect to Database'

I navigate via the connect to SQL Server Database dialog to the MS SQL Database.MDF that I wish to connect to

The dialog stays up for some 25 - 30 secs and times out with the error message provided earlier in the threads

(I have not tried the suggested solution - yet - just answering the specific question of where this is happening)

|||

" 26 error locating server/instance ..." means we are not able to locate your server, make sure SQL Browser is running evenif it's local connection. Please refer http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=362498&SiteID=1 to trouble-shoot connectivity issues.

|||

Let's try the simple things first...

Ensure that you've fully configured your instance to accept remote connections per the KB article on the topic, here. If that doesn't solve the problem then try some of the more advanced troubleshooting.

Mike

|||Hi to ALL,

guys that wont get connected.
but when change the property of Alias in sql server configuration manager then its working i dont know wat to do
i changed the protocol to named pipe then its working....
when i changed that to tcp it wont work whats the problem.....

in the surface area configuration i set the option as work for both tcp and named pipe....

i enabled the sql browser also wat goswami said, i did that

plz help me out...from this problem i struggle a lot

with Regards
Amjath|||

Hi Amjath,

Have you opened up Exceptions in the firewall as described in the KB article that I provided? If the firewall is not open you will not be able to connect to SQL Express.

How are you trying to connect?

Mike

|||Hi Mike

Nice to hear from u
i switch off the firewall for this purpose only mike.

till now it wont work

-Amjath|||

Hi Amjath,

Are you saying that once you open an Exception in the firewall you are able to connect?

Be sure you're following the instructions in the KB and opening an Exception, not just turning the firewall off. An Exception will allow specific applications to communicate through the firewall while still offering protection for the rest of your computer.

Mike

|||

This is a very common question that's exacerbated by the generic OSFA error message that gives irrelevant information as often as not. To address this question, I've written a rather long blog entry that walks through the issues and should help get anyone connected to SQL Server. I've also included a very long chapter in my new book that goes even deeper into the mechanics of getting connected. See http://betav.com/blog/billva/2006/06/getting_and_staying_connected.html and www.hitchhikerguides.net

Problem in connecting 2 databases with sql Server 2005 Express

I am programming in VB6 using ADO 2.8. This connection and query works in MS access, SQL server 2000 and Sql Server 2005. does not work in Sql server 2005 express. Any Suggestions?

Connection String #1 Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;AttachDBFileName=C:\Program Files\Material_Management_System\DATA\Main.mdf;Data Source=Steve_Laptop\sqlexpress

Connection String #2 Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;AttachDBFileName=C:\Program Files\Material_Management_System\DATA\Items.mdf;Data Source=Steve_Laptop\sqlexpress


Sql Query: Select POLINE.ID as POLine_ID, PFMS.ID as Items_ID FROM POLINE LEFT JOIN Items.PFMS as PFMS ON POLINE.lItem_ID = PFMS.ID

Error: Msg 208, Level 16, State 1, Line 1
Invalid object name 'Items.PFMS'

Sql Query#2: Select POLINE.ID as POLine_ID, PFMS.ID as Items_ID FROM POLINE LEFT JOIN Items.dbo.PFMS as PFMS ON POLINE.lItem_ID = PFMS.ID

Error: Msg 208, Level 16, State 1, Line 1
Invalid object name 'Items.dbo.PFMS'.

I am running the queries directly from the 2005 Mgt window to take as many variables out of the equasion. I get the same error in Visual basic

How am I supposed to reference a join of 2 databases? Any suggestions

I did not try that yet, but I think the cross join between user instances is not possible, you either have to do an in-memory join in .NET or attach the databases to the SQL Server Express instance and then join them using the three part name.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

Friday, March 23, 2012

Problem in changing Account Name, Password

Hi

I installed SQL Server 2005 Express Edition. When I try changing the account name, password in the SQL Server Configuration Manager, i.e. by clicking on Apply, the SQLEXPRESS restarts and the password gets replaced by a longer password. Also the user name gets prefixed with "./". Any help on this will be highly appreciated.

Another query: Do we have the query analyser (gui or command line) kind of thing in Express Edition? Also where can I get a proper documentation of doing elementary things in setting up a database, like creating a database, adding a user, etc)

Thanks and Regards
Roopesh

For the pasword thing, the field is obfuscated with more chars than you entered, thats as planned.

There is a query edit built into express, just select file new query from the menu.

In terms of docs I recomend SQL Server Books On Line, which can be downloaded from the same place as you downloaded express.

|||

A few additional notes, if you've only downloaded Express Edition (not Advanced Services) you can get Management Studio Express separately from http://msdn.microsoft.com/vstudio/express/sql/download/.

You can find some videos to help you understand some of the basics of database usage at http://msdn.microsoft.com/vstudio/express/sql/learning/default.aspx. If you're interested in learning about a programming language, I'd recomend the Absolute Beginners series as well as some of the other learning resources that are language specific. (VB.NET C#)

Regards,

Mike Wachal
SQL Express team

-
Mark the best posts as Answers!

sql

Wednesday, March 21, 2012

Problem getting SQL Server Express Service to Start

I have had SQL Server 2005 (Full Version) installed along with SQL Server Express and suddenly SQL Express quit starting and will not start manually. I have reinstalled VS 2005 (Team Edition for Software Dev) and tried to reinstall SQL Express but the installation fails when it tries to start the service. Any suggestions?

Keith

If it had been working for a while but stopped, and it logs on with an account other than local I would check to see if the account's password has expired. If that isn't the case, when you try to start it are there any messages in the Event Logs?|||

You should also check the SQL Error logs in addition to the Event logs. Let us know what they say.

Regards,

Mike Wachal
SQL Express team

-
Please mark your thread as Answered when you get your solution.

|||

I get the following in the SQL Server Express Log:

SQL Trace ID 1 was started by login "sa".

2006-04-17 16:16:32.77 spid5s Starting up database 'mssqlsystemresource'.

2006-04-17 16:16:33.14 spid5s Error: 15209, Severity: 16, State: 1.

2006-04-17 16:16:33.14 spid5s An error occurred during encryption.

2006-04-17 16:16:33.16 spid5s SQL Trace was stopped due to server shutdown.

Any thoughts?

|||

Thanks Keith,

Just to be clear, are you getting this error while installing or just when trying to start the server?

Regards,

Mike Wachal
SQL Express team

-
Please mark your thread as Answered when you get your solution.

|||

When the server quit starting and repairing visual studio didn't help, I removed the following registry entries:

Under the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL, the string named SQLEXPRESS with data MSSQL.1 and

the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1

so that sql express would install under the same instance name. I then reinstalled sqlexpress and during the installation it was unable to start the service and reported the encryption error in the sql server log.

|||

Do not delete registry entries. Use the setup program to uninstall/reinstall the SQL Server Express product.

Normally, SQL Server setup creates the following key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\Security

If the Security key is not present, the creation of the service master key will fail with the error that you've encountered. The key was probably not created because you partially deleted the registry entries for this product.

You can attempt to create the key manually (don't create anything under it), to see if this will allow the installation to complete. If it works, I suggest to backup your databases, then uninstall and reinstall SQL Server Express again, because the correct installation will create this key and it will also apply the proper access restrictions on it.

Thanks
Laurentiu

|||The Add/Remove Programs utility in the control panel will not let me uninstall SQLEXPRESS. It says that the product has already been uninstalled. When I try to add SQLEXPRESS it states the the instance name is already in use and won't install. This lead me to make the registry changes mentioned earlier. I have repaired the registry. Is there any way to delete the entry for the SQLEXPRESS instance from the list of installed instances in the the Add/Remove programs list that appears when I select "Change" under Microsoft SQL Server 2005?|||

Try posting this question on the Setup forum: SQL Server Setup & Upgrade.

Thanks
Laurentiu

Tuesday, March 20, 2012

problem for Security in Sql 2005 Express.

hi
i am using vc# 2005 and sql 2005 express.
my problem is does exist any way to set password on sql2005 database ?
(because i don't want to end users access to sql server's tables and datas and ...)
how to solve my problem ?
thanks

Hi Hamed

You can download Microsoft SQL Server Management Studio Express and you can create users there for your database.

Regards,

Pradeep

|||

Hi,

You don′t set password on databases. You create logins on the server level (server principals) which relate to either a Windows Account (Windows Authentication) or a SQL Server account (SQL Server authewntication). These principals can be either in a overall server role and / or be granted access to individual databases with database principals. these database principals can be granted individual right on the objects within the database (securables) or can be assigned to database roles.

So, first create a server login for an indivudal user or a Windows groups, then grant the appropiates right either individually or through the role membership within the database.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de


Saturday, February 25, 2012

Problem copying SQL DB file

Hi,

I have a VB project which uses SQL Server 2005 Express. When the project first runs, it copies its DB files from the data directory to a directory created on the C: drive. This works fine.

In a later part of the application, it is necessary to copy the DB file to another location e.g. memory stick so that it can be used to merge data onto another PC running the same application.

The data merging works too.

My problem is, despite the fact that it worked okay this morning, I am now unable to copy the DB into a second location (memory stick or location on local disc). I get an exception stating that the file is in use.

I have no other applications running (I shut down Visual Studio and was running the installed version).

What is more, the form that implements the file copying, first closes down all other forms in the application to ensure that nothing is connected to the DB.

Furthermore, the form that performs this task has no DB connections whatsoever - it simply allows the user to select a location, then creates a directory and copies the DB files to it.

If I copy/paste the code plus the FolderBrowserDialog into the first form that copies the original database out of the data directory - it works!

The code for the whole form is below - I would be hugely grateful for any ideas ...

Public Class Export

Private Sub Export_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub

Private Sub NextBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NextBtn.Click

'Close all other windows to ensure that the databases are not in use.

Dim Counter As Integer = My.Application.OpenForms.Count

Do While Counter > 1

For Each f As Form In My.Application.OpenForms

If Not (f.GetType Is GetType(Export)) Then

f.Close()

Exit For

End If

Next

Counter -= 1

Loop

' Set the Help text description for the FolderBrowserDialog.

Me.FolderBrowserDialog.Description = _

"Select a location to export the data to e.g. a memory stick. Or, you can export to a local directory and then burn to CD or e-mail to another user."

' Do not allow the user to create New files via the FolderBrowserDialog.

Me.FolderBrowserDialog.ShowNewFolderButton = False

' Default to the My Documents folder.

Me.FolderBrowserDialog.RootFolder = Environment.SpecialFolder.MyComputer

Dim result As DialogResult = FolderBrowserDialog.ShowDialog()

Dim foldername As String

If result = DialogResult.OK Then

foldername = FolderBrowserDialog.SelectedPath

Try

If Not My.Computer.FileSystem.DirectoryExists(foldername & "\ClubSecExportMerge") Then

My.Computer.FileSystem.CreateDirectory(foldername & "\ClubSecExportMerge")

MsgBox("Merge Directory created.")

End If

My.Computer.FileSystem.CopyFile("C:\Clubsec\ClubSecDB.mdf", foldername & "\ClubsecExportMerge\MergeDB.mdf", True)

My.Computer.FileSystem.CopyFile("C:\Clubsec\ClubSecDB_log.ldf", foldername & "\ClubsecExportMerge\MergeDB_log.ldf", True)

MsgBox("Database merge files successfully copied to " & foldername & " \ClubSecExportMerge.", MsgBoxStyle.OkOnly, "Operation successful")

Catch ex As Exception

MsgBox("There was an error." & Chr(13) & "Export of database was not achieved." & Chr(13) & ex.ToString, MsgBoxStyle.OkOnly, "Operation failed.")

Exit Sub

End Try

Else ' Cancel button pressed

MsgBox("No path selected. Data not exported", MsgBoxStyle.OkOnly, "Operation cancelled.")

End If

Dim home As New HomeScreen

home.Show()

Me.Close()

End Sub

End Class

Accroding ot the mdf and ldf file your are using a SQL Server instance for storing some data. are the mdf files attached to any SQL Server ? If yes, is it a user instance or a server instance. If you don′t know post your connection string of your application here. The file is probably in use by any SQL Server instance.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||

Jens,

Thanks for the response. I don't know much about user instances but I thought they defaulted to False. When I looked at the connection strings, they are true. So I changed them to false. The app ran but I still couldn't copy the files to a new directory.

I noticed that in the Database Explorer, the database filename shown was different to what was intended and referred back to the project, within my Visual Studio directory. I changed this to point at the database files on the C: drive and now nothing works.

I get the first exception below when I try to run the app. Yesterday, most of it worked! I could even get the file copying to work if I pasted the code into a different form. Now nothing works!

The current connection string is as follows:

Data Source=.\SQLEXPRESS;AttachDbFilename=C:\ClubSec\ClubSecDB.mdf;Integrated Security=True;User Instance=False

Just by way of information, I will explain a little more about what I am trying to achieve. I'm new to VB and SQL Express and only know the stuff learned from the online videos and a book. I created the application without worrying about connection strings, user instances etc as they were all handled by the IDE. However, I then ran into a problem - if I update the app, the database files will overwrite the user data in the data directory. Seriously bad news!

Rather than try to be too clever, I thought ok, all I need do is chek whether a directory called C:\ClubSec exists on app startup. If it doesn't, it is the first ever run - create the directory and copy the DB files to it from the data directory and use these files in future. That way, any app updates won't affect the user data. This all semed to work fine.

I now wanted to add an Export/Import data feature as different users of the app could be changing data and there would be a requirement to merge it. To achieve this, the user is allowed to select a directory on any drive (intended to be a memory stick in real life) at which point their DB files are copied to a directory called ExportMerge in the chosen location. This worked yesterday and will work if I paste the code into a different form other than the one it's in!

Next, for an import, the ExportMerge directory is located and the contents copied to the Import Merge directory within Clubsec. This works fine and the merge happens (except for a few logic bugs that I've been too busy to address yet!)

Excuse me while a go and find a convenient wall upon which to bang my head several times!

UPDATE:

I have read that ADO.net maintains open connections sometimes which are eventually discarded. I have discovered that if I close all forms with data access then use a timer to try a copy my directories every so often, after 5-6 minutes they are freed up and I can perform the copy. I also tried to disable pooling but this had no effect although I can't be sure that I successfully disabled it because any time I change any connection properties - they change back again!

Regards,

Rich

First message

System.Data.SqlClient.SqlException was unhandled
Class=16
ErrorCode=-2146232060
LineNumber=65536
Message="Unable to open the physical file "C:\Clubsec\ClubSecDB.mdf". Operating system error 32: "32(error not found)".
Unable to open the physical file "C:\Clubsec\ClubSecDB_log.ldf". Operating system error 32: "32(error not found)".
Cannot open user default database. Login failed.
Login failed for user '048789520110\Richard'.
File activation failure. The physical file name "C:\Clubsec\ClubSecDB_log.ldf" may be incorrect."
Number=5120
Procedure=""
Server=".\SQLEXPRESS"
Source=".Net SqlClient Data Provider"
State=101
StackTrace:
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.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
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()
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
at ClubsecDev3.ClubSecDBDataSetTableAdapters.UsersTableAdapter.Fill(UsersDataTable dataTable) in D:\Documents and Settings\Richard\My Documents\Visual Studio 2005\Projects\ClubsecDev3\ClubsecDev3\ClubsecDev3\ClubSecDBDataSet.Designer.vb:line 7521
at ClubsecDev3.Logon.Logon_Load(Object sender, EventArgs e) in D:\Documents and Settings\Richard\My Documents\Visual Studio 2005\Projects\ClubsecDev3\ClubsecDev3\ClubsecDev3\Logon.vb:line 167
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at ClubsecDev3.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

Then, as an experiment, tried to close the connection in Database explorer and got this one:

System.Data.SqlClient.SqlException was unhandled
Class=11
ErrorCode=-2146232060
LineNumber=65536
Message="Cannot open user default database. Login failed.
Login failed for user '048789520110\Richard'."
Number=4064
Procedure=""
Server=".\SQLEXPRESS"
Source=".Net SqlClient Data Provider"
State=1
StackTrace:
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.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
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()
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
at ClubsecDev3.ClubSecDBDataSetTableAdapters.UsersTableAdapter.Fill(UsersDataTable dataTable) in D:\Documents and Settings\Richard\My Documents\Visual Studio 2005\Projects\ClubsecDev3\ClubsecDev3\ClubsecDev3\ClubSecDBDataSet.Designer.vb:line 7521
at ClubsecDev3.Logon.Logon_Load(Object sender, EventArgs e) in D:\Documents and Settings\Richard\My Documents\Visual Studio 2005\Projects\ClubsecDev3\ClubsecDev3\ClubsecDev3\Logon.vb:line 167
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at ClubsecDev3.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

Monday, February 20, 2012

Problem connection to Express Edition with C#

I'm using .NET 2.0 and SQL Server 2005 Express Edition on WinXP SP2. I'm
using System.Data.SqlClient to connect to the server which is on the same
machine. The SQL Server service is set to log on as "Built-in account: Local
System" and the connection string I'm passing to the constructor is "Data
Source=(local);Initial Catalog=TestDB;" everything else is set to defaults.
I get the following error: "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:
Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"
Any help would be greatly appreciated.
I was fiddling around with different connection strings and this one finally
allowed me to connect: "Data Source=.\\SQLEXPRESS;Initial
Catalog=TestDB;Integrated Security=SSPI;"
"Frustrated" wrote:

> I'm using .NET 2.0 and SQL Server 2005 Express Edition on WinXP SP2. I'm
> using System.Data.SqlClient to connect to the server which is on the same
> machine. The SQL Server service is set to log on as "Built-in account: Local
> System" and the connection string I'm passing to the constructor is "Data
> Source=(local);Initial Catalog=TestDB;" everything else is set to defaults.
> I get the following error: "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:
> Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"
> Any help would be greatly appreciated.
|||You 'normally' always provide at least three pieces of information for a
connection. The Server, the database, and the security context.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"Frustrated" <Frustrated@.discussions.microsoft.com> wrote in message
news:0C3946E2-F417-4345-94E7-57B0BA6F9169@.microsoft.com...[vbcol=seagreen]
>I was fiddling around with different connection strings and this one
>finally
> allowed me to connect: "Data Source=.\\SQLEXPRESS;Initial
> Catalog=TestDB;Integrated Security=SSPI;"
> "Frustrated" wrote:

Problem connection to Express Edition with C#

I'm using .NET 2.0 and SQL Server 2005 Express Edition on WinXP SP2. I'm
using System.Data.SqlClient to connect to the server which is on the same
machine. The SQL Server service is set to log on as "Built-in account: Local
System" and the connection string I'm passing to the constructor is "Data
Source=(local);Initial Catalog=TestDB;" everything else is set to defaults.
I get the following error: "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:
Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
"
Any help would be greatly appreciated.I was fiddling around with different connection strings and this one finally
allowed me to connect: "Data Source=.\\SQLEXPRESS;Initial
Catalog=TestDB;Integrated Security=SSPI;"
"Frustrated" wrote:

> I'm using .NET 2.0 and SQL Server 2005 Express Edition on WinXP SP2. I'm
> using System.Data.SqlClient to connect to the server which is on the same
> machine. The SQL Server service is set to log on as "Built-in account: Loc
al
> System" and the connection string I'm passing to the constructor is "Data
> Source=(local);Initial Catalog=TestDB;" everything else is set to defaults
.
> I get the following error: "System.Data.SqlClient.SqlException: An error h
as
> occurred while establishing a connection to the server. When connecting t
o
> SQL Server 2005, this failure may be caused by the fact that under the
> default settings SQL Server does not allow remote connections. (provider:
> Named Pipes Provider, error: 40 - Could not open a connection to SQL Serve
r)"
> Any help would be greatly appreciated.|||You 'normally' always provide at least three pieces of information for a
connection. The Server, the database, and the security context.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"Frustrated" <Frustrated@.discussions.microsoft.com> wrote in message
news:0C3946E2-F417-4345-94E7-57B0BA6F9169@.microsoft.com...[vbcol=seagreen]
>I was fiddling around with different connection strings and this one
>finally
> allowed me to connect: "Data Source=.\\SQLEXPRESS;Initial
> Catalog=TestDB;Integrated Security=SSPI;"
> "Frustrated" wrote:
>

Problem connecting using Windows XP Professional

Greetings,

I installed SQL Express 2005 on my machine with XP Professional. My machine name is ROBERT and my user name is Rob. I did not get asked during the installation to supply an administrator password.

Following the installation when I try to connect using a C# app and setting IntegratedSecurity to true I get told that ROBERT\Rob is not authorised to connect to the database (paraphrased as I do not have the exact error message with me).

How do I go about adding my user name to the database if I do not know what the "sa" password is ?

Thanks,

Robert

Hi Robert...you are having trouble with your Windows user most likely because you are not a valid user on the server as of yet...by default, the only valid users on the server are members of the BUILTIN\Administrators group and the SQL service account(s) and the sa (if appropriate).

If you don't know the sa password, you'll have to get somebody who is either a member of the Administrators group or who knows the SQL service account password(s) to login and add your windows user as a valid server login and provide the appropriate permissions to the appropriate database(s).

Look for the following commands in SQL Books Online for more help there:

CREATE LOGIN...

CREATE USER...

HTH,

Problem connecting to sql server express

Hi Guys

i have a problem with my asp.net 2.0 application, I'm trying to connect to sql server database but it gives the following error:

System.Data.SqlClient.SqlException: Cannot open database "MyDatabase" requested by the login. The login failed.
Login failed for user 'Myserver\ASPNET'.

Before i had my application on File System and it was connecting fine, now I moved it to IIS and it doesn't work anymore.

Connection at Web.Config file :

configuration>

<appSettings>

<addkey="ConnectionString"value="server=(local)\SQLEXPRESS; Trusted_Connection=true; database=MyDatabase"></add>

</appSettings>

<connectionStrings/>

How do i create login for that user?

Thanks

Hi, the ASPNET is the IIS account. You can take a look at this post:

http://forums.asp.net/thread/1356875.aspx

|||

Thanks Iori_Jay

That post really helped me, it's working now.

Problem connecting to SQL Server 2006 Express

I have been trying literally for months to get SQL Server 2005 Express to work on my Dell Dimension WinXPPro machine. I have installed and reinstalled both the server and the 'Management System'. I have shut down and restarted all of the related Local Component Services on my machine (with the exception of the SQL Server Active Directory Helper which will not start ?).

I have reviewed much of what is in this Forum related to SQL Server 2005 Express and I find that many have had similar problems. When a connection is attempted, the following message or some minor variation appears:


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) (Microsoft SQL Server, Error: -1)

In desparation, and at the suggestion of one of this forum's moderators, I went to try to download the SQL Server 2005 Express, Service Pack 2. I threaded my way through what I felt was an unecessarily complex set of links and finally reached a download site - but it was unclear whether or not the service pack was for SQL Server 2005 or the Express version. Giving up in dispair, it turn to you (once again BTW, I received no real help with this same question about a month ago).

Even though I seriously doubt if anyone will help me, I am willing to give it another try - mainly because I am home sick with the flu and having nothing better to do on a Sunday afternoon.

Thanks

Hi,

the SQL Server Express Edition are already slipstreamed with the Service pack. So doenloading the SP2 for SQL Server Express will automatically bring you to the current SP level. it would be helpful to see with which application you tried to connect (and the connectionstring if you use one). Make also sure to enable remote connections which is disabled by default. See the Screencast on my site for more information about this.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||

General E Pist wrote:

<font size="2">I have been trying literally for months to get SQL Server 2005 Express to work on my Dell Dimension WinXPPro machine. I have installed and reinstalled both the server and the 'Management System'. I have shut down and restarted all of the related Local Component Services on my machine (with the exception of the SQL Server Active Directory Helper which will not start ?).</font>

I have reviewed much of what is in this Forum related to SQL Server 2005 Express and I find that many have had similar problems. When a connection is attempted, the following message or some minor variation appears:

<blockquote><table width="85%"><tbody><tr><td class="quoteTable"><table width="100%"><tbody><tr><td class="txt4" valign="top" width="100%"><br>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) (Microsoft SQL Server, Error: -1)<br></td></tr></tbody></table></td></tr></tbody></table></blockquote>

In desparation, and at the suggestion of one of this forum's moderators, I went to try to download the SQL Server 2005 Express, Service Pack 2. I threaded my way through what I felt was an unecessarily complex set of links and finally reached a download site - but it was unclear whether or not the service pack was for SQL Server 2005 or the Express version. Giving up in dispair, it turn to you (once again BTW, I received no real help with this same question about a month ago).

Even though I seriously doubt if anyone will help me, I am willing to give it another try - mainly because I am home sick with the flu and having nothing better to do on a Sunday afternoon.

Thanks

I have found this same problem. I am trying to connect across a workgroup LAN, one PC W2kPro, One WinXPPro. I have now tried installing SQLExpress on both PCs. I have MS-SM Studio Express on both PCs. I still cannot connect to the WinXP machine from the W2K machine. Even the sseutil command line utility will not find the server running on the XP box when I use the -listsrv remote params. I disconnected from the internet, and turned off all firewalls, and still no conection. Tried IP address with Port, and still no joy. I was using the sa login and the correct password. I uninstalled SQLExpress, and re-installed. No good! The one thing that may be a problem, is that I have SQL 2000 Developer installed on both machines, but it is stopped. Using Studio Express on the XP box, I can connect to the local SQL Express and to the remote one on the W2K box. But what will it take to get a connection from the W2K box to the XP Box?|||Please post the error message you are getting. if you are in a workgroup you cannot use Windows authenntication, make sure you are using SQL Server authentication for connecting. Did you start SQL Browser on the computer in order to find the instances using -listsrv ? Did you also enabled remote connection ? You can find a screencast on my site how to enable it.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||

Jens K. Suessmeyer wrote:

Please post the error message you are getting. if you are in a workgroup you cannot use Windows authenntication, make sure you are using SQL Server authentication for connecting. Did you start SQL Browser on the computer in order to find the instances using -listsrv ? Did you also enabled remote connection ? You can find a screencast on my site how to enable it.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de


The error msg I get is..

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) (Microsoft SQL Server, Error: -1)

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

I am using the sa login and password.
SQL Browser is running (have stopped and started it several times) on both PCs.
SQL Express is set to mixed mode authentication.
SQL Express was installed with the DISABLENETWORKPROTOCOLS=0 setting and all are showing enabled.

I have set the connection timout up to 40 seconds, from the default 15, just in case that helped.

I have been at this for about 12 hours today, and did get a connection once, about 15 minutes ago. But now when I try and re-connect, I am back where I was this morning. Time for bed now, try again tomorrow.. :-( Maybe rebooting both PCs again may help.

I will have a look at your screencast in case I have missed something.

Thanks
John G|||On rebooting both PCs this morning, I am now able to reliable connect and re-connect between the two PCs on the workgroup LAN.

I looked at Jen's Screencast and when I checked all my configuration items, they were already set to correct values.

I still do not know what the problem was yesterday, but thanks to the pointers from Jens and others, it all now works as expected.

Next time, I shall remember to try several reboots.

Problem connecting to SQL Server 2000

Hi,
I installed SQL Server 2005 Express on one of my development machine, I had
since then having problem connecting to a SQL Server 2000 (On a cluster)
database. The problem persist even after I remove SQL Sever 2005 Express.
The following is the error message:
SAC.EDS.CorpAction.WithholdingTax.UnitTesting.WithholdingTaxOverrideRecordCr
eate :
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)
I do not experience the same problem when connecting from a machine without
SQL Sever 2005 Express installed. I don't know why ADO.NET 2.0 thinks I am
trying to connect to a SQL Server 2005 database.
Please advice!
Thanks,
John YungSome questions: Is the "developement machine" the same computer as the "SQL
Server 2000 (On a cluster)"? I know that's not likely but if so, your
problem may be related to SQL Server Browser.
Also regarding SQL Server Browser service, is the cluster a named instance
and what service pack is the SQL Server 2000 running?
--
Rick Byham
MCDBA, MCSE, MCSA
Lead Technical Writer,
Microsoft, SQL Server Books Online
This posting is provided "as is" with
no warranties, and confers no rights.
"John Yung" <johny@.sac.com> wrote in message
news:OtwVPId9FHA.2176@.TK2MSFTNGP14.phx.gbl...
> Hi,
> I installed SQL Server 2005 Express on one of my development machine, I
> had
> since then having problem connecting to a SQL Server 2000 (On a cluster)
> database. The problem persist even after I remove SQL Sever 2005 Express.
> The following is the error message:
> SAC.EDS.CorpAction.WithholdingTax.UnitTesting.WithholdingTaxOverrideRecord
Cr
> eate :
> 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)
> I do not experience the same problem when connecting from a machine
> without
> SQL Sever 2005 Express installed. I don't know why ADO.NET 2.0 thinks I am
> trying to connect to a SQL Server 2005 database.
> Please advice!
> Thanks,
> John Yung
>|||Rick,
The SQL Server 2000 is not on the development machine. According to our DBA,
SQL Server 2000 is running SP4. Further more, it is not a cluster (my
mistake), but an instance of SQL Server running on a single database
machine.
Thanks,
John Yung
"Rick Byham [MS]" <rickbyh@.online.microsoft.com> wrote in message
news:egE7pfd9FHA.444@.TK2MSFTNGP11.phx.gbl...
> Some questions: Is the "developement machine" the same computer as the
"SQL
> Server 2000 (On a cluster)"? I know that's not likely but if so, your
> problem may be related to SQL Server Browser.
> Also regarding SQL Server Browser service, is the cluster a named instance
> and what service pack is the SQL Server 2000 running?
> --
> Rick Byham
> MCDBA, MCSE, MCSA
> Lead Technical Writer,
> Microsoft, SQL Server Books Online
> This posting is provided "as is" with
> no warranties, and confers no rights.
> "John Yung" <johny@.sac.com> wrote in message
> news:OtwVPId9FHA.2176@.TK2MSFTNGP14.phx.gbl...
Express.
SAC.EDS.CorpAction.WithholdingTax.UnitTesting. WithholdingTaxOverrideRecordCr[color=dar
kred]
SQL
am
>|||I suspect your problem is related to either the configuration of the client
software on the formerly SQL Express computer, or the SQL Server Browser
Service on the server computer.
Installing SQL Server 2005 Express edition installed the SQL Native Client.
I don't know if your uninstall of Express also uninstalled the Microsoft SQL
Server Native Client. You can check that from Control Panel/Add and Remove
Programs, as it is listed separately. If the SQL Server Native Client was
removed, then you should go back to connecting from the SQL Server 2000
client software, but perhaps the install of Express somehow disabled that.
If SQL Server Native Client is not present, try reinstalling the client
software from the SQL Server 2000 CD.
If the SQL Server Native Client is still installed, which seems likely from
your error message, and if the SQL Server Browser service is not running on
the Server, the client may be having trouble resolving the instance name. Is
the SQL Server a named instance or the default instance? If it is the
default instance, then the Native Client will attempt to connect to the
machine name and port 1433. If the server is a named instance, and if the
SQL Server Browser Service is not running (as I suspect), then the SQL
Server Native Client has no way of figuring out what port to connect to. SQL
Server 2000 made different assumptions and so may be coordinating better
with SQL Server 2000.
So my advice, is first, make sure you have a client. Either SQL Server
Native Client, or reinstall the SQL Server 2000 software.
Second, see if the SQL Server Browser Service (SQLBROWSER) is present on the
server. If so, try starting the service, and then connecting.
If the SQL Server Browser Service is not present, and if the SQL Server 2000
is a named instance, you will need to connect using the port number, as in
computername,1500
--
Rick Byham
MCDBA, MCSE, MCSA
Lead Technical Writer,
Microsoft, SQL Server Books Online
This posting is provided "as is" with
no warranties, and confers no rights.
"John Yung" <johny@.sac.com> wrote in message
news:uqVO%23yd9FHA.4004@.TK2MSFTNGP14.phx.gbl...
> Rick,
> The SQL Server 2000 is not on the development machine. According to our
> DBA,
> SQL Server 2000 is running SP4. Further more, it is not a cluster (my
> mistake), but an instance of SQL Server running on a single database
> machine.
> Thanks,
> John Yung
> "Rick Byham [MS]" <rickbyh@.online.microsoft.com> wrote in message
> news:egE7pfd9FHA.444@.TK2MSFTNGP11.phx.gbl...
> "SQL
> Express.
> SAC.EDS.CorpAction.WithholdingTax.UnitTesting.WithholdingTaxOverrideRecord
Cr
> SQL
> am
>|||Rick,
I tried all your suggestions, but they don't work; for example: I use this
as connection string:
Data Source=QA1SQL02, 1500;Initial Catalog=saccorpaction;User
Id=sacweb;Password=websac1
note: QA1SQL02 is the database server name,
I got this error message:
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: TCP Provider, error: 0 - No connection could be made because the
target machine actively refused it.)
I am able to confirm that the problem is cause by ADO.NET 2.0, and not SQL
Server 2005 Express. I tried the software on a fresh machine with .NET 2.0
installed, i received the same error messages.
I don't understand why ADO.NET thinks I am trying to connect to SQL Server
2005 (unless the error message is hard-coded to 2005).
Please advice, thanks,
John Yung
"Rick Byham [MS]" <rickbyh@.online.microsoft.com> wrote in message
news:e5P2gep9FHA.3724@.TK2MSFTNGP10.phx.gbl...
> I suspect your problem is related to either the configuration of the
client
> software on the formerly SQL Express computer, or the SQL Server Browser
> Service on the server computer.
> Installing SQL Server 2005 Express edition installed the SQL Native
Client.
> I don't know if your uninstall of Express also uninstalled the Microsoft
SQL
> Server Native Client. You can check that from Control Panel/Add and Remove
> Programs, as it is listed separately. If the SQL Server Native Client was
> removed, then you should go back to connecting from the SQL Server 2000
> client software, but perhaps the install of Express somehow disabled that.
> If SQL Server Native Client is not present, try reinstalling the client
> software from the SQL Server 2000 CD.
> If the SQL Server Native Client is still installed, which seems likely
from
> your error message, and if the SQL Server Browser service is not running
on
> the Server, the client may be having trouble resolving the instance name.
Is
> the SQL Server a named instance or the default instance? If it is the
> default instance, then the Native Client will attempt to connect to the
> machine name and port 1433. If the server is a named instance, and if the
> SQL Server Browser Service is not running (as I suspect), then the SQL
> Server Native Client has no way of figuring out what port to connect to.
SQL
> Server 2000 made different assumptions and so may be coordinating better
> with SQL Server 2000.
> So my advice, is first, make sure you have a client. Either SQL Server
> Native Client, or reinstall the SQL Server 2000 software.
> Second, see if the SQL Server Browser Service (SQLBROWSER) is present on
the
> server. If so, try starting the service, and then connecting.
> If the SQL Server Browser Service is not present, and if the SQL Server
2000
> is a named instance, you will need to connect using the port number, as in
> computername,1500
> --
> Rick Byham
> MCDBA, MCSE, MCSA
> Lead Technical Writer,
> Microsoft, SQL Server Books Online
> This posting is provided "as is" with
> no warranties, and confers no rights.
> "John Yung" <johny@.sac.com> wrote in message
> news:uqVO%23yd9FHA.4004@.TK2MSFTNGP14.phx.gbl...
I
SAC.EDS.CorpAction.WithholdingTax.UnitTesting. WithholdingTaxOverrideRecordCr[color=dar
kred]
settings
I
>|||Rick,
I compile (VS.NET 2003) the same code in .NET 1.1 and it works:
This is the connection string I used:
Data Source=QA1SQL02\DEVSQL03;Initial Catalog=saccorpaction;User
Id=abc;Password=abc
I am very sure that the problem is from ADO.NET 2.0.
Thanks,
John Yung
"John Yung" <johny@.sac.com> wrote in message
news:Og6t59q%23FHA.984@.tk2msftngp13.phx.gbl...
> Rick,
> I tried all your suggestions, but they don't work; for example: I use this
> as connection string:
> Data Source=QA1SQL02, 1500;Initial Catalog=saccorpaction;User
> Id=sacweb;Password=websac1
> note: QA1SQL02 is the database server name,
> I got this error message:
> 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: TCP Provider, error: 0 - No connection could be made because
the
> target machine actively refused it.)
> I am able to confirm that the problem is cause by ADO.NET 2.0, and not SQL
> Server 2005 Express. I tried the software on a fresh machine with .NET 2.0
> installed, i received the same error messages.
> I don't understand why ADO.NET thinks I am trying to connect to SQL Server
> 2005 (unless the error message is hard-coded to 2005).
> Please advice, thanks,
> John Yung
>
> "Rick Byham [MS]" <rickbyh@.online.microsoft.com> wrote in message
> news:e5P2gep9FHA.3724@.TK2MSFTNGP10.phx.gbl...
> client
> Client.
> SQL
Remove
was
that.
> from
> on
name.
> Is
the
> SQL
> the
> 2000
in
our
the
machine,
> I
>
SAC.EDS.CorpAction.WithholdingTax.UnitTesting. WithholdingTaxOverrideRecordCrkred">
server.
> settings
thinks
> I
>|||Sorry, I'm a DBA, not a programmer. I'm pretty useless when it comes to
.NET.
--
Rick Byham
MCDBA, MCSE, MCSA
Lead Technical Writer,
Microsoft, SQL Server Books Online
This posting is provided "as is" with
no warranties, and confers no rights.
"John Yung" <johny@.sac.com> wrote in message
news:uGpS7br%23FHA.1032@.TK2MSFTNGP09.phx.gbl...
> Rick,
> I compile (VS.NET 2003) the same code in .NET 1.1 and it works:
> This is the connection string I used:
> Data Source=QA1SQL02\DEVSQL03;Initial Catalog=saccorpaction;User
> Id=abc;Password=abc
> I am very sure that the problem is from ADO.NET 2.0.
> Thanks,
> John Yung
>
> "John Yung" <johny@.sac.com> wrote in message
> news:Og6t59q%23FHA.984@.tk2msftngp13.phx.gbl...
> the
> Remove
> was
> that.
> name.
> the
> in
> our
> the
> machine,
> SAC.EDS.CorpAction.WithholdingTax.UnitTesting.WithholdingTaxOverrideRecord
Cr
> server.
> thinks
>|||Rick,
Do you know anyone from the ADO.NET group that could help me with this?
Thanks,
John Yung
"Rick Byham [MS]" <rickbyh@.online.microsoft.com> wrote in message
news:eqzdB30%23FHA.1028@.TK2MSFTNGP11.phx.gbl...
> Sorry, I'm a DBA, not a programmer. I'm pretty useless when it comes to
> .NET.
> --
> Rick Byham
> MCDBA, MCSE, MCSA
> Lead Technical Writer,
> Microsoft, SQL Server Books Online
> This posting is provided "as is" with
> no warranties, and confers no rights.
> "John Yung" <johny@.sac.com> wrote in message
> news:uGpS7br%23FHA.1032@.TK2MSFTNGP09.phx.gbl...
connections.
2000
client
likely
the
SQL
Server
Server
as
(my
database
SAC.EDS.CorpAction.WithholdingTax.UnitTesting. WithholdingTaxOverrideRecordCr[color=dar
kred]
>|||I am having this exact same problem. Have you found a solution?
Thanks,
Randy
"John Yung" wrote:

> Rick,
> I compile (VS.NET 2003) the same code in .NET 1.1 and it works:
> This is the connection string I used:
> Data Source=QA1SQL02\DEVSQL03;Initial Catalog=saccorpaction;User
> Id=abc;Password=abc
> I am very sure that the problem is from ADO.NET 2.0.
> Thanks,
> John Yung
>
> "John Yung" <johny@.sac.com> wrote in message
> news:Og6t59q%23FHA.984@.tk2msftngp13.phx.gbl...
> the
> Remove
> was
> that.
> name.
> the
> in
> our
> the
> machine,
> SAC.EDS.CorpAction.WithholdingTax.UnitTesting.WithholdingTaxOverrideRecord
Cr
> server.
> thinks
>
>|||There is a slight difference in the way ADO.NET 1.1 and 2.0 handle protocol
order that might be the issue here.
It's likely that the computer where SQL Server is running has Windows
Firewall enabled, and that the SQL Server TCP port (1433 by default,
variable if using a named instance such as SQLExpress) is blocked. It's also
likely that 1.1 is working because it's using named pipes instead of TCP,
which gets through the same channel as file-sharing which is typically open.
If this is the case in your scenario, you can do one of these:
a) force named pipes. you can do this by adding "np:" before the server
name. In your connection string it would be "Data Source=np:QA1SQL02"
b) open the SQL Server port in the firewall of the computer where SQL Server
is running
Regarding your question about SQL 2000 vs 2005, note that ADO.NET is not
, it's the error message that isn't clear; we meant that if this
*were* SQL Server 2005, then you may want to check out the connection
setting.
Pablo Castro
Program Manager - ADO.NET Team
Microsoft Corp.
This posting is provided "AS IS" with no warranties, and confers no rights.
"randyh@.newsgroups.nospam"
<randyhnewsgroupsnospam@.discussions.microsoft.com> wrote in message
news:6B79EE56-D70C-4AF0-86A5-18DDBDB8D4E5@.microsoft.com...
>I am having this exact same problem. Have you found a solution?
> Thanks,
> Randy
> "John Yung" wrote:
>