Showing posts with label sqlexpress. Show all posts
Showing posts with label sqlexpress. Show all posts

Tuesday, March 27, 2012

Cannot remotely login to SQL Express since last windows update

Since today (after installing the latest Windows Updates !on my local machine!) I cannot login to a SQLExpress instance remotely; stating that it cannot find the server/instance.

The weird thing is: it only happens when I want to login to the non-default instance (sqlexpress 2005) (<IP>\<instance>).

When i'm using the default instance (msde 2000 or sqlexpress 2005 on another machine) (<IP>) it seems to work fine.

Does this have something to do with the windows updates, or is it just a coincedence?

Thanks in advance,

Remco RosThis is probably due to the update changed your setting. Just check your firewall on the server and put sqlbrowser.exe or UDP port 1434 to exception. Also make sure your sqlbrowser is running.|||we didn't install the updates on the server (yet) only on the client, so it must be a client thing.

Server:
Win 2003 / SQL Express 2005
Tcp/ip / named pipes: yes
sqlbrowser running
firewall exception on 1434udp 1433tcp.

tested on these client(s):
Local (without latest updates): CAN connect
XP Home with SQL Server Management studio (with lates windows updates): CANNOT connect
XP Pro with SQL Server Management studio Express (with lates windows updates): CANNOT connect
Win 2003 with SQL Server Management studio Express

(WITHOUT lates windows updates): CAN connect.

I see a pattern here...|||Are you sure your SQL Express listens on TCP port 1433 since your put 1433 in exception? What's the result if you run "telnet yourserver sql_tcp_port"? Can it connect? Could it be possible that IPSEC blocked the traffic between the problem machine if the IPSEC is on?

Thursday, March 22, 2012

Cannot open user default database. Login failed.

Hi,

I got this application system having SQLExpress as database (ABCSystem.mdf). I'm connecting to the database thru connection string specifying database path in App.config.

At the same time, I got two paths for the mdf files. The first one is the path for my database project while the second one is the path to conduct testing. (This means that I got identical ABCSystem.mdf in two paths)

1) C:\Program Files\Company ABC\ABCDatabaseProject\

2) C:\Program Files\Company ABC Limited\ABCSystem\Database\

In my development machine, I can run my application where database path is testing path (number 2).

When I tried to copy the ABCSystem.mdf and ABCSystem_log.LDF and my application program files to another PC to test, I got the subject error message. (note that I copy program files under directory "C:\Program Files\Company ABC Limited\ABCSystem\" and mdf files under "C:\Program Files\Company ABC Limited\ABCSystem\Database\")

I try to edit path from database testing path to database project path in app.config, run the application, and notice that it is running OK.

What seems to cause the problem? Coz I need the database in the testing path which is "C:\Program Files\Company ABC Limited\ABCSystem\Database\" AND NOT "C:\Program Files\Company ABC\ABCDatabaseProject\".

Thanks alot for your kind attention.

Try this first, and then check your string accordingly:

http://msdn2.microsoft.com/en-us/library/ms345332.aspx

Buck Woody

|||I'm having this identical issue with an ODBC connection.
After wasting hours, I realized I only get the error when I try to change database name. (e.g. from a development to a production server). Based upon everything I've tried, I determined you CANNOT change server name in a Crystal report programmatically as in the Crystal sample code. It may be a possible to change servers if using a command based report (explicit SQL query), but our reports all use tables so a trial would be irrelevant.

Cannot open user default database. Login failed.

Hi,

I got this application system having SQLExpress as database (ABCSystem.mdf). I'm connecting to the database thru connection string specifying database path in App.config.

At the same time, I got two paths for the mdf files. The first one is the path for my database project while the second one is the path to conduct testing. (This means that I got identical ABCSystem.mdf in two paths)

1) C:\Program Files\Company ABC\ABCDatabaseProject\

2) C:\Program Files\Company ABC Limited\ABCSystem\Database\

In my development machine, I can run my application where database path is testing path (number 2).

