Showing posts with label ldf. Show all posts
Showing posts with label ldf. Show all posts

Friday, March 30, 2012

please help me out

my mdf and ldf are in 1 drive only. i am facing query timeout problem for
this server which is mainly used for employees
if i separate ldf into another drive will there will be any perf benefit
can i add another log file
how to clean up my log fileraghu veer wrote:
> my mdf and ldf are in 1 drive only. i am facing query timeout problem
> for this server which is mainly used for employees
> if i separate ldf into another drive will there will be any perf
> benefit can i add another log file
> how to clean up my log file
No way to know for sure given the limited amount of information.
Assuming you do not have SQL tuning problems or CPU-related issues (not
enough CPU or other services/applications using too much), then a drive
change should be in order. It's always a good idea to separate data and
log files.
A query timeout occurs when you set a maximum limit for query execution
in your code. Have you set a maximum timeout value? Make sure you roll
back the transaction when the query times out.
David Gugick
Quest Software
www.imceda.com
www.quest.com|||BOL has this
SET QUERY_GOVERNOR_COST_LIMIT
Overrides the currently configured value for the current connection.
Syntax
SET QUERY_GOVERNOR_COST_LIMIT value
Arguments
value
Is a numeric or integer value indicating if all queries are allowed to run
(value of 0) or if no queries are allowed to run with an estimated cost
greater than the specified nonzero value. If a numeric value is specified,
Microsoft? SQL Server? truncates it to an integer.
Remarks
Using SET QUERY_GOVERNOR_COST_LIMIT applies to the current connection only
and lasts the duration of the current connection. Use the query governor cos
t
limit option of sp_configure to change the server-wide query governor cost
limit value. For more information about configuring this option, see
sp_configure and Setting Configuration Options.
The setting of SET QUERY_GOVERNOR_COST_LIMIT is set at execute or run time
and not at parse time.
Permissions
SET QUERY_GOVERNOR_COST_LIMIT permissions default to members of the symin
fixed server role.
Regards
R.D
--Knowledge gets doubled when shared
"David Gugick" wrote:

> raghu veer wrote:
> No way to know for sure given the limited amount of information.
> Assuming you do not have SQL tuning problems or CPU-related issues (not
> enough CPU or other services/applications using too much), then a drive
> change should be in order. It's always a good idea to separate data and
> log files.
> A query timeout occurs when you set a maximum limit for query execution
> in your code. Have you set a maximum timeout value? Make sure you roll
> back the transaction when the query times out.
>
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com
>|||R.D wrote:
> BOL has this
> SET QUERY_GOVERNOR_COST_LIMIT
> Overrides the currently configured value for the current connection.
> <SNIP>
Are you saying you are setting a governor limit? If so, I wouldn't think
resource overutilization on the server would cause queries to not run
using this setting. Could you clarify?
David Gugick
Quest Software
www.imceda.com
www.quest.com

Wednesday, March 28, 2012

Please Help - Web application breaks when SQL .ldf file is relocat

