468,530 Members | 1,570 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,530 developers. It's quick & easy.

Problems Setting Up Database

I seem to be having errors creating and accessing an SQL database.
Unfortunatley, I am brand new to SQL setup and administration issues so this
really is not my area of expertise.

I know I had to install some type of IIS component to run databases from
Visual Studio 2003. Since then, I've installed Visual Studio 2005. I know VS
2005 has some component so that IIS is not required.

Here's the two errors:

I right click on Data Connections in the Server Explorer and choose 'Create
New SQL Server Database'. It doesn't seem to matter if I select my computer
name or enter localhost as the server name. I select Use Windows
Authentication. I enter a database name and hit OK. After some delay, I get
the following error:
>>>>>
Microsoft Visual Studio
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 remot connections.
(provider: Named Pipes Provider, error: 40 - Count no open a connection to
SQL Server).
<<<<<

Then, I get what seems to be a related error when I create a personal
website starter. It seems to create okay but when I run it I get an error
page:
>>>>>
Server Error in '/Starter1' Application.
--------------------------------------------------------------------------------
An error occurred during the execution of the SQL file 'InstallCommon.sql'.
The SQL error number is -2 and the SqlException message is: Timeout expired.
The timeout period elapsed prior to completion of the operation or the
server is not responding.
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.

SQLExpress database file auto-creation error:

The connection string specifies a local Sql Server Express instance using a
database location within the applications App_Data directory. The provider
attempted to automatically create the application services database because
the provider determined that the database does not exist. The following
configuration requirements are necessary to successfully check for existence
of the application services database and automatically create the
application services database:

If the applications App_Data directory does not already exist, the web
server account must have read and write access to the applications
directory. This is necessary because the web server account will
automatically create the App_Data directory if it does not already exist.

If the applications App_Data directory already exists, the web server
account only requires read and write access to the applications App_Data
directory. This is necessary because the web server account will attempt to
verify that the Sql Server Express database already exists within the
applications App_Data directory. Revoking read access on the App_Data
directory from the web server account will prevent the provider from
correctly determining if the Sql Server Express database already exists.
This will cause an error when the provider attempts to create a duplicate of
an already existing database. Write access is required because the web
server accounts credentials are used when creating the new database.
Sql Server Express must be installed on the machine.
The process identity for the web server account must have a local user
profile. See the readme document for details on how to create a local user
profile for both machine and domain accounts.

Source Error:
An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

Stack Trace:
[SqlExecutionException: An error occurred during the execution of the SQL
file 'InstallCommon.sql'. The SQL error number is -2 and the SqlException
message is: Timeout expired. The timeout period elapsed prior to completion
of the operation or the server is not responding.]
System.Web.Management.SqlServices.ExecuteFile(Stri ng file, String server,
String database, String dbFileName, SqlConnection connection, Boolean
sessionState, Boolean isInstall, SessionStateType sessionStatetype) +748
System.Web.Management.SqlServices.SetupApplication Services(String server,
String user, String password, Boolean trusted, String connectionString,
String database, String dbFileName, SqlFeatures features, Boolean install)
+538
System.Web.Management.SqlServices.Install(String database, String
dbFileName, String connectionString) +26
System.Web.DataAccess.SqlConnectionHelper.CreateMd fFile(String
fullFileName, String dataDir, String connectionString) +386

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
Version:2.0.50727.42
<<<<<

If anyone can offer some advice, I'd really appreciate it!

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com
Aug 27 '06 #1
0 1362

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by George McLean | last post: by
3 posts views Thread by Roy Souther | last post: by
3 posts views Thread by Darryl Gore | last post: by
7 posts views Thread by Dan | last post: by
2 posts views Thread by Tomas Vera | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.