When I tried to copy the ABCSystem.mdf and ABCSystem_log.LDF and my application program files to another PC to test, I got the subject error message. (note that I copy program files under directory "C:\Program Files\Company ABC Limited\ABCSystem\" and mdf files under "C:\Program Files\Company ABC Limited\ABCSystem\Database\")

I try to edit path from database testing path to database project path in app.config, run the application, and notice that it is running OK.

What seems to cause the problem? Coz I need the database in the testing path which is "C:\Program Files\Company ABC Limited\ABCSystem\Database\" AND NOT "C:\Program Files\Company ABC\ABCDatabaseProject\".

Thanks alot for your kind attention.

Try this first, and then check your string accordingly:

http://msdn2.microsoft.com/en-us/library/ms345332.aspx

Buck Woody

|||I'm having this identical issue with an ODBC connection.
After wasting hours, I realized I only get the error when I try to change database name. (e.g. from a development to a production server). Based upon everything I've tried, I determined you CANNOT change server name in a Crystal report programmatically as in the Crystal sample code. It may be a possible to change servers if using a command based report (explicit SQL query), but our reports all use tables so a trial would be irrelevant.

Cannot open user default database, login fails

hi:
I got the problem, which lots of people might encounter before.

In my case, I use login control and sqlexpress to build a login page.
when password & user name were entered. It gave me:
"Cannot open user default database, login fails"

The solution given by msdn is:

SQL Server 2005

You can use the sqlcmd utility to change the default database in SQL Server 2005. To do this, follow these steps:

1.Click Start, click Run, type cmd, and then press ENTER. 2.Use one of the following methods, depending on the kind of authentication that the SQL Server login uses:

?If

the SQL Server login uses Microsoft Windows authentication to connect

to the instance, type the following at the command prompt, and then

press ENTER:

sqlcmd –E -S InstanceName –d master

?If

the SQL Server login uses SQL Server authentication to connect to the

instance, type the following at the command prompt, and then press

ENTER:

sqlcmd -S InstanceName -d master -U SQLLogin -P Password

Note InstanceName is a placeholder for the name of the SQL Server 2005 instance to which you are connecting. SQLLogin is a placeholder for the SQL Server login whose default database has been dropped. Password is a placeholder for the SQL Server login password.3.At the sqlcmd prompt, type the following, and then press ENTER:

ALTER LOGIN SQLLogin WITH DEFAULT_DATABASE = AvailDBName

Note AvailDBName is a placeholder for the name of the existing database that can be accessed by the SQL Server login in the instance.4.At the sqlcmd prompt, type GO, and then press ENTER.

I wonder what are InstanceName, SQLLogin & AvailDBName. It would be nice if someone can give me a specific example, since I am not sure how to type them in a command line. :)

You're in the wrong forum. Try here: http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=84&SiteID=1

-Jamie

Monday, March 19, 2012

Cannot open database "aspnetdb.mdf" requested by the login. The login failed.

Hello Guys

This is my connection string

<add name ="ASPNETDBConnectionString1" connectionString ="Data Source= .\SQLEXPRESS; Integrated Security = True; DataBase = ASPNETDB.MDF; User ID = MyWindowsUserName; Password = MyWindowsPassword; User Instance = False; Connect Timeout = 30" providerName ="System.Data.SqlClient"/>

I tried to research on the internet and i got a solution on changing the permissions for this database to enable user SystemName/ASPNET, but iam not able to access this ASPNETDB.MDF from SqlServer and if i go to server explorer in vs2005, i dint know where to chage the permissions.

Can anyone help me on this.

Thanks a lot

The ASPNET account needs to have access both to the server and to the ASPNETDB database. It seems you have granted server access to the account, but not database access.

To grant database access, connect to SQL Server using Management Studio and execute the following SQL statements:

use ASPNETDB
go
create user [SystemName\ASPNET]
go

Thanks
Laurentiu

|||

hi,

Thanks for your info abt the adding of aspnet account in the ASPNETDB Db.

I have created a website using VS 2005, and my SQL Server 2005 -STD Edition(NOT SQLEXPRESS). When ever i try to connect to the database i get this following error : Cannot open database ASPNETDB.MDF requested by the login, login failed. Login failed for user DOMAIN|USERNAME.

FYI, I have added my DOMAIN\username in the Security - Logins of the Database. I have also done the user mappings. That screen reads as follows :
1. Master Database -

Still I get this error. Please help me understand that whether any other permissions is required in the database for me.

Thanks

krans001

|||

hi,

I get this error when i try to execute a website just having a DEFAULT.aspx in which i have added a webpartsmanager. the personalization property of the webpartmanager is set to TRUE and USER. The following steps I did:

1. Installed the Microsoft SQL Server Management Studio 9.00.1399.00 ( STANDERD EDITION).

2. from the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 installed the aspnet_regsql and followed the steps in installing the aspnetdb database.

In the usermappings i have provided permissions to me "DOMAIN\USERNAME" to the following db: 1. master 2. msdb 3. tempdb 4. aspnetdb

3. in the edit global configuration removed the USER INSTANCE=TRUE from the following
Data Source=.\MSSQLSERVER2005;Initial Catalog=aspnetdb.mdf;Integrated Security=True