Hi,
Here is the scenario:
My web developer is building a new site in asp.net, in turn he is using SQL
express in building his application. In my research on deploying SQL express
I have found it is in best practice to separate the .mdf and .ldf files to
different drives with adequate space. When he copies the database files he
has created from his local desktop up to the app_data folder on the web
server his database driven app works perfectly. Though when I go to move the
..ldf file to another location the application breaks, throwing the error
below. I have tried attaching the database to the management studio express
and configuring the location of the files but that did not work.
I have looked to into impersonation, metadata, and asp.net coding but am not
quite sure which may be causing this issue.
Please Help!!
Server Error in '/' Application.
---
Cannot open user default database. Login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
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 user
default database. Login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
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:
[SqlException (0x80131904): Cannot open user default database. Login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.]
System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException
exception, Boolean breakConnection) +800131
System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject
stateObj) +186
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand
cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
bulkCopyHandler, TdsParserStateObject stateObj) +1932
System.Data.SqlClient.SqlInternalConnectionTds.Com pleteLogin(Boolean
enlistOK) +33
System.Data.SqlClient.SqlInternalConnectionTds.Att emptOneLogin(ServerInfo
serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
timerExpire, SqlConnection owningObject) +172
System.Data.SqlClient.SqlInternalConnectionTds.Log inNoFailover(String
host, String newPassword, Boolean redirectedUserInstance, SqlConnection
owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +381
System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance) +181
System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity
identity, SqlConnectionString connectionOptions, Object providerInfo, String
newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +173
System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection) +357
System.Data.ProviderBase.DbConnectionFactory.Creat ePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +30
System.Data.ProviderBase.DbConnectionPool.CreateOb ject(DbConnection
owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCrea teRequest(DbConnection
owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection
owningObject) +494
System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Data.Common.DbDataAdapter.FillInternal(Data Set dataset,
DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable,
IDbCommand command, CommandBehavior behavior) +121
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior) +137
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83
System.Web.UI.WebControls.SqlDataSourceView.Execut eSelect(DataSourceSelectArguments arguments) +1770
System.Web.UI.DataSourceView.Select(DataSourceSele ctArguments arguments,
DataSourceViewSelectCallback callback) +17
System.Web.UI.WebControls.DataBoundControl.Perform Select() +149
System.Web.UI.WebControls.BaseDataBoundControl.Dat aBind() +70
System.Web.UI.WebControls.GridView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.Ens ureDataBound() +82
System.Web.UI.WebControls.GridView.OnPreRender(Eve ntArgs e) +24
System.Web.UI.Control.PreRenderRecursiveInternal() +86
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
It's nothing to do with the app codes. It's about the database.
After detaching your database and changing your log file's path, to attach
your database again run a script like the following according to your
situation.
CREATE DATABASE [Test] ON
( FILENAME = N'C:\Program Files\Microsoft SQL
Server\MSSQL.4\MSSQL\Data\Test.mdf' ),
( FILENAME = N'D:\Test_log.ldf' )
FOR ATTACH
Ekrem ?nsoy
"lca1630" <lca1630@.discussions.microsoft.com> wrote in message
news:D4F0B3BA-D066-4771-937A-0FF6579C69AB@.microsoft.com...
> Hi,
> Here is the scenario:
> My web developer is building a new site in asp.net, in turn he is using
> SQL
> express in building his application. In my research on deploying SQL
> express
> I have found it is in best practice to separate the .mdf and .ldf files to
> different drives with adequate space. When he copies the database files he
> has created from his local desktop up to the app_data folder on the web
> server his database driven app works perfectly. Though when I go to move
> the
> .ldf file to another location the application breaks, throwing the error
> below. I have tried attaching the database to the management studio
> express
> and configuring the location of the files but that did not work.
> I have looked to into impersonation, metadata, and asp.net coding but am
> not
> quite sure which may be causing this issue.
> Please Help!!
> Server Error in '/' Application.
>
> Cannot open user default database. Login failed.
> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
> 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 user
> default database. Login failed.
> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
> 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:
>
> [SqlException (0x80131904): Cannot open user default database. Login
> failed.
> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.]
> System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException
> exception, Boolean breakConnection) +800131
> System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject
> stateObj) +186
> System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand
> cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
> bulkCopyHandler, TdsParserStateObject stateObj) +1932
> System.Data.SqlClient.SqlInternalConnectionTds.Com pleteLogin(Boolean
> enlistOK) +33
> System.Data.SqlClient.SqlInternalConnectionTds.Att emptOneLogin(ServerInfo
> serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
> timerExpire, SqlConnection owningObject) +172
> System.Data.SqlClient.SqlInternalConnectionTds.Log inNoFailover(String
> host, String newPassword, Boolean redirectedUserInstance, SqlConnection
> owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
> +381
> System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnection
> owningObject, SqlConnectionString connectionOptions, String newPassword,
> Boolean redirectedUserInstance) +181
> System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity
> identity, SqlConnectionString connectionOptions, Object providerInfo,
> String
> newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
> +173
> System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions
> options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
> owningConnection) +357
> System.Data.ProviderBase.DbConnectionFactory.Creat ePooledConnection(DbConnection
> owningConnection, DbConnectionPool pool, DbConnectionOptions options) +30
> System.Data.ProviderBase.DbConnectionPool.CreateOb ject(DbConnection
> owningObject) +424
> System.Data.ProviderBase.DbConnectionPool.UserCrea teRequest(DbConnection
> owningObject) +66
> System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection
> owningObject) +494
> System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
> owningConnection) +82
> System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection
> outerConnection, DbConnectionFactory connectionFactory) +105
> System.Data.SqlClient.SqlConnection.Open() +111
> System.Data.Common.DbDataAdapter.FillInternal(Data Set dataset,
> DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String
> srcTable,
> IDbCommand command, CommandBehavior behavior) +121
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
> startRecord,
> Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
> behavior) +137
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
> +83
> System.Web.UI.WebControls.SqlDataSourceView.Execut eSelect(DataSourceSelectArguments
> arguments) +1770
> System.Web.UI.DataSourceView.Select(DataSourceSele ctArguments arguments,
> DataSourceViewSelectCallback callback) +17
> System.Web.UI.WebControls.DataBoundControl.Perform Select() +149
> System.Web.UI.WebControls.BaseDataBoundControl.Dat aBind() +70
> System.Web.UI.WebControls.GridView.DataBind() +4
> System.Web.UI.WebControls.BaseDataBoundControl.Ens ureDataBound() +82
> System.Web.UI.WebControls.GridView.OnPreRender(Eve ntArgs e) +24
> System.Web.UI.Control.PreRenderRecursiveInternal() +86
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Page.ProcessRequestMain(Boolean
> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
>
>
|||Thank You for your imput, I will give it a try.
"Ekrem ?nsoy" wrote:

> It's nothing to do with the app codes. It's about the database.
> After detaching your database and changing your log file's path, to attach
> your database again run a script like the following according to your
> situation.
> CREATE DATABASE [Test] ON
> ( FILENAME = N'C:\Program Files\Microsoft SQL
> Server\MSSQL.4\MSSQL\Data\Test.mdf' ),
> ( FILENAME = N'D:\Test_log.ldf' )
> FOR ATTACH
> --
> Ekrem ?nsoy
>
> "lca1630" <lca1630@.discussions.microsoft.com> wrote in message
> news:D4F0B3BA-D066-4771-937A-0FF6579C69AB@.microsoft.com...
>
|||I am wondering if anyone can look at the stack trace and give me an idea of
what if going on. Thanks
Server Error in '/' Application.
Cannot open user default database. Login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
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 user
default database. Login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
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:
[SqlException (0x80131904): Cannot open user default database. Login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.]
System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException
exception, Boolean breakConnection) +800131
System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject
stateObj) +186
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand
cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
bulkCopyHandler, TdsParserStateObject stateObj) +1932
System.Data.SqlClient.SqlInternalConnectionTds.Com pleteLogin(Boolean
enlistOK) +33
System.Data.SqlClient.SqlInternalConnectionTds.Att emptOneLogin(ServerInfo
serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
timerExpire, SqlConnection owningObject) +172
System.Data.SqlClient.SqlInternalConnectionTds.Log inNoFailover(String
host, String newPassword, Boolean redirectedUserInstance, SqlConnection
owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +381
System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance) +181
System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity
identity, SqlConnectionString connectionOptions, Object providerInfo, String
newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +173
System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection) +133
System.Data.ProviderBase.DbConnectionFactory.Creat ePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +30
System.Data.ProviderBase.DbConnectionPool.CreateOb ject(DbConnection
owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCrea teRequest(DbConnection
owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection
owningObject) +494
System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Data.Common.DbDataAdapter.FillInternal(Data Set dataset,
DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable,
IDbCommand command, CommandBehavior behavior) +121
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior) +137
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83
System.Web.UI.WebControls.SqlDataSourceView.Execut eSelect(DataSourceSelectArguments arguments) +1770
System.Web.UI.DataSourceView.Select(DataSourceSele ctArguments arguments,
DataSourceViewSelectCallback callback) +17
System.Web.UI.WebControls.DataBoundControl.Perform Select() +149
System.Web.UI.WebControls.BaseDataBoundControl.Dat aBind() +70
System.Web.UI.WebControls.GridView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.Ens ureDataBound() +82
System.Web.UI.WebControls.GridView.OnPreRender(Eve ntArgs e) +24
System.Web.UI.Control.PreRenderRecursiveInternal() +86
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
Version Information: Microsoft .NET Framework Version:2.0.50727.1433;
ASP.NET Version:2.0.50727.1433
"lca1630" wrote:

