Unable To Attach Database

May 13, 2012

i have a database wich is part of a vb.net project tha database worked fine..i wanted to change the location of the mdf file to the application folder so i copied it to that folder but then i tried to attach it to the server using the management studio right click database select attach that opened the add dialog box with the tree to locate the mdf file but the tree does not expand into the application folder and i can't get to the mdf file.so i tried to attach with attach command and i got the error message that access is denied error 5.i checked the security settings in all files and parent folders and everything seems ok

View 1 Replies


ADVERTISEMENT

Unable To Attach Database

May 11, 2004

A co-worker deleted the log file to a database that was running. At that point the database showed as suspect and stopped running. I was able to detach the database but I am unable to attach the database. I get a msg stating the logfile cannot be found would I like to create a new one. I select yes. I get the following error.

Error 1813: Could not open new database 'dbname'. CREATE DATABASE is aborted. Device activation error. The physical file name 'fullpath to the original log file' may be incorrect.

Any suggestions would be appreciated.

View 4 Replies View Related

Unable To Attach The Database

Jan 23, 2008

I had to detach the database to delete the transaction log as it tookthe hole disk space.No I am trying to attach database, however I am not able to do so.The engine is asking me whether I want to continue and create new logfile. I agree to it, however then I am receiving an error:Error 1813: Could not open new database 'db_name'. CREATE DATABASEaborted. Device activation error. The physical file name 'E:SQLDatabasesMSSQLDatadb_name.ldf' may be incorrect.Then after I have message than attaching database failed.In event viewer I have:17204 :FCB::Open failed: Could not open device E:SQL DatabasesMSSQLDatadb_name.MDF for virtual device number (VDN) 0.In the error log I have:2008-01-23 10:28:59.00 spid52 Starting up database 'db_name'.Do you have any ideas where the problem is?I have never had this problem before, only now. And I didn't have thisproblem with other databases for which I have deleted the log file.

View 1 Replies View Related

Unable To Attach The Database

Jan 23, 2008

I had to detach the database to delete the transaction log as it took
the hole disk space.


No I am trying to attach database, however I am not able to do so.


The engine is asking me whether I want to continue and create new log
file. I agree to it, however then I am receiving an error:


Error 1813: Could not open new database 'db_name'. CREATE DATABASE
aborted. Device activation error. The physical file name 'E:SQL
DatabasesMSSQLDatadb_name.ldf' may be incorrect.


Then after I have message than attaching database failed.


In event viewer I have:


17204 :
FCB:pen failed: Could not open device E:SQL DatabasesMSSQLData
db_name.MDF for virtual device number (VDN) 0.


In the error log I have:
2008-01-23 10:28:59.00 spid52 Starting up database 'db_name'.


Do you have any ideas where the problem is?
I have never had this problem before, only now. And I didn't have this
problem with other databases for which I have deleted the log file.

View 10 Replies View Related

Unable To Attach SQLExpress Database

Jul 13, 2007

 This is by FAR, the most frustrating problem I have dealt with for a while.I have a project containing a SqlExpress database that I created in Visual Studio 2005. Everything works perfectly on my development machine. However, upon copying the site up to the webserver, I get an error stating:An attempt to attach an auto-named database for file
D:ContentwwwFMakerApp_DataClassAd.mdf failed. A database with the
same name exists, or specified file cannot be opened, or it is located
on UNC shareI have read almost every article/forum post that resulted from a search with google. I also searched these forums, to no avail.Note - SQLExpress had just been downloaded and installed on the server, so it wasn't being used yet. Server is Windows Server 2003. Here are the following steps I have already taken:Used SSEUTIL.EXE to verify that another database of the same name was not already attachedUninstalled & reinstalled SQLExpress multiple timesTemporarily granted 'Full Control' permissions to 'Everyone' on the site folder to verify that it was not a permissions issue.Created a very simple website, with a new database, one page - with one listbox control, and a sqldatasource. Got the exact same error. Should rule out a problem with my application.Tried various flavors of the web.config connection string.Probably other stuff that I forgot about, but will add if I remember.The only things I could imagine being wrong are either a problem with my connectionString, or the fact that SQLExpress is installed on C:, and webstuff is on D: (Wasn't able to install SqlExpress to D: for some reason)Connection String  <connectionStrings> <add name="ClassAdConnectionString" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|ClassAd.mdf;Integrated Security=true;User Instance=True" providerName="System.Data.SqlClient" /> </connectionStrings>  So I have had like 12 strokes today. If anybody could help me get this fixed, I will spread tales of your awesomeness throughout the landsI have included some extra info below in case it is needed. Thanks, Adam.Entire Error An attempt to attach an auto-named database for file
D:ContentwwwFMakerApp_DataClassAd.mdf failed. A database with the
same name exists, or specified file cannot be opened, or it is located
on UNC share.



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:
An attempt to attach an auto-named database for file
D:ContentwwwFMakerApp_DataClassAd.mdf failed. A database with the
same name exists, or specified file cannot be opened, or it is located
on UNC share.

