1
Answer

SQL Server 2005 logs "Starting up database TestDB" at each website request

dennieku

dennieku

18y
5.1k
1

Hi,

I'm using a database on SQL Server 2005 Express Edition for my ASP.NET 1.1 application. For testing purposes I've scheduled an app which connects to the homepage of the web application, for every 15 minutes.
I've noticed that at each request from this scheduled app the message "Starting up database TestDB" is logged in the Event log, by SQL Server.

This does not look very good to me. Can anybody tell me if this can be a problem or I can ignore this. If this will be a problem, how can I solve this then?

Thx,
Dennieku

Answers (1)
0
Pradeep Chandraker

Pradeep Chandraker

NA 4k 650.8k 13y
Try this.

string connStr = ConfigurationManager.AppSettings[
Constants.appSettingsDataFolderPath].ToString();

Or, you can try this if you have your database connection information in web.config connectionStrings section.

string 
connStr = ConfigurationManager.ConnectionStrings[Constants.appSettingsDataFolderPath].ConnectionString;

0
Vulpes

Vulpes

NA 98.3k 1.5m 13y
Try:

string connectionString = (string)Application[Constants.appSettingsDataFolderPath];