> Hi,
> Here is the scenario:
> My web developer is building a new site in asp.net, in turn he is using SQL
> express in building his application. In my research on deploying SQL express
> I have found it is in best practice to separate the .mdf and .ldf files to
> different drives with adequate space. When he copies the database files he
> has created from his local desktop up to the app_data folder on the web
> server his database driven app works perfectly. Though when I go to move the
> .ldf file to another location the application breaks, throwing the error
> below. I have tried attaching the database to the management studio express
> and configuring the location of the files but that did not work.
> I have looked to into impersonation, metadata, and asp.net coding but am not
> quite sure which may be causing this issue.
> Please Help!!
> Server Error in '/' Application.
>
> Cannot open user default database. Login failed.
> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
> 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 user
> default database. Login failed.
> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
> 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:
>
> [SqlException (0x80131904): Cannot open user default database. Login failed.
> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.]
> System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException
> exception, Boolean breakConnection) +800131
> System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject
> stateObj) +186
> System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand
> cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
> bulkCopyHandler, TdsParserStateObject stateObj) +1932
> System.Data.SqlClient.SqlInternalConnectionTds.Com pleteLogin(Boolean
> enlistOK) +33
> System.Data.SqlClient.SqlInternalConnectionTds.Att emptOneLogin(ServerInfo
> serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
> timerExpire, SqlConnection owningObject) +172
> System.Data.SqlClient.SqlInternalConnectionTds.Log inNoFailover(String
> host, String newPassword, Boolean redirectedUserInstance, SqlConnection
> owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +381
> System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnection
> owningObject, SqlConnectionString connectionOptions, String newPassword,
> Boolean redirectedUserInstance) +181
> System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity
> identity, SqlConnectionString connectionOptions, Object providerInfo, String
> newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +173
> System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions
> options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
> owningConnection) +357
> System.Data.ProviderBase.DbConnectionFactory.Creat ePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +30
> System.Data.ProviderBase.DbConnectionPool.CreateOb ject(DbConnection
> owningObject) +424
> System.Data.ProviderBase.DbConnectionPool.UserCrea teRequest(DbConnection
> owningObject) +66
> System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection
> owningObject) +494
> System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
> owningConnection) +82
> System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection
> outerConnection, DbConnectionFactory connectionFactory) +105
> System.Data.SqlClient.SqlConnection.Open() +111
> System.Data.Common.DbDataAdapter.FillInternal(Data Set dataset,
> DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable,
> IDbCommand command, CommandBehavior behavior) +121
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
> Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
> behavior) +137
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83
> System.Web.UI.WebControls.SqlDataSourceView.Execut eSelect(DataSourceSelectArguments arguments) +1770
> System.Web.UI.DataSourceView.Select(DataSourceSele ctArguments arguments,
> DataSourceViewSelectCallback callback) +17
> System.Web.UI.WebControls.DataBoundControl.Perform Select() +149
> System.Web.UI.WebControls.BaseDataBoundControl.Dat aBind() +70
> System.Web.UI.WebControls.GridView.DataBind() +4
> System.Web.UI.WebControls.BaseDataBoundControl.Ens ureDataBound() +82
> System.Web.UI.WebControls.GridView.OnPreRender(Eve ntArgs e) +24
> System.Web.UI.Control.PreRenderRecursiveInternal() +86
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Page.ProcessRequestMain(Boolean
> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
>
>
|||Every Login has a default database which is set as "master" by default.
In cases such as yours, people change default database of a Login and then
they delete that database or something and then when they try to connect to
SQL Server using this Login they get this error because this Login' s
default database is not exist, it's not there anymore so it raises this
error.
Ensure that Network Service Login' s default database is set correctly. You
can correct this from your Login' s properties.
Ekrem ?nsoy
"lca1630" <lca1630@.discussions.microsoft.com> wrote in message
news:0FF290EE-3C57-4974-B9F5-90D6F3012288@.microsoft.com...[vbcol=seagreen]
>I am wondering if anyone can look at the stack trace and give me an idea of
> what if going on. Thanks
> Server Error in '/' Application.
> ----
> Cannot open user default database. Login failed.
> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
> 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 user
> default database. Login failed.
> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
> 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:
>
> [SqlException (0x80131904): Cannot open user default database. Login
> failed.
> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.]
> System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException
> exception, Boolean breakConnection) +800131
> System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject
> stateObj) +186
> System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand
> cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
> bulkCopyHandler, TdsParserStateObject stateObj) +1932
> System.Data.SqlClient.SqlInternalConnectionTds.Com pleteLogin(Boolean
> enlistOK) +33
> System.Data.SqlClient.SqlInternalConnectionTds.Att emptOneLogin(ServerInfo
> serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
> timerExpire, SqlConnection owningObject) +172
> System.Data.SqlClient.SqlInternalConnectionTds.Log inNoFailover(String
> host, String newPassword, Boolean redirectedUserInstance, SqlConnection
> owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
> +381
> System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnection
> owningObject, SqlConnectionString connectionOptions, String newPassword,
> Boolean redirectedUserInstance) +181
> System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity
> identity, SqlConnectionString connectionOptions, Object providerInfo,
> String
> newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
> +173
> System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions
> options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
> owningConnection) +133
> System.Data.ProviderBase.DbConnectionFactory.Creat ePooledConnection(DbConnection
> owningConnection, DbConnectionPool pool, DbConnectionOptions options) +30
> System.Data.ProviderBase.DbConnectionPool.CreateOb ject(DbConnection
> owningObject) +424
> System.Data.ProviderBase.DbConnectionPool.UserCrea teRequest(DbConnection
> owningObject) +66
> System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection
> owningObject) +494
> System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
> owningConnection) +82
> System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection
> outerConnection, DbConnectionFactory connectionFactory) +105
> System.Data.SqlClient.SqlConnection.Open() +111
> System.Data.Common.DbDataAdapter.FillInternal(Data Set dataset,
> DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String
> srcTable,
> IDbCommand command, CommandBehavior behavior) +121
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
> startRecord,
> Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
> behavior) +137
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
> +83
> System.Web.UI.WebControls.SqlDataSourceView.Execut eSelect(DataSourceSelectArguments
> arguments) +1770
> System.Web.UI.DataSourceView.Select(DataSourceSele ctArguments arguments,
> DataSourceViewSelectCallback callback) +17
> System.Web.UI.WebControls.DataBoundControl.Perform Select() +149
> System.Web.UI.WebControls.BaseDataBoundControl.Dat aBind() +70
> System.Web.UI.WebControls.GridView.DataBind() +4
> System.Web.UI.WebControls.BaseDataBoundControl.Ens ureDataBound() +82
> System.Web.UI.WebControls.GridView.OnPreRender(Eve ntArgs e) +24
> System.Web.UI.Control.PreRenderRecursiveInternal() +86
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Page.ProcessRequestMain(Boolean
> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
>
>
> ----
> Version Information: Microsoft .NET Framework Version:2.0.50727.1433;
> ASP.NET Version:2.0.50727.1433
> "lca1630" wrote:

Please Help - Web application breaks when SQL .ldf file is relocat

Hi,
Here is the scenario:
My web developer is building a new site in asp.net, in turn he is using SQL
express in building his application. In my research on deploying SQL express
I have found it is in best practice to separate the .mdf and .ldf files to
different drives with adequate space. When he copies the database files he
has created from his local desktop up to the app_data folder on the web
server his database driven app works perfectly. Though when I go to move the
.ldf file to another location the application breaks, throwing the error
below. I have tried attaching the database to the management studio express
and configuring the location of the files but that did not work.
I have looked to into impersonation, metadata, and asp.net coding but am not
quite sure which may be causing this issue.
Please Help!!
Server Error in '/' Application.
---
---
Cannot open user default database. Login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
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 user
default database. Login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
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:
[SqlException (0x80131904): Cannot open user default database. Login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection) +800131
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
stateObj) +186
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand
cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
bulkCopyHandler, TdsParserStateObject stateObj) +1932
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
enlistOK) +33
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
timerExpire, SqlConnection owningObject) +172
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
host, String newPassword, Boolean redirectedUserInstance, SqlConnection
owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +381
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance) +181
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
identity, SqlConnectionString connectionOptions, Object providerInfo, String
newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +173
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection) +357
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +30
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
owningObject) +494
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,
DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable,
IDbCommand command, CommandBehavior behavior) +121
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior) +137
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83
System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments,
DataSourceViewSelectCallback callback) +17
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
System.Web.UI.WebControls.GridView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.GridView.OnPreRender(EventArgs e) +24
System.Web.UI.Control.PreRenderRecursiveInternal() +86
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041It's nothing to do with the app codes. It's about the database.
After detaching your database and changing your log file's path, to attach
your database again run a script like the following according to your
situation.
CREATE DATABASE [Test] ON
( FILENAME = N'C:\Program Files\Microsoft SQL
Server\MSSQL.4\MSSQL\Data\Test.mdf' ),
( FILENAME = N'D:\Test_log.ldf' )
FOR ATTACH
--
Ekrem Ã?nsoy
"lca1630" <lca1630@.discussions.microsoft.com> wrote in message
news:D4F0B3BA-D066-4771-937A-0FF6579C69AB@.microsoft.com...
> Hi,
> Here is the scenario:
> My web developer is building a new site in asp.net, in turn he is using
> SQL
> express in building his application. In my research on deploying SQL
> express
> I have found it is in best practice to separate the .mdf and .ldf files to
> different drives with adequate space. When he copies the database files he
> has created from his local desktop up to the app_data folder on the web
> server his database driven app works perfectly. Though when I go to move
> the
> .ldf file to another location the application breaks, throwing the error
> below. I have tried attaching the database to the management studio
> express
> and configuring the location of the files but that did not work.
> I have looked to into impersonation, metadata, and asp.net coding but am
> not
> quite sure which may be causing this issue.
> Please Help!!
> Server Error in '/' Application.
> ---
> ---
> Cannot open user default database. Login failed.
> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
> 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 user
> default database. Login failed.
> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
> 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:
>
> [SqlException (0x80131904): Cannot open user default database. Login
> failed.
> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.]
> System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
> exception, Boolean breakConnection) +800131
> System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
> stateObj) +186
> System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand
> cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
> bulkCopyHandler, TdsParserStateObject stateObj) +1932
> System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
> enlistOK) +33
> System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
> serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
> timerExpire, SqlConnection owningObject) +172
> System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
> host, String newPassword, Boolean redirectedUserInstance, SqlConnection
> owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
> +381
> System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
> owningObject, SqlConnectionString connectionOptions, String newPassword,
> Boolean redirectedUserInstance) +181
> System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
> identity, SqlConnectionString connectionOptions, Object providerInfo,
> String
> newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
> +173
> System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
> options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
> owningConnection) +357
> System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection
> owningConnection, DbConnectionPool pool, DbConnectionOptions options) +30
> System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
> owningObject) +424
> System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
> owningObject) +66
> System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
> owningObject) +494
> System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
> owningConnection) +82
> System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
> outerConnection, DbConnectionFactory connectionFactory) +105
> System.Data.SqlClient.SqlConnection.Open() +111
> System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,
> DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String
> srcTable,
> IDbCommand command, CommandBehavior behavior) +121
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
> startRecord,
> Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
> behavior) +137
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
> +83
> System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments
> arguments) +1770
> System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments,
> DataSourceViewSelectCallback callback) +17
> System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
> System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
> System.Web.UI.WebControls.GridView.DataBind() +4
> System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
> System.Web.UI.WebControls.GridView.OnPreRender(EventArgs e) +24
> System.Web.UI.Control.PreRenderRecursiveInternal() +86
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Page.ProcessRequestMain(Boolean
> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
>
>|||Thank You for your imput, I will give it a try.
"Ekrem Ã?nsoy" wrote:
> It's nothing to do with the app codes. It's about the database.
> After detaching your database and changing your log file's path, to attach
> your database again run a script like the following according to your
> situation.
> CREATE DATABASE [Test] ON
> ( FILENAME = N'C:\Program Files\Microsoft SQL
> Server\MSSQL.4\MSSQL\Data\Test.mdf' ),
> ( FILENAME = N'D:\Test_log.ldf' )
> FOR ATTACH
> --
> Ekrem Ã?nsoy
>
> "lca1630" <lca1630@.discussions.microsoft.com> wrote in message
> news:D4F0B3BA-D066-4771-937A-0FF6579C69AB@.microsoft.com...
> > Hi,
> >
> > Here is the scenario:
> >
> > My web developer is building a new site in asp.net, in turn he is using
> > SQL
> > express in building his application. In my research on deploying SQL
> > express
> > I have found it is in best practice to separate the .mdf and .ldf files to
> > different drives with adequate space. When he copies the database files he
> > has created from his local desktop up to the app_data folder on the web
> > server his database driven app works perfectly. Though when I go to move
> > the
> > .ldf file to another location the application breaks, throwing the error
> > below. I have tried attaching the database to the management studio
> > express
> > and configuring the location of the files but that did not work.
> >
> > I have looked to into impersonation, metadata, and asp.net coding but am
> > not
> > quite sure which may be causing this issue.
> >
> > Please Help!!
> >
> > Server Error in '/' Application.
> > ---
> >
> > ---
> >
> > Cannot open user default database. Login failed.
> > Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
> > 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 user
> > default database. Login failed.
> > Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
> >
> > 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:
> >
> >
> > [SqlException (0x80131904): Cannot open user default database. Login
> > failed.
> > Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.]
> > System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
> > exception, Boolean breakConnection) +800131
> >
> > System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
> > stateObj) +186
> > System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand
> > cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
> > bulkCopyHandler, TdsParserStateObject stateObj) +1932
> > System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
> > enlistOK) +33
> >
> > System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
> > serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
> > timerExpire, SqlConnection owningObject) +172
> > System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
> > host, String newPassword, Boolean redirectedUserInstance, SqlConnection
> > owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
> > +381
> >
> > System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
> > owningObject, SqlConnectionString connectionOptions, String newPassword,
> > Boolean redirectedUserInstance) +181
> >
> > System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
> > identity, SqlConnectionString connectionOptions, Object providerInfo,
> > String
> > newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
> > +173
> >
> > System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
> > options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
> > owningConnection) +357
> >
> > System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection
> > owningConnection, DbConnectionPool pool, DbConnectionOptions options) +30
> > System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
> > owningObject) +424
> > System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
> > owningObject) +66
> > System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
> > owningObject) +494
> > System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
> > owningConnection) +82
> > System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
> > outerConnection, DbConnectionFactory connectionFactory) +105
> > System.Data.SqlClient.SqlConnection.Open() +111
> > System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,
> > DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String
> > srcTable,
> > IDbCommand command, CommandBehavior behavior) +121
> > System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
> > startRecord,
> > Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
> > behavior) +137
> > System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
> > +83
> >
> > System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments
> > arguments) +1770
> > System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments,
> > DataSourceViewSelectCallback callback) +17
> > System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
> > System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
> > System.Web.UI.WebControls.GridView.DataBind() +4
> > System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
> > System.Web.UI.WebControls.GridView.OnPreRender(EventArgs e) +24
> > System.Web.UI.Control.PreRenderRecursiveInternal() +86
> > System.Web.UI.Control.PreRenderRecursiveInternal() +170
> > System.Web.UI.Control.PreRenderRecursiveInternal() +170
> > System.Web.UI.Control.PreRenderRecursiveInternal() +170
> > System.Web.UI.Control.PreRenderRecursiveInternal() +170
> > System.Web.UI.Page.ProcessRequestMain(Boolean
> > includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
> >
> >
> >
> >
>|||I am wondering if anyone can look at the stack trace and give me an idea of
what if going on. Thanks
Server Error in '/' Application
----
Cannot open user default database. Login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
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 user
default database. Login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
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:
[SqlException (0x80131904): Cannot open user default database. Login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection) +800131
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
stateObj) +186
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand
cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
bulkCopyHandler, TdsParserStateObject stateObj) +1932
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
enlistOK) +33
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
timerExpire, SqlConnection owningObject) +172
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
host, String newPassword, Boolean redirectedUserInstance, SqlConnection
owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +381
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance) +181
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
identity, SqlConnectionString connectionOptions, Object providerInfo, String
newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +173
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection) +133
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +30
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
owningObject) +494
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,
DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable,
IDbCommand command, CommandBehavior behavior) +121
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior) +137
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83
System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments,
DataSourceViewSelectCallback callback) +17
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
System.Web.UI.WebControls.GridView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.GridView.OnPreRender(EventArgs e) +24
System.Web.UI.Control.PreRenderRecursiveInternal() +86
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
----
Version Information: Microsoft .NET Framework Version:2.0.50727.1433;
ASP.NET Version:2.0.50727.1433
"lca1630" wrote:
> Hi,
> Here is the scenario:
> My web developer is building a new site in asp.net, in turn he is using SQL
> express in building his application. In my research on deploying SQL express
> I have found it is in best practice to separate the .mdf and .ldf files to
> different drives with adequate space. When he copies the database files he
> has created from his local desktop up to the app_data folder on the web
> server his database driven app works perfectly. Though when I go to move the
> .ldf file to another location the application breaks, throwing the error
> below. I have tried attaching the database to the management studio express
> and configuring the location of the files but that did not work.
> I have looked to into impersonation, metadata, and asp.net coding but am not
> quite sure which may be causing this issue.
> Please Help!!
> Server Error in '/' Application.
> ---
> ---
> Cannot open user default database. Login failed.
> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
> 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 user
> default database. Login failed.
> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
> 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:
>
> [SqlException (0x80131904): Cannot open user default database. Login failed.
> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.]
> System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
> exception, Boolean breakConnection) +800131
> System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
> stateObj) +186
> System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand
> cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
> bulkCopyHandler, TdsParserStateObject stateObj) +1932
> System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
> enlistOK) +33
> System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
> serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
> timerExpire, SqlConnection owningObject) +172
> System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
> host, String newPassword, Boolean redirectedUserInstance, SqlConnection
> owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +381
> System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
> owningObject, SqlConnectionString connectionOptions, String newPassword,
> Boolean redirectedUserInstance) +181
> System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
> identity, SqlConnectionString connectionOptions, Object providerInfo, String
> newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +173
> System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
> options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
> owningConnection) +357
> System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +30
> System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
> owningObject) +424
> System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
> owningObject) +66
> System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
> owningObject) +494
> System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
> owningConnection) +82
> System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
> outerConnection, DbConnectionFactory connectionFactory) +105
> System.Data.SqlClient.SqlConnection.Open() +111
> System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,
> DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable,
> IDbCommand command, CommandBehavior behavior) +121
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
> Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
> behavior) +137
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83
> System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770
> System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments,
> DataSourceViewSelectCallback callback) +17
> System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
> System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
> System.Web.UI.WebControls.GridView.DataBind() +4
> System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
> System.Web.UI.WebControls.GridView.OnPreRender(EventArgs e) +24
> System.Web.UI.Control.PreRenderRecursiveInternal() +86
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Page.ProcessRequestMain(Boolean
> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
>
>|||Every Login has a default database which is set as "master" by default.
In cases such as yours, people change default database of a Login and then
they delete that database or something and then when they try to connect to
SQL Server using this Login they get this error because this Login' s
default database is not exist, it's not there anymore so it raises this
error.
Ensure that Network Service Login' s default database is set correctly. You
can correct this from your Login' s properties.
--
Ekrem Ã?nsoy
"lca1630" <lca1630@.discussions.microsoft.com> wrote in message
news:0FF290EE-3C57-4974-B9F5-90D6F3012288@.microsoft.com...
>I am wondering if anyone can look at the stack trace and give me an idea of
> what if going on. Thanks
> Server Error in '/' Application.
> ----
> Cannot open user default database. Login failed.
> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
> 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 user
> default database. Login failed.
> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
> 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:
>
> [SqlException (0x80131904): Cannot open user default database. Login
> failed.
> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.]
> System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
> exception, Boolean breakConnection) +800131
> System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
> stateObj) +186
> System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand
> cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
> bulkCopyHandler, TdsParserStateObject stateObj) +1932
> System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
> enlistOK) +33
> System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
> serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
> timerExpire, SqlConnection owningObject) +172
> System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
> host, String newPassword, Boolean redirectedUserInstance, SqlConnection
> owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
> +381
> System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
> owningObject, SqlConnectionString connectionOptions, String newPassword,
> Boolean redirectedUserInstance) +181
> System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
> identity, SqlConnectionString connectionOptions, Object providerInfo,
> String
> newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
> +173
> System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
> options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
> owningConnection) +133
> System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection
> owningConnection, DbConnectionPool pool, DbConnectionOptions options) +30
> System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
> owningObject) +424
> System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
> owningObject) +66
> System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
> owningObject) +494
> System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
> owningConnection) +82
> System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
> outerConnection, DbConnectionFactory connectionFactory) +105
> System.Data.SqlClient.SqlConnection.Open() +111
> System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,
> DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String
> srcTable,
> IDbCommand command, CommandBehavior behavior) +121
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
> startRecord,
> Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
> behavior) +137
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
> +83
> System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments
> arguments) +1770
> System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments,
> DataSourceViewSelectCallback callback) +17
> System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
> System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
> System.Web.UI.WebControls.GridView.DataBind() +4
> System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
> System.Web.UI.WebControls.GridView.OnPreRender(EventArgs e) +24
> System.Web.UI.Control.PreRenderRecursiveInternal() +86
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Page.ProcessRequestMain(Boolean
> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
>
>
> ----
> Version Information: Microsoft .NET Framework Version:2.0.50727.1433;
> ASP.NET Version:2.0.50727.1433
> "lca1630" wrote:
>> Hi,
>> Here is the scenario:
>> My web developer is building a new site in asp.net, in turn he is using
>> SQL
>> express in building his application. In my research on deploying SQL
>> express
>> I have found it is in best practice to separate the .mdf and .ldf files
>> to
>> different drives with adequate space. When he copies the database files
>> he
>> has created from his local desktop up to the app_data folder on the web
>> server his database driven app works perfectly. Though when I go to move
>> the
>> .ldf file to another location the application breaks, throwing the error
>> below. I have tried attaching the database to the management studio
>> express
>> and configuring the location of the files but that did not work.
>> I have looked to into impersonation, metadata, and asp.net coding but am
>> not
>> quite sure which may be causing this issue.
>> Please Help!!
>> Server Error in '/' Application.
>> ---
>> ---
>> Cannot open user default database. Login failed.
>> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
>> 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 user
>> default database. Login failed.
>> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
>> 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:
>>
>> [SqlException (0x80131904): Cannot open user default database. Login
>> failed.
>> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.]
>> System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
>> exception, Boolean breakConnection) +800131
>> System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
>> stateObj) +186
>> System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
>> SqlCommand
>> cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
>> bulkCopyHandler, TdsParserStateObject stateObj) +1932
>> System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
>> enlistOK) +33
>> System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
>> serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
>> timerExpire, SqlConnection owningObject) +172
>> System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
>> host, String newPassword, Boolean redirectedUserInstance, SqlConnection
>> owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
>> +381
>> System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
>> owningObject, SqlConnectionString connectionOptions, String newPassword,
>> Boolean redirectedUserInstance) +181
>> System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
>> identity, SqlConnectionString connectionOptions, Object providerInfo,
>> String
>> newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
>> +173
>> System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
>> options, Object poolGroupProviderInfo, DbConnectionPool pool,
>> DbConnection
>> owningConnection) +357
>> System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection
>> owningConnection, DbConnectionPool pool, DbConnectionOptions options) +30
>> System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
>> owningObject) +424
>> System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
>> owningObject) +66
>> System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
>> owningObject) +494
>> System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
>> owningConnection) +82
>> System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
>> outerConnection, DbConnectionFactory connectionFactory) +105
>> System.Data.SqlClient.SqlConnection.Open() +111
>> System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,
>> DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String
>> srcTable,
>> IDbCommand command, CommandBehavior behavior) +121
>> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
>> startRecord,
>> Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
>> behavior) +137
>> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String
>> srcTable) +83
>> System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments
>> arguments) +1770
>> System.Web.UI.DataSourceView.Select(DataSourceSelectArguments
>> arguments,
>> DataSourceViewSelectCallback callback) +17
>> System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
>> System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
>> System.Web.UI.WebControls.GridView.DataBind() +4
>> System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
>> System.Web.UI.WebControls.GridView.OnPreRender(EventArgs e) +24
>> System.Web.UI.Control.PreRenderRecursiveInternal() +86
>> System.Web.UI.Control.PreRenderRecursiveInternal() +170
>> System.Web.UI.Control.PreRenderRecursiveInternal() +170
>> System.Web.UI.Control.PreRenderRecursiveInternal() +170
>> System.Web.UI.Control.PreRenderRecursiveInternal() +170
>> System.Web.UI.Page.ProcessRequestMain(Boolean
>> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
>> +2041
>>
>>

Please Help - Web application breaks when SQL .ldf file is relocat

Hi,
Here is the scenario:
My web developer is building a new site in asp.net, in turn he is using SQL
express in building his application. In my research on deploying SQL express
I have found it is in best practice to separate the .mdf and .ldf files to
different drives with adequate space. When he copies the database files he
has created from his local desktop up to the app_data folder on the web
server his database driven app works perfectly. Though when I go to move the
.ldf file to another location the application breaks, throwing the error
below. I have tried attaching the database to the management studio express
and configuring the location of the files but that did not work.
I have looked to into impersonation, metadata, and asp.net coding but am not
quite sure which may be causing this issue.
Please Help!!
Server Error in '/' Application.
---
---
Cannot open user default database. Login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information abou
t
the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Cannot open user
default database. Login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
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:
[SqlException (0x80131904): Cannot open user default database. Login fai
led.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection) +800131
System.Data.SqlClient.TdsParser. ThrowExceptionAndWarning(TdsParserStateO
bjec
t
stateObj) +186
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand
cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
bulkCopyHandler, TdsParserStateObject stateObj) +1932
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
enlistOK) +33
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
timerExpire, SqlConnection owningObject) +172
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
host, String newPassword, Boolean redirectedUserInstance, SqlConnection
owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +381
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance) +181
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentit
y
identity, SqlConnectionString connectionOptions, Object providerInfo, String
newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +17
3
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOpti
ons
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection) +357
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnec
tion owningConnection, DbConnectionPool pool, DbConnectionOptions options) +
30
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
owningObject) +494
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,
DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcT
able,
IDbCommand command, CommandBehavior behavior) +121
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior) +137
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83
System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectAr
guments arguments) +1770
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments,
DataSourceViewSelectCallback callback) +17
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
System.Web.UI.WebControls.GridView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.GridView.OnPreRender(EventArgs e) +24
System.Web.UI.Control.PreRenderRecursiveInternal() +86
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041It's nothing to do with the app codes. It's about the database.
After detaching your database and changing your log file's path, to attach
your database again run a script like the following according to your
situation.
CREATE DATABASE [Test] ON
( FILENAME = N'C:\Program Files\Microsoft SQL
Server\MSSQL.4\MSSQL\Data\Test.mdf' ),
( FILENAME = N'D:\Test_log.ldf' )
FOR ATTACH
Ekrem ?nsoy
"lca1630" <lca1630@.discussions.microsoft.com> wrote in message
news:D4F0B3BA-D066-4771-937A-0FF6579C69AB@.microsoft.com...
> Hi,
> Here is the scenario:
> My web developer is building a new site in asp.net, in turn he is using
> SQL
> express in building his application. In my research on deploying SQL
> express
> I have found it is in best practice to separate the .mdf and .ldf files to
> different drives with adequate space. When he copies the database files he
> has created from his local desktop up to the app_data folder on the web
> server his database driven app works perfectly. Though when I go to move
> the
> .ldf file to another location the application breaks, throwing the error
> below. I have tried attaching the database to the management studio
> express
> and configuring the location of the files but that did not work.
> I have looked to into impersonation, metadata, and asp.net coding but am
> not
> quite sure which may be causing this issue.
> Please Help!!
> Server Error in '/' Application.
> ---
> ---
> Cannot open user default database. Login failed.
> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
> 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 user
> default database. Login failed.
> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
> 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:
>
> [SqlException (0x80131904): Cannot open user default database. Login
> failed.
> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.]
> System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
> exception, Boolean breakConnection) +800131
> System.Data.SqlClient.TdsParser. ThrowExceptionAndWarning(TdsParserStateO
bj
ect
> stateObj) +186
> System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand
> cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
> bulkCopyHandler, TdsParserStateObject stateObj) +1932
> System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
> enlistOK) +33
> System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
> serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
> timerExpire, SqlConnection owningObject) +172
> System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
> host, String newPassword, Boolean redirectedUserInstance, SqlConnection
> owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
> +381
> System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnecti
on
> owningObject, SqlConnectionString connectionOptions, String newPassword,
> Boolean redirectedUserInstance) +181
> System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdent
ity
> identity, SqlConnectionString connectionOptions, Object providerInfo,
> String
> newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
> +173
> System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOp
tions
> options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
> owningConnection) +357
> System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConn
ection
> owningConnection, DbConnectionPool pool, DbConnectionOptions options) +30
> System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
> owningObject) +424
> System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
> owningObject) +66
> System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
> owningObject) +494
> System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
> owningConnection) +82
> System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
> outerConnection, DbConnectionFactory connectionFactory) +105
> System.Data.SqlClient.SqlConnection.Open() +111
> System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,
> DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String
> srcTable,
> IDbCommand command, CommandBehavior behavior) +121
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
> startRecord,
> Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
> behavior) +137
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
> +83
> System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelect
Arguments
> arguments) +1770
> System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments,
> DataSourceViewSelectCallback callback) +17
> System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
> System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
> System.Web.UI.WebControls.GridView.DataBind() +4
> System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
> System.Web.UI.WebControls.GridView.OnPreRender(EventArgs e) +24
> System.Web.UI.Control.PreRenderRecursiveInternal() +86
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Page.ProcessRequestMain(Boolean
> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
>
>|||I am wondering if anyone can look at the stack trace and give me an idea of
what if going on. Thanks
Server Error in '/' Application.
----
--
Cannot open user default database. Login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information abou
t
the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Cannot open user
default database. Login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
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:
[SqlException (0x80131904): Cannot open user default database. Login fai
led.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection) +800131
System.Data.SqlClient.TdsParser. ThrowExceptionAndWarning(TdsParserStateO
bjec
t
stateObj) +186
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand
cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
bulkCopyHandler, TdsParserStateObject stateObj) +1932
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
enlistOK) +33
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
timerExpire, SqlConnection owningObject) +172
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
host, String newPassword, Boolean redirectedUserInstance, SqlConnection
owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +381
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance) +181
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentit
y
identity, SqlConnectionString connectionOptions, Object providerInfo, String
newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +17
3
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOpti
ons
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection) +133
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnec
tion owningConnection, DbConnectionPool pool, DbConnectionOptions options) +
30
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
owningObject) +494
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,
DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcT
able,
IDbCommand command, CommandBehavior behavior) +121
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior) +137
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83
System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectAr
guments arguments) +1770
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments,
DataSourceViewSelectCallback callback) +17
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
System.Web.UI.WebControls.GridView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.GridView.OnPreRender(EventArgs e) +24
System.Web.UI.Control.PreRenderRecursiveInternal() +86
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
----
--
Version Information: Microsoft .NET Framework Version:2.0.50727.1433;
ASP.NET Version:2.0.50727.1433
"lca1630" wrote:

> Hi,
> Here is the scenario:
> My web developer is building a new site in asp.net, in turn he is using SQ
L
> express in building his application. In my research on deploying SQL expre
ss
> I have found it is in best practice to separate the .mdf and .ldf files to
> different drives with adequate space. When he copies the database files he
> has created from his local desktop up to the app_data folder on the web
> server his database driven app works perfectly. Though when I go to move t
he
> .ldf file to another location the application breaks, throwing the error
> below. I have tried attaching the database to the management studio expres
s
> and configuring the location of the files but that did not work.
> I have looked to into impersonation, metadata, and asp.net coding but am n
ot
> quite sure which may be causing this issue.
> Please Help!!
> Server Error in '/' Application.
> ---
> ---
> Cannot open user default database. Login failed.
> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
> Description: An unhandled exception occurred during the execution of the
> current web request. Please review the stack trace for more information ab
out
> the error and where it originated in the code.
> Exception Details: System.Data.SqlClient.SqlException: Cannot open user
> default database. Login failed.
> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
> Source Error:
> An unhandled exception was generated during the execution of the current w
eb
> request. Information regarding the origin and location of the exception ca
n
> be identified using the exception stack trace below.
> Stack Trace:
>
> [SqlException (0x80131904): Cannot open user default database. Login f
ailed.
> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.]
> System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
> exception, Boolean breakConnection) +800131
> System.Data.SqlClient.TdsParser. ThrowExceptionAndWarning(TdsParserStateO
bj
ect
> stateObj) +186
> System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand
> cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
> bulkCopyHandler, TdsParserStateObject stateObj) +1932
> System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
> enlistOK) +33
> System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerIn
fo
> serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
> timerExpire, SqlConnection owningObject) +172
> System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
> host, String newPassword, Boolean redirectedUserInstance, SqlConnection
> owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +38
1
> System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnecti
on
> owningObject, SqlConnectionString connectionOptions, String newPassword,
> Boolean redirectedUserInstance) +181
> System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdent
ity
> identity, SqlConnectionString connectionOptions, Object providerInfo, Stri
ng
> newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +
173
> System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOp
tions
> options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
> owningConnection) +357
> System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConn
ection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
+30
> System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
> owningObject) +424
> System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnectio
n
> owningObject) +66
> System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
> owningObject) +494
> System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
> owningConnection) +82
> System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
> outerConnection, DbConnectionFactory connectionFactory) +105
> System.Data.SqlClient.SqlConnection.Open() +111
> System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,
> DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String sr
cTable,
> IDbCommand command, CommandBehavior behavior) +121
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecor
d,
> Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
> behavior) +137
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
+83
> System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelect
Arguments arguments) +1770
> System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments
,
> DataSourceViewSelectCallback callback) +17
> System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
> System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
> System.Web.UI.WebControls.GridView.DataBind() +4
> System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
> System.Web.UI.WebControls.GridView.OnPreRender(EventArgs e) +24
> System.Web.UI.Control.PreRenderRecursiveInternal() +86
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Page.ProcessRequestMain(Boolean
> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
>
>|||Every Login has a default database which is set as "master" by default.
In cases such as yours, people change default database of a Login and then
they delete that database or something and then when they try to connect to
SQL Server using this Login they get this error because this Login' s
default database is not exist, it's not there anymore so it raises this
error.
Ensure that Network Service Login' s default database is set correctly. You
can correct this from your Login' s properties.
Ekrem ?nsoy
"lca1630" <lca1630@.discussions.microsoft.com> wrote in message
news:0FF290EE-3C57-4974-B9F5-90D6F3012288@.microsoft.com...[vbcol=seagreen]
>I am wondering if anyone can look at the stack trace and give me an idea of
> what if going on. Thanks
> Server Error in '/' Application.
> ----
--
> Cannot open user default database. Login failed.
> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
> 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 user
> default database. Login failed.
> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
> 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:
>
> [SqlException (0x80131904): Cannot open user default database. Login
> failed.
> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.]
> System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
> exception, Boolean breakConnection) +800131
> System.Data.SqlClient.TdsParser. ThrowExceptionAndWarning(TdsParserStateO
bj
ect
> stateObj) +186
> System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand
> cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
> bulkCopyHandler, TdsParserStateObject stateObj) +1932
> System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
> enlistOK) +33
> System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
> serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
> timerExpire, SqlConnection owningObject) +172
> System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
> host, String newPassword, Boolean redirectedUserInstance, SqlConnection
> owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
> +381
> System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnecti
on
> owningObject, SqlConnectionString connectionOptions, String newPassword,
> Boolean redirectedUserInstance) +181
> System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdent
ity
> identity, SqlConnectionString connectionOptions, Object providerInfo,
> String
> newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
> +173
> System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOp
tions
> options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
> owningConnection) +133
> System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConn
ection
> owningConnection, DbConnectionPool pool, DbConnectionOptions options) +30
> System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
> owningObject) +424
> System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
> owningObject) +66
> System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
> owningObject) +494
> System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
> owningConnection) +82
> System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
> outerConnection, DbConnectionFactory connectionFactory) +105
> System.Data.SqlClient.SqlConnection.Open() +111
> System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,
> DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String
> srcTable,
> IDbCommand command, CommandBehavior behavior) +121
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
> startRecord,
> Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
> behavior) +137
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
> +83
> System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelect
Arguments
> arguments) +1770
> System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments,
> DataSourceViewSelectCallback callback) +17
> System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
> System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
> System.Web.UI.WebControls.GridView.DataBind() +4
> System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
> System.Web.UI.WebControls.GridView.OnPreRender(EventArgs e) +24
> System.Web.UI.Control.PreRenderRecursiveInternal() +86
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Control.PreRenderRecursiveInternal() +170
> System.Web.UI.Page.ProcessRequestMain(Boolean
> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
>
>
> ----
--
> Version Information: Microsoft .NET Framework Version:2.0.50727.1433;
> ASP.NET Version:2.0.50727.1433
> "lca1630" wrote:
>