Source Error:




Line 1705: }Line 1706: ClassAd.CategoriesDataTable dataTable = new ClassAd.CategoriesDataTable();Line 1707: this.Adapter.Fill(dataTable);Line 1708: return dataTable;Line 1709: }







Source File: c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Filesforms9d7c504b4b8a576eApp_Code.3dq8tdsl.9.cs    Line: 1707


Stack Trace:




[SqlException (0x80131904): An attempt to attach an auto-named database for file D:ContentwwwFMakerApp_DataClassAd.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +739123 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1956 System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +33 System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +170 System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +349 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) +170 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496 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(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) +162 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) +107 ClassAdTableAdapters.CategoriesTableAdapter.GetCategoriesByPropCode(String PropCode) in c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Filesforms9d7c504b4b8a576eApp_Code.3dq8tdsl.9.cs:1707[TargetInvocationException: Exception has been thrown by the target of an invocation.] System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0 System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +72 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +358 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29 System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance) +482 System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +2040 System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e) +92 System.Web.UI.WebControls.ListControl.PerformSelect() +31 System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70 System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82 System.Web.UI.WebControls.ListControl.OnPreRender(EventArgs e) +26 System.Web.UI.WebControls.ListBox.OnPreRender(EventArgs e) +9 System.Web.UI.Control.PreRenderRecursiveInternal() +77 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360 

View 1 Replies View Related

Unable To Attach Or Create Database

Oct 7, 2007

Hello,
I just recently installed SQL Express 2005 on a new OS which is on Vista Ultimate.
When I try to attach a database by clicking the add button, I receive this error:
===================================
Failed to retrieve data for this request. (Microsoft.SqlServer.Express.SmoEnum)
------------------------------For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476
------------------------------Program Location:
   at Microsoft.SqlServer.Management.Smo.Enumerator.Process(Object connectionInfo, Request request)   at Microsoft.SqlServer.Management.SqlManagerUI.BrowseFolderHelper.GetBrowseStartPath(ISettingsStorage settingsStorage, ServerConnection serverConnection, Type controlType, String settingKey)   at Microsoft.SqlServer.Management.SqlManagerUI.AttachDatabase.GetStartPath(String settingName)   at Microsoft.SqlServer.Management.SqlManagerUI.AttachDatabase.buttonBrowse_Click(Object sender, EventArgs e)   at System.Windows.Forms.Control.OnClick(EventArgs e)   at System.Windows.Forms.Button.OnClick(EventArgs e)   at System.Windows.Forms.Button.WndProc(Message& m)   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
===================================
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)
------------------------------Program Location:
   at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)   at Microsoft.SqlServer.Management.Smo.ExecuteSql.ExecuteImmediate(String query)   at Microsoft.SqlServer.Management.Smo.ExecuteSql.GetDataProvider(StringCollection query, Object con, StatementBuilder sb, RetriveMode rm)   at Microsoft.SqlServer.Management.Smo.SqlObjectBase.FillData(ResultType resultType, StringCollection sql, Object connectionInfo, StatementBuilder sb)   at Microsoft.SqlServer.Management.Smo.SqlObjectBase.FillDataWithUseFailure(SqlEnumResult sqlresult, ResultType resultType)   at Microsoft.SqlServer.Management.Smo.SqlObjectBase.BuildResult(EnumResult result)   at Microsoft.SqlServer.Management.Smo.SqlObjectBase.GetData(EnumResult erParent)   at Microsoft.SqlServer.Management.Smo.Environment.GetData()   at Microsoft.SqlServer.Management.Smo.Environment.GetData(Request req, Object ci)   at Microsoft.SqlServer.Management.Smo.Enumerator.GetData(Object connectionInfo, Request request)   at Microsoft.SqlServer.Management.Smo.Enumerator.Process(Object connectionInfo, Request request)
