Problems Setting Up Database

J

Jonathan Wood

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(String file, String server,
String database, String dbFileName, SqlConnection connection, Boolean
sessionState, Boolean isInstall, SessionStateType sessionStatetype) +748
System.Web.Management.SqlServices.SetupApplicationServices(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.CreateMdfFile(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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top