4. edited the machine.config file under the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG
as
<add name="LocalSqlServer" connectionString="Data Source=.\MSSQLSERVER2005;Initial Catalog=aspnetdb.mdf;Integrated Security=True" providerName="System.Data.SqlClient" />

After doing this i tried to execute the website that i have created which holds a default.aspx page in which i have the webpartmanager. I just wanted to view this file in the browser. As soon as i do this i get this error.

Cannot open database "aspnetdb.mdf" requested by the login. The login failed. Login failed for user 'DOMAIN\USERNAME'.

Thanks in advance for the solution. Please help.. if anyone has a solution please send it immediately to my email id : sriranga.kr@.gmail.com

|||

hi

all i did was removed the .mdf in the connection string and run the same. It works like a charm..

great...

|||

hi sreeksdave

all you need to do is to change the following :

<add name ="ASPNETDBConnectionString1" connectionString ="Data Source= .\SQLEXPRESS; Integrated Security = True; DataBase = ASPNETDB.MDF; User ID = MyWindowsUserName; Password = MyWindowsPassword; User Instance = False; Connect Timeout = 30" providerName ="System.Data.SqlClient"/>

AS

<add name ="ASPNETDBConnectionString1" connectionString ="Data Source= .\SQLEXPRESS; Integrated Security = True; Initial Catalog= ASPNETDB" providerName ="System.Data.SqlClient"/>

and see how it works..

Do let me know..

Regards

scotty

|||I think this should be rather aspnetdb than aspnetdb.mdf, if you use a user instance you have to specify the filename but with attached database you can just type in the name of the database.

HTH, jens Suessmeyer.

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

Remember that both files ASPNETDB.MDF and aspnetdb_log.LDF are in a folder call App_Data in you project solution, just make sure that you give the right access privileges to your local MACHINE\ASPNET account

Hope this will help

|||

Hi all,

Thanks for all your contribution. It has worked for me and i have also helped few people.

Thanks & Regards

Raaj

|||

Hello Ranga,

Thanks a lot yar.

Hats off

Cannot Open / Create SQL Express Databases (.mdf files) in Visual Studio 2005 Professional

Hi, I am trying to open or create a sqlexpress database within Visual Studio 2005 Professional in the App_Data folder. If I attempt either method, I get the following dialog box:

Required Components Missing

Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly. Please verify the installation of the component or download from the URL: http://go.microsoft.com/fwlink/?LinkID=49251

The link above just takes you to the download page for Sql Server Express 2005.

I have both SQL Server 2005 Developer and SQL Server 2005 Expression instances running. The existing database will work properly in my web application, however I cannot access it through Visual Studio.

As background, I did have a problem connecting to the database via the web application, receiving a "Failed to generate a User Instance of SQL Server" error. But I was able to fix that by renaming my SQLEXPRESS folder in C:\Documents and Settings\user\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data. When the web page ran, it created another SQLEXPRESS folder.

However, I cannot figure out why I am having the other issue.

Thanks in advance

Patrick


Hi,

This error means that you are not pointing to the correct instance.

Right click the mdf database > Modify Connection > Advanced > Data Source string.

Check this string and see if it points to the correct instance

HTH,
Suprotim Agarwal

--
http://www.dotnetcurry.com
--

Sunday, March 11, 2012

cannot login to SQLExpress 2005 help please!!

I just installed SQL express couple of days ago.

Then I tried using SQL Management Express Studio CTP. I select

SQL Authetication, key in the correct password but

it says "A connection was succesfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error:0 - No process is on the other end of the pipe). (Microsoft Sql Error: 233)

When i tried windows authetication, it say cannot initialise SSPI package.

I went to download the windows fix after reading this article

http://www.pcreview.co.uk/forums/thread-1714474-2.php

since google on SSPI has no useful results.... I will be grateful if microsoft people fix this bug with SQL Server 2005 express cos newbies will not be able to understand what

SSPI means.... and failure to install and use an easy software like MS SQL Server will lead to people running to Mysql . sighed.

Wednesday, March 7, 2012

Cannot install SQLExpress after uninstalling June CTP

I try to install SQL Server Express after uninstalling its beta and get the following error in the log file. Can anyone help me? Thanks.