===================================
The server principal "MyComputerKarl" is not able to access the database "model" under the current security context. (.Net SqlClient Data Provider)
------------------------------For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3042&EvtSrc=MSSQLServer&EvtID=916&LinkId=20476
------------------------------Server Name: MyComputerSQLEXPRESSError Number: 916Severity: 14State: 1Line Number: 1
------------------------------Program Location:
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()   at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
 
When I try to creat a new database I receive this error: 
===================================
Create failed for Database 'TestDB'.  (Microsoft.SqlServer.Express.Smo)
------------------------------For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+Database&LinkId=20476
------------------------------Program Location:
   at Microsoft.SqlServer.Management.Smo.SqlSmoObject.CreateImpl()   at Microsoft.SqlServer.Management.Smo.Database.Create()   at Microsoft.SqlServer.Management.SqlManagerUI.CreateDatabaseData.DatabasePrototype.ApplyChanges(Control marshallingControl)   at Microsoft.SqlServer.Management.SqlManagerUI.CreateDatabase.DoPreProcessExecution(RunType runType, ExecutionMode& executionResult)   at Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTreeViewControl.DoPreProcessExecutionAndRunViews(RunType runType)   at Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTreeViewControl.ExecuteForSql(PreProcessExecutionInfo executionInfo, ExecutionMode& executionResult)   at Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTreeViewControl.Microsoft.SqlServer.Management.SqlMgmt.IExecutionAwareSqlControlCollection.PreProcessExecution(PreProcessExecutionInfo executionInfo, ExecutionMode& executionResult)   at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.RunNow(RunType runType, Object sender)
===================================
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)
------------------------------Program Location:
   at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)   at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(StringCollection sqlCommands, ExecutionTypes executionType)   at Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteNonQuery(StringCollection queries)   at Microsoft.SqlServer.Management.Smo.SqlSmoObject.ExecuteNonQuery(StringCollection queries, Boolean includeDbContext)   at Microsoft.SqlServer.Management.Smo.SqlSmoObject.CreateImplFinish(StringCollection createQuery, ScriptingOptions so)   at Microsoft.SqlServer.Management.Smo.SqlSmoObject.CreateImpl()
===================================
CREATE DATABASE permission denied in database 'master'. (.Net SqlClient Data Provider)
------------------------------For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3042&EvtSrc=MSSQLServer&EvtID=262&LinkId=20476
------------------------------Server Name: MyComputerSQLEXPRESSError Number: 262Severity: 14State: 1Line Number: 1
------------------------------Program Location:
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()   at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
On my previous computer which had WinXp Pro I had no such problems
 Any Help would be much appreciated
Thanks
Karl
 
 
 

View 3 Replies View Related

Unable To Attach SQL Express Database

Apr 19, 2008

Hello,
 I have a SQL Express database created with VWD 2005 and I want to attach it to the server using the SQL Server Management Studio. It is not the first time when I attach a database, but now, I don't know from what reason, it is not working anymore. So, I copy/paste the mdf and ldf files from the website location (the SQL Server Management Studio is not opening the folder C:usersmyuser in Vista Home Premium, don't know why) to a new location and try to attach. The error message is:
TITLE: Microsoft SQL Server Management Studio Express------------------------------
Attach database failed for Server 'GEORGE-PCSQLEXPRESS'.  (Microsoft.SqlServer.Express.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476
------------------------------ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)
------------------------------
Unable to open the physical file "E:SQLaria.mdf". Operating system error 5: "5(error not found)". (Microsoft SQL Server, Error: 5120)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3042&EvtSrc=MSSQLServer&EvtID=5120&LinkId=20476
------------------------------BUTTONS:
OK------------------------------
The file location is OK, what can I do?
 
Thanks.

View 1 Replies View Related

