Showing posts with label samples. Show all posts
Showing posts with label samples. Show all posts

Tuesday, March 20, 2012

Cannot open database on local server

Server Error in '/QuickStartv20/aspnet/samples/data' Application.


This is the error i am getting when i was going through the asp .net quickstart tutorials to learn using the databases. I have installed sql server 2005 on windows xp along with asp .net framework 2.0 on my system. i am student, so i dont how to configure a database. i went through a lot of tutorials of microsoft and macromedia but was unable to get the information requirred to create and access the database on asp .net and sql servers. they assumed that all know how to configure the database to work with the dynamic pages.

|||||||||||||||||||||||||

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Cannot open database "pubs" requested by the login. The login failed.
Login failed for user 'MLHPR\ASPNET'.

|||||||||||||||||||||||||

this was another line from the error page.i need help in configuring the sql (and asp .net) server to use the database. i have been getting a lot these error pages when i tried to open (local)database related pages on my system.

i am very much thankful to any help given in this regard.

It looks like the user in the machine/domain MLHPR called ASPNET is the one trying to access the database. I'll bet there's no login for that user in the system.

The first thing to do is try and see if you can connect at all - on the server where SQL Server lives, type this at a Windows command prompt:

osql -E -d pubs -Q "SELECT 'I got in.'"

If you see the words "I got in" on the screen, then SQL Server is up and running. If not, either SQL isn't installed or there is no database called "pubs" on it.

You can read more about SQL Server security here: http://www.informit.com/guides/content.asp?g=sqlserver&seqNum=35&rl=1

Note: If this answers your question, make sure you mark it "answered" so that others can find it!

Buck Woody
http://www.buckwoody.com

|||

thanks you very much for your response

ya pubs was not configured to be used with the sql server. i searched for the file and found the file in some folder of sql but not on the sql server. then i worked around in the microsoft .net folder to find the installation file for configuring the databases 'pubs' and 'northwind' on the sql server.

when i installed the file it worked fine.another reason was that i forgot to add the server to the expection list of the firewall.

the installation file for databases was in the 'microsoft .net/sdk/v2.0/samples/setup/' folder for using with quickstart samples of the asp .net.

Saturday, February 25, 2012

cannot install samples

hi to all,

i just installed sql server 2005 express edition. I also downloaded and run the "Northwind and pubs Sample Databases" and i have problem installing them

In the line of the guide that i have to run
sqlcmd -s .\SQLExpress -i instnwnd.sql

i get the following error:

HResult 0x2, Level 16, State 1
Named Pipes provider: could not open a connection to Sql Server [2].
Sqlcmd: Error: Microsoft SQL Native Client : An error has occured while establishing a connection to the server. When connecting to the Sql Server 2005, this failuremay be caused by the fact that under the default setting Sql Server does not allow remote connections..
SqlCmd: Error: Microsoft Sql Native Client : Login timeout expired
I also cannot connect through C# express and take the same error. SqlServer and SqlBrowser are up and running...

Can anyone help me please ?

Thanks in advance

AnthonyHi.

Make sure TCP/IP access is enabled in Configuration Manager.|||I already have tcp/ip enabled...But except from that, i suppose that is not needed for local connections, isn't it ?

Still, not working...|||You need to use sqlcmd -S that's capital S. small s is a different parameter

Sunday, February 19, 2012

Cannot in install samples.

When I try to install the x64 version of the AdventureWorks sample database I get an error indicating that the file is corrupt (data1.cab). Is there another version or somewhere else I can go to download the sample .msi files? Currently I am going to http://www.microsoft.com/downloads/details.aspx?FamilyId=E719ECF7-9F46-4312-AF89-6AD8702E4E6E&displaylang=en and downloading SqlServerSamples_x64.msi and AdventureWorksDB_x64.msi.

Thank you.

Kevin Burton

rkevinburton@.charter.net

Hi Kevin,

You're right, there is a problem with that .msi file. We're working on a fix this week and should have the site updated with the corrected file in a few days. For more information, see the Sample blog on the same subject here: http://blogs.msdn.com/bonniefe/archive/2006/04/21/580777.aspx#comments

Regards,

Gail

|||

This problem has been fixed. Please give it another try.