Microsoft SQL Server 2005 Setup beginning at Thu Dec 15 20:28:39 2005
Process ID : 110612
c:\e7b4645908c60721e3107fa330d0184a\setup.exe Version: 2005.90.1399.0
Running: LoadResourcesAction at: 2005/11/15 20:28:38
Complete: LoadResourcesAction at: 2005/11/15 20:28:38, returned true
Running: ParseBootstrapOptionsAction at: 2005/11/15 20:28:38
Loaded DLL:c:\e7b4645908c60721e3107fa330d0184a\xmlrw.dll Version:2.0.3604.0
Complete: ParseBootstrapOptionsAction at: 2005/11/15 20:28:39, returned true
Running: ValidateWinNTAction at: 2005/11/15 20:28:39
Complete: ValidateWinNTAction at: 2005/11/15 20:28:39, returned true
Running: ValidateMinOSAction at: 2005/11/15 20:28:39
Complete: ValidateMinOSAction at: 2005/11/15 20:28:39, returned true
Running: PerformSCCAction at: 2005/11/15 20:28:39
Complete: PerformSCCAction at: 2005/11/15 20:28:39, returned true
Running: ActivateLoggingAction at: 2005/11/15 20:28:39
Complete: ActivateLoggingAction at: 2005/11/15 20:28:39, returned true
Delay load of action "DetectPatchedBootstrapAction" returned nothing. No action will occur as a result.
Action "LaunchPatchedBootstrapAction" will be skipped due to the following restrictions:
Condition "EventCondition: __STP_LaunchPatchedBootstrap__110612" returned false.
Running: PerformSCCAction2 at: 2005/11/15 20:28:39
Loaded DLL:C:\WINDOWS\system32\msi.dll Version:3.1.4000.2435
Product "{2AFFFDD7-ED85-4A90-8C52-5DA9EBDC9B8F}" versioned 9.00.1116 is not compatible with current builds of SQL Server.Expected at least version: 9.00.1399.06
The Product Name is "Microsoft SQL Server 2005 Express Edition CTP"
Loaded DLL:C:\WINDOWS\system32\msi.dll Version:3.1.4000.2435
Error: Action "PerformSCCAction2" threw an exception during execution.
Return Code: 70032
Message displayed to user
SQL Server 2005 Setup has detected incompatible components from beta versions of Visual Studio, .NET Framework, or SQL Server 2005. Use Add or Remove Programs to remove these components, and then run SQL Server 2005 Setup again. For detailed instructions on uninstalling SQL Server 2005, see the SQL Server 2005 Readme.

Class not registered.
Delay load of action "UploadDrWatsonLogAction" returned nothing. No action will occur as a result.
Message pump returning: 70032

Here's the problem:

Product "{2AFFFDD7-ED85-4A90-8C52-5DA9EBDC9B8F}" versioned 9.00.1116 is not compatible with current builds of SQL Server.Expected at least version: 9.00.1399.06

You can uninstall this from the command line using the following command:

msiexec /x {2AFFFDD7-ED85-4A90-8C52-5DA9EBDC9B8F}

jeff.

|||

I get the following error when I execute the command msiexec /x {2AFFFDD7-ED85-4A90-8C52-5DA9EBDC9B8F}

Thanks,

Event Type: Error
Event Source: MsiInstaller
Event Category: None
Event ID: 10005
Date: 12/15/2005
Time: 11:59:17 PM
User: TWSERVER3\Administrator
Computer: TWSERVER3
Description:
Product: Microsoft SQL Server 2005 Express Edition CTP -- Error 29628. The setup has encountered an unexpected error in datastore. The action is RestoreSetupParams. The error is :Failed to read property "InstallIds" {"MachineConfiguration", "", "TWSERVER3"} from cache
Unable to write property into cache: IsClustered
Unable to write property into cache: "IsClustered"
XmlRW Error: Failure loading xmlrw.dll
CheckAllProcedures() returned: 2


|||Different server, same error message though on trying to uninstall.|||Yep, me too. Exactly the same problem as you guys. How do we get rid of the wretched thing?|||

I am not sure if the following will work in your case, but that work in my case finally:

1. Delete all directories related to the previous version of SQL Server.

2. Search and deleted all keys(or parent key) of 2AFFFDD7-ED85-4A90-8C52-5DA9EBDC9B8F(in my case).

After that, I successfully install SQL Server Express.

|||

That seems to have worked for me too.

Many thanks for your help.

Friday, February 24, 2012

Cannot Install AdventureWorks database.

I downloaded AdventureWorksDB from the CodePlex website and tried to install it. When the install program tried to attach it to SQLEXPRESS, it gave the error (below). I've also tried attaching the database directly using the SQL Management Studio and got exactly the same error.

I'd never heard of having incompatible database versions for SQL Server before. Am I missing a patch for SQLEXPRESS or ?. Thanks.

=================================================================

The database 'AdventureWorks' cannot be opened because it is version 631. This server supports version 612 and earlier. A downgrade path is not supported.
Could not open new database 'AdventureWorks'. CREATE DATABASE is aborted. (.Net SqlClient Data Provider)


Server Name: HP-MEDIACENTER\SQLEXPRESS
Error Number: 948
Severity: 20
State: 1
Line Number: 1

Sounds like the one in Codepley had been attached to SQL Server 2008, you should post that as a bug to the appropiate persons.

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||

I got the following response from Microsoft Press that solves the problem:

================================

Thank you for contacting Microsoft Press.

Please make sure you are downloading the correct AdventureWorks database for SQL Server 2005. The CodePlex website contains two versions of the database, one for SQL Server 2008 and one for SQL Server 2005. If you are viewing the AdventureWorks database download release for SQL Server 2008 you must click “SQL Server 2005 SP2a” in the Releases box on the right hand side. You can also use the following link to download the SQL Server 2005 version directly at: http://www.codeplex.com/MSFTDBProdSamples/Release/ProjectReleases.aspx?ReleaseId=4004.

|||

I faced the same problem and your answer helped me too!

Thanks buddy!

|||

Same issue for me too. It's working now. Thanks very much for posting the answer.

|||Ditto. Fixed me too.

Cannot Install AdventureWorks database.

I downloaded AdventureWorksDB from the CodePlex website and tried to install it. When the install program tried to attach it to SQLEXPRESS, it gave the error (below). I've also tried attaching the database directly using the SQL Management Studio and got exactly the same error.

I'd never heard of having incompatible database versions for SQL Server before. Am I missing a patch for SQLEXPRESS or ?. Thanks.

=================================================================

The database 'AdventureWorks' cannot be opened because it is version 631. This server supports version 612 and earlier. A downgrade path is not supported.
Could not open new database 'AdventureWorks'. CREATE DATABASE is aborted. (.Net SqlClient Data Provider)


Server Name: HP-MEDIACENTER\SQLEXPRESS
Error Number: 948
Severity: 20
State: 1
Line Number: 1

Sounds like the one in Codepley had been attached to SQL Server 2008, you should post that as a bug to the appropiate persons.

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||

I got the following response from Microsoft Press that solves the problem:

================================

Thank you for contacting Microsoft Press.

Please make sure you are downloading the correct AdventureWorks database for SQL Server 2005. The CodePlex website contains two versions of the database, one for SQL Server 2008 and one for SQL Server 2005. If you are viewing the AdventureWorks database download release for SQL Server 2008 you must click “SQL Server 2005 SP2a” in the Releases box on the right hand side. You can also use the following link to download the SQL Server 2005 version directly at: http://www.codeplex.com/MSFTDBProdSamples/Release/ProjectReleases.aspx?ReleaseId=4004.

|||

I faced the same problem and your answer helped me too!

Thanks buddy!

|||

Same issue for me too. It's working now. Thanks very much for posting the answer.

Cannot Install AdventureWorks database.

I downloaded AdventureWorksDB from the CodePlex website and tried to install it. When the install program tried to attach it to SQLEXPRESS, it gave the error (below). I've also tried attaching the database directly using the SQL Management Studio and got exactly the same error.

I'd never heard of having incompatible database versions for SQL Server before. Am I missing a patch for SQLEXPRESS or ?. Thanks.

=================================================================

The database 'AdventureWorks' cannot be opened because it is version 631. This server supports version 612 and earlier. A downgrade path is not supported.
Could not open new database 'AdventureWorks'. CREATE DATABASE is aborted. (.Net SqlClient Data Provider)


Server Name: HP-MEDIACENTER\SQLEXPRESS
Error Number: 948
Severity: 20
State: 1
Line Number: 1

Sounds like the one in Codepley had been attached to SQL Server 2008, you should post that as a bug to the appropiate persons.

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||

I got the following response from Microsoft Press that solves the problem:

================================

Thank you for contacting Microsoft Press.

Please make sure you are downloading the correct AdventureWorks database for SQL Server 2005. The CodePlex website contains two versions of the database, one for SQL Server 2008 and one for SQL Server 2005. If you are viewing the AdventureWorks database download release for SQL Server 2008 you must click “SQL Server 2005 SP2a” in the Releases box on the right hand side. You can also use the following link to download the SQL Server 2005 version directly at: http://www.codeplex.com/MSFTDBProdSamples/Release/ProjectReleases.aspx?ReleaseId=4004.

|||

I faced the same problem and your answer helped me too!

Thanks buddy!

|||

Same issue for me too. It's working now. Thanks very much for posting the answer.

|||Ditto. Fixed me too.