Unable To Attach SQLExpress Database

Jul 16, 2007

This is by FAR, the most frustrating problem I have dealt with for a while.

I have a project containing a SqlExpress database that I created in Visual Studio 2005. Everything works perfectly on my development machine. However, upon copying the site up to the webserver, I get an error stating:


An attempt to attach an auto-named database for fileD:ContentwwwFMakerApp_DataClassAd.mdf failed. A database with thesame name exists, or specified file cannot be opened, or it is locatedon UNC share

I have read almost every article/forum post that resulted from a search with google. I also searched these forums, to no avail.

Note - SQLExpress had just been downloaded and installed on the server, so it wasn't being used yet. Server is Windows Server 2003.

Here are the following steps I have already taken:

Used SSEUTIL.EXE to verify that another database of the same name was not already attached
Uninstalled & reinstalled SQLExpress multiple times
Temporarily granted 'Full Control' permissions to 'Everyone' on the site folder to verify that it was not a permissions issue.
Created a very simple website, with a new database, one page - with one listbox control, and a sqldatasource. Got the exact same error. Should rule out a problem with my application.
Tried various flavors of the web.config connection string.
Probably other stuff that I forgot about, but will add if I remember.

The only things I could imagine being wrong are either a problem with my connectionString, or the fact that SQLExpress is installed on C:, and webstuff is on D: (Wasn't able to install SqlExpress to D: for some reason)

Connection String
<connectionStrings>
<add name="ClassAdConnectionString" connectionString="Data Source=.SQLEXPRESS;
AttachDbFilename=|DataDirectory|ClassAd.mdf;Integrated Security=true;User Instance=True"
providerName="System.Data.SqlClient" />
</connectionStrings>




So I have had like 12 strokes today. If anybody could help me get this fixed, I will spread tales of your awesomeness throughout the lands


I have included some extra info below in case it is needed.
Thanks, Adam.


Entire Error

An attempt to attach an auto-named database for fileD:ContentwwwFMakerApp_DataClassAd.mdf failed. A database with thesame name exists, or specified file cannot be opened, or it is locatedon UNC share. Description: Anunhandled exception occurred during the execution of the current webrequest. Please review the stack trace for more information about theerror and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException:An attempt to attach an auto-named database for fileD:ContentwwwFMakerApp_DataClassAd.mdf failed. A database with thesame name exists, or specified file cannot be opened, or it is locatedon UNC share.

Source Error:





Line 1705: }
Line 1706: ClassAd.CategoriesDataTable dataTable = new ClassAd.CategoriesDataTable();
Line 1707: this.Adapter.Fill(dataTable);
Line 1708: return dataTable;
Line 1709: }
Source File: c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Filesforms9d7c504b4b8a576eApp_Code.3dq8tdsl.9.cs Line: 1707

Stack Trace:





[SqlException (0x80131904): An attempt to attach an auto-named database for file D:ContentwwwFMakerApp_DataClassAd.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +739123
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1956
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +33
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +170
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +349
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) +170
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496
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(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) +162
System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) +107
ClassAdTableAdapters.CategoriesTableAdapter.GetCategoriesByPropCode(String PropCode) in c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Filesforms9d7c504b4b8a576eApp_Code.3dq8tdsl.9.cs:1707

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0
System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +72
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +358
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29
System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance) +482
System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +2040
System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e) +92
System.Web.UI.WebControls.ListControl.PerformSelect() +31
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.ListControl.OnPreRender(EventArgs e) +26
System.Web.UI.WebControls.ListBox.OnPreRender(EventArgs e) +9
System.Web.UI.Control.PreRenderRecursiveInternal() +77
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360





View 2 Replies View Related

Unable To Attach A Database To The MSDE Instance

May 4, 2007

Hi I'm creating a database instance with the MSDE 2000 using the Command line(executing a batch File) and once the installation is finished(from the same batch file) I'm trying to attach a database to it. but the database is not attached to the database. but when I go to the sql server and register this new database and run the same command the database is attaching.

can any one suggest how to do this without going to Enterprise manager and registering the database again.

-regards

GRk

my commands I'm using to create is (Batch FIle)

CD

CD test

sqlrun01.msi targetdir="c: estmssql$test" datadir="c: estmssql$test" securitymode=SQL disablenetworkprotocols=0 sapwd="sa" instancename="test"

cd

c:

cd

move C: est1 est_Data.MDF c: estlmssql$testmssql$testData

cd
move c: est1 est_Log.LDF c: estlmssql$testmssql$testData

CD

osql -U sa -P sa -S GRKPC estl -q "EXEC sp_attach_db @dbname=N'TestDB', @filename1=N'c: estmssql$testmssql$testData est_Data.MDF',@filename2=N'c: estmssql$testmssql$testData est_Log.LDF'"

View 4 Replies View Related

Exception Error 5123 - Unable To Attach Database

Jan 29, 2008

Hello.

Our GIS group is working with SQL Server 2005 in conjunction with ESRI's ArcGIS software. SQL Server is being used as a test bed until we formally migrate our existing Microsoft Access mdb's over. So, at this time we are conducting various tests and have the freedom to "blow up" our databases.

We are currently testing ArcSDE Workgroup edition, which will only work with SQL Server Express (SSE). SSE will let us create spatial joins and relationships, while maintaining data integrity. So one possible workaround was to detach the database from SQL Server 2005 and then attach it to SSE. Unfortunately, we ran into a problem in re-attaching the database back to SQL Server 2005.

The exact steps are as follows:


Back up database using back up tool in SQL Server 2005.

Detached database from SQL Server 2005.

Attached database to SQL Server Express (hereafter SSE).

Created a table in database while it was attached to SSE.

Detached database from SSE.

Attempt to attach database to SQL Server 2005 failed

Successfully restored database in SQL Server 2005 using Restore tool.
Step number 6 above failed and generated the following error:



TITLE: Microsoft SQL Server Management Studio
------------------------------
Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file 'C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataLNRIS_SQL_Test.mdf'. (Microsoft SQL Server, Error: 5123)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=5123&LinkId=20476



Questions:


Why did I get this error?

Can incorrect or missing permission or ownership settings generate this kind of error?

When should one detach/attach a database?

I welcome your assistance and suggestions.

View 12 Replies View Related

Unable To Attach DataBase In SQL Server 2005 Standard

May 6, 2007

Now that everyone helped me install SQL Server, it's time to use it... then...



I'm trying to work my through the MS Press book ADO.Net Step by Step. After installing the practice files, there is a step to attach the sample database provided. Within the folder which contains the sample files, I'm told to execute an app which I believe was called "Config.exe". This app brings up a form with 3 text-boxes, to collect the Server Name, Database Name, as well as the Database MDF Filename. There are also 2 buttons, "Attach" and "Detach".



This book assumes, that SQL Server Express is installed. In the book, the author does mention that if this isn't the case, to adjust the Server Name as necessary.



(The following do not include the quotes, but you probably already knew that...)



In the form mentioned above, the default Server Name is "(local)SQLEXPRESS",

I changed this to "(local)MSSQLSERVER".



The next text-box for Database Name contains: "AdoStepbyStep"



The last text-box for Database MDF Filename contains: "c:ADO.NET 2.0 SBSSampleDBsAdoStepbyStep_Data.MDF"



The path/spelling of the text in the above is indeed correct. Clicking the "Attach" button, results in the following:



--- ERROR ---

Function: AttachDB

Description: [Microsoft][ODBC SQL Server Driver][DBMSLPCN]InvalidConnection.

[Microsoft][ODBC SQL Server Driver][DBMSLPCN]ConnectionOpen (ParseConnectParams()).



I've never used SQL Server, so please any advice needs to be at a relatively elementary level. I've primarily been a mainframe programmer, so this is new to me.



Thanxxxxxxxxxxxxx in advance for any replies!!!

View 16 Replies View Related

Unable To Attach To Devenv.exe To Debug

Apr 5, 2006

Before I start peppering this forum with questions I'll start with one that might help me figure out others...

I'm trying to debug a custom component I'm developing. All the texts I've read state that the first thing I should do is attach to the devenv.exe process. When I choose this, the window that lists the available processes I can attach to does not contain devenv.exe.

Is this a security issue? Any other ideas? I'm an administrator on the box. Most of my career's been spent in UNIX environments, so perhaps I'm missing something basic I'm unaware of.

Thanks.

View 3 Replies View Related

Urgent - Unable To Restore/attach A MDF File

Jul 7, 2004

Hi,

I was having problems on myt PC so i did a fresh installation. However I had backed up my SQL database (I only have the MDF file and not the log file).

I have tried restoring and attaching options but nothing works :(

I also get the error saying

"Can not open backup device.... Device error or device off-line. See the SQL server error log for more details. RESTORE database is terminating abnormally".

Please this is urgent. WIll be VERY grateful for your urgent reply.

View 7 Replies View Related

Urgent - Unable To Restore/attach A MDF File

Jul 7, 2004

Hi,

I was having problems on myt PC so i did a fresh installation. However I had backed up my SQL database (I only have the MDF file and not the log file).

I have tried restoring and attaching options but nothing works :(

I also get the error saying

"Can not open backup device.... Device error or device off-line. See the SQL server error log for more details. RESTORE database is terminating abnormally".

Please this is really urgent. Will be VERY grateful for your urgent reply.

View 13 Replies View Related

Unable To Start T-SQL Debugging. Could Not Attach To SQL Server Process On

Jul 27, 2006

Please help! I cannot debug CLR procs remotely. Whenever I try to start debugging in VS2005 I get the error: Unable to start T-SQL Debugging. Could not attach to SQL Server process on .... I have clr enabled set to 1 and I have Allow SQLCLR Debugging set on. But I continue to get this error. Any help would be greatly appreciated.

Thanks!

GN

View 21 Replies View Related

Error Message: Unable To Start T-SQL Debugging. Could Not Attach To SQL Server Process On 'Server1'

Jan 24, 2008


I've installed Visual Studio 2005 Professional evaluation edition on both my desktop & on the server to try out the Debugger to be used with my Stored procedures

I got this error message every time i try to 'Step into Stored Procedure' from my desktop to connect to the stored procedure which resides on the Server.

Error message: Unable to Start T-SQL Debugging. Could not attach to SQL Server Process on 'Server1'.The RPC server is unavailable

The 'Step into Stored Procedure' works though if I open the stored procedure directly on the server.

Both my PC and Server has been installed with Remote Debugger and my windows login has been assigned permission to debug on the debugger that resides on the Server and has sysadmin server role on SQL 2005 both on PC and Server.

Can someone tell me what i miss out to debug Stored procedure in the SQL Server 2005 on the Server from my PC?

Thanks in advance.

View 1 Replies View Related

Migrating From Sql2000 MSDE Database To Sql2005 Express - Attach Database Errors

Apr 23, 2006

I have a medical records system, SoapWare v4.90, that uses MSDE (SQL2000) databases. Due to the 2gb limitation, I am trying to migrate over to SQL 2005 (Standard or Express) which I have heard works fine. The SoapWare has a datamanager that allows me to log in to the MSDE instance, detach the SoapWare databases from msde (as well as do backups, etc) which I can confirm are detached.

Then I log back into a SQL2005 database instance using the datamanager and try to attach the database. This is what their pictured instructions demonstrate. However, I get the following error:


Database 'sw_charts' cannot be upgraded because it is read-only or has read-only files. Make the database or files writeable, and rerun recovery.


Of course, some of the entries will be read only, since doctors have to sign off the charts and are not allowed to subsequently change them.  But I should still be able to switch over to sql 2005?!?!?!?


Or... is there a way to attach the databases to SQLExpress manually?

Help pls?

View 1 Replies View Related

Attach Aspnetdb.mdf Failed, But I Can't Find Attach Statement In The Web.config

Nov 21, 2007

An attempt to attach an auto-named database for file C:WebApp_Dataaspnetdb.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.  
My web.config file, the connection strings
<connectionStrings>
  <add name="POAdatabaseConnectionString1" connectionString="Data Source=sss;Persist Security Info=True;Initial Catalog=POAdatabase.mdf;Integrated Security=SSPI"   providerName="System.Data.SqlClient" />
 </connectionStrings>
I cann't really find the statement for attaching aspnetdb.mdf. I don't where to find it. Is there any other web.config file in the C drive? Thanks for help!
 

View 3 Replies View Related

An Attempt To Attach An Auto-named Database For File (file Location).../Database.mdf Failed. A Database With The Same Name Exists, Or Specified File Cannot Be Opened, Or It Is Located On UNC Share.

Sep 2, 2007

Greetings, I have just arrived back into the country (NZ) and back into ASP.NET.
 I am having trouble with the following:An attempt to attach an auto-named database for file (file location).../Database.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
It has only begun since i decided i wanted to use IIS, I realise VWD comes with its own localhost, but since it is only temporary, i wanted a permanent shortcut on my desktop to link to my intranet page.
 Anyone have any ideas why i am getting the above error? have searched many places on the internet and not getting any closer.
Cheers ~ J
 

View 3 Replies View Related

Attach Database To SQL2005 From Old MSDE Database

Apr 22, 2006

I have a medical records system, SoapWare v4.90, that uses MSDE (SQL2000) databases. Due to the 2gb limitation, I am trying to migrate over to SQL 2005 (Standard or Express) which the company says works fine. The SoapWare has a datamanager that allows me to log in to the MSDE instance, detach the SoapWare databases from msde (as well as do backups, etc) which I can confirm are detached.

Then I log back into a SQL2005 database instance using the datamanager and try to attach the database. This is what their pictured instructions demonstrate. However, I get an error:


Database 'sw_charts' cannot be upgraded because it is read-only or has read-only files. Make the database or files writeable, and rerun recovery.

Or... is there a way to attach the databases to SQLExpress manually?

Help pls?

View 3 Replies View Related

Detach Database, Attach Database Without Log File

Jul 20, 2005

If I detach a database on a server, then attach the database with asingle file only using the data file...will I lose any transactionsthat were in the original log file? There is a debate going on here atwork where some people think that during the detach, transactions inthe log file are saved to the data file.Thanks!

View 4 Replies View Related

Can't Attach Database

Dec 16, 2007

I've created a database inside my ASP.net project, the database is in the App_Data folder as exepcted.I can't run the aspnet_regsql until I have attached it using SQL Server Management Studio, but when I try to attach the database it doesn't let me navigate through my folders properly. The database is in C:UsersWardieDocumentsFirstProjectApp_Data but SQL SMS only lets me navigate to the folder C:UsersWardie and no further for some reason, meaning I can't attach the database and can't use the aspnet_regsql service to create the membership tables.Does anyone know how to fix this? 

View 3 Replies View Related

Attach Database

Nov 26, 2001

Hi guys,
I had user who would like attach trial database and de-attach database when he do development. I do not want him had any other permission except the database he attach. I give him database creator role. But it did not seems work. I have to give him database creator role and system admin role also. Any one have better ideas about this?
Thanks for help
Helen

View 1 Replies View Related

Cannot Attach Database.

Feb 16, 2006

Basically says chain linkage mismatch

Any way to fix this?

View 1 Replies View Related

Cannot Attach The Database

May 14, 2006

hi ,
i want to use a database that someone created in SQL SERVER 2000/WINDOWS SERVER 2003.My system is SQL SERVER 2000/XP SP2 PRO .The problem is that the database is an unknown file .I mean ,it isn't ,as usually, an .mdf or .ldf file ,so i cannot attach it to the server.
Is there a problem in compatibility between the different versions of windows?Or is missing something from the database?What can i do?

Thanx in advanced

View 8 Replies View Related

Attach A Database Without LDF

Jan 31, 2007

I want to attach a database that one of the developers had detach it. The LDF file was deleted after detach.

I tried to attach and rebuild the log file in SQL2005 using the following:

USE [master]
GO
CREATE DATABASE [Test] ON
(FILENAME = N'G:MSSQLDataTest.mdf')
FOR ATTACH_REBUILD_LOG
GO


I get the following error:

File activation failure. The physical file name "D:MSSQLDATATest_log.LDF" may be incorrect.
The log cannot be rebuilt because the database was not cleanly shut down.
Msg 1813, Level 16, State 2, Line 1
Could not open new database 'Test'. CREATE DATABASE is aborted.

What should I do?

Thanks,

Canada DBA

View 20 Replies View Related

Attach Database

Oct 14, 2006

I have a database on a server and want to put it my local laptop that also has sql express. I attached the db, I see it in Management Studio but it does not show up in

C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLData so my app is not working correctely. How do I get the db to show up in the MSSWLData folder. I'm a bit confused.

View 7 Replies View Related

Cannot Attach My Database

Dec 15, 2006

That's the error I get.Please help
    '
TITLE: Microsoft SQL Server Management Studio Express------------------------------Failed to retrieve data for this request. (Microsoft.SqlServer.Express.SmoEnum)------------------------------ADDITIONAL INFORMATION:An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)------------------------------C:Program FilesMicrosoft SQL ServerMSSQL.3MSSQLDataMyNewDB.mdf is not a primary database file. (Microsoft SQL Server, Error: 5171)

View 4 Replies View Related

Can't Attach To Database

Jan 23, 2007

Hi,

I have a database that I developed using both Toad for SQL and SQL Server Managment Studio.

All was working fine. I could connect to the database with one of the above and also run two an applications I developed (one in C# and One in VB.NET using VS Express) using the standard SQLConnection class.

the following connection string worked fine...

Server="(local)"; Trusted_Connection="yes"; Database="CDEvolution";

Now, for one reason or another I decided to create a new data source in my Visual Studio project and pointed it to the database fine.

At first it seemed ok as I could see all tables from teh database. However somethign strage has happened. I now can't access the database in TOAD or SQL Server Managment Studio. I also couldn't connect using the above string.

I finally managed to get the two appllications I developed to access database using the following connection string...

Data Source=.SQLEXPRESS;AttachDbFilename=C:Program FilesMicrosoft SQL ServerMSSQLDataCDEvolution.mdf;Integrated Security=True;Connect Timeout=6000;User Instance=True;

and the applications work fine, however I can access the database using the DB tools.

In SQL Server Managment Studio I remove the database and tried to attach it again but I keep getting the following error message...Could not find row in sysindexes for database ID 5, object ID 1, index ID 1. Run DBCC CHECKTABLE on sysindexes.
Could not open new database 'C:PROGRAM FILESMICROSOFT SQL SERVERMSSQLDATACDEVOLUTION.MDF'. CREATE DATABASE is aborted. (.Net SqlClient Data Provider)

Any ideas on how I can get access back?



Cheers in advance,

Kevin



View 6 Replies View Related

Can Not Attach Database,

Oct 29, 2006

Can not attach database,
Error message;
The file you've specified is not a valid SQL Server database file.


My costumer HDD some files Deleted mybe elektric prblem -Elektric
go,com,go,come- then windows not opened.
insert corrupt hdd Another computer, then recovering (recover my files
software)
Recover mdf and ldf files. but I can not not attach mdf. file,


I am recovery .mdf file http://www.officerecovery.com/mssql/ some table ok.
but my importand table is not ok.

if I can recover another recovery software , my database correct recover or
same.?
I am using RecoverMyFiles.

Pleace help me.

Thanks.

View 1 Replies View Related

Database Will Not Attach.

Jun 29, 2006

Hi,

We are trying to attach a Database from SQL7 to SQL2K SP3.

On SQL7

The Database was detached and the MDF copied to the New Server.

On SQL2K

We used the attach Db (in Enterprise Manager).

We get a red 'x' as normal against the logfile and noramlly it would create a new one when u proceed, but this time we are getting an error after the dialogue box asking to create a new one:

Error 1813: Could not open new database 'dbname'. CREATE DATABASE is aborted.

Device activation error. The physical file name 'd:mssql7datadbname.ldf' maybe incorrect.

The path is where the logfile resided on the old server.

Regards

John.



View 4 Replies View Related

Detach && Attach Database

Oct 10, 2006

I've just created ASPNETDB database with ASP.NET Security. Now, I want to send this db to orther computer.First, I  detached this db, then when I used attach database in that computer, there is an error :Error 602: Could not find row in sysindexes for database ID 8, object ID 1, indext ID 1. RUN DBCC CHECKTABLE on sysindexes. Please help me .Thank.

View 3 Replies View Related

Attach Database By Query

Apr 23, 2008

Hi to all,           Is there any way to attach a database using query. 

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved