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


ADVERTISEMENT

Msde: How To Attach A Database

Feb 21, 2007

hi!

I'm trying to configure MSDE. I think it's ok, but now I don't know how to attach the database. It's only copy paste to the data directory??? If not how this is done? I don't see any configuration tool for it...

Thanks in advance!

Liliana

View 3 Replies View Related

How Can I Attach Access Database To MSDE???

Mar 5, 2005

I have an mircosoft access database, but now i want to attach it to MSDE, how can i do impliment this????


i already try to use the following commands
exec sp_attach_db 'example','c:example.mdb'

but i got the following error message
The header of this file 'c:example.mdb' is not a valid database file header. The FILE SIZE property is incorrect.

View 6 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

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 View Related

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

Can I Attach A Database Collation= En-us To A French 2005 Instance ?

Apr 24, 2008

Hello,

I want to attach a database collation en-us to an instance ( downloaded as french ).

I would want to know if i may have known problems ( i want download databases samples in english only )

Sql Server 2005 Express SP2 with advanced services

Many thanks beforehand

Have a nice day

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

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 Connect To MSDE Database

Jun 5, 2005

Hello All,I am using Visual studio.net framework 1.0 on win XP pro with MSDE. I am not being able to coneect to database using below code. can anyone suggest or have any idea what is going on? I have used all kinds of password and id. It doesnt pull data from DB.  Really appreciate any help. Thank you in advance.


Sub Page_Load
If Not IsPostBack Then
Dim conNorthwind As SqlConnection
Dim cmdSelect As SqlCommand
Dim dtrCategories As SqlDataReader

conNorthwind = New SqlConnection( "Server=localhost;UID=sa;pwd=**secret**;Database=Northwind")
cmdSelect = New SqlCommand( "Select CategoryName From Categories", conNorthwind )
conNorthwind.Open()
dtrCategories = cmdSelect.ExecuteReader()

rptCategories.DataSource = dtrCategories
rptCategories.DataBind()

dtrCategories.Close()
conNorthwind.Close()
End If
End Sub

Sub Button_Click( s As Object, e As RepeaterCommandEventArgs )
Dim lbtnSelected As LinkButton

lbtnSelected = e.Item.Controls( 1 )
lblCategory.Text = "You selected " & lbtnSelected.Text
End Sub

View 8 Replies View Related

NEED HELP! - Unable To Connect To MSDE Database Through Web Matrix Project

Jun 2, 2005

I'm new to asp.net and databases and I'm currently working my way through SAMs Teach Yourself ASP.I am up to working with databases and have successfully installed MSDE using the sql2kdesksp3.exe file. However, when I try to create a new database through the web matrix project I get an 'unable to connect' error. I have tried removing and re-installing the database and I've also re-installed it using the latest file from the MS web site but I still get the same error. I've checked the obvious...that the msde service is running, password is correct, and that checks out ok.Has anyone had a similar problem and resolved it?Thanks.

View 2 Replies View Related

MSDE Text Datatype - Unable To Store More Than 900 Characters. (msde + Visual Studio 2003)

Jun 6, 2005

Hello,

I'm not sure if it's the setup I did wrong, but I can't seem to get my
text datatype in my database to store more than 900 characters. 
I'm trying to setup a news database for my website, which will populate
the information into a datagrid.  To test, I manually added a news
item in the database through the visual studio 2003 gui.  I
immediately noticed a problem as the I was getting an error after a
long news item saying:

"The value you entered is not consistent with the data type or length of the column, or over grid buffer limit."

I couldn't find anthing to set the buffer limit and the datatype is
"text" filled with simple text in the column.  As a further test,
I
simply entered 12334567890123... up to 900 characters and still
recevied the error.

I would appreciate someone leading me in the right direction on this one.

Thanks a lot.

View 1 Replies View Related

SQL 2012 :: Clustered SSAS Unable To Connect To Named Instance (instance Not Found On Server)

Mar 20, 2014

I have a 3 node cluster on which I have installed SSAS as it's own insntance. I have created this as a named instance and can connect to it by serverinstance if I'm on the server itself. However from my desktop I get the error saying instance was not found on server name.

I have defined an alternate port and setup firewall rules and can connect via server:port but not serverinstance. Prior to making this change SSAS was running on default port of 2383 and I could connect just by servername.

I have read many articles for previous versions saying that clustered SSAS will always use 2383 and that you must connect just using servername. However and this is were it gets strange. I have a 2 node UAT cluster with SSAS setup exactly the same way I've described above and I can connect from my desktop as serverinstance.

Should I be able to connect as serverinstances for a named clustered instance in 2012 ?

View 4 Replies View Related

Unable To Open User Instance Type Database After Attaching And Detaching In SQL Mgmt Studio

Apr 15, 2007

I've been using my DotNetNuke database for weeks on my local PC with SQL Server Express. It attaches as a "User Instance". Basically, I am using all the DotNetNuke defaults. Today I decided to attach the DotNetNuke database in SQL Server Management Studio Express and peek at the tables. I attached the database; then I detached it when I was done. This all went well. But when I tried to open my DotNetNuke web site again I now get a message that it cannot connect. Attaching and detaching the database in SQL Server Management Studio obviously changed something about the database, but I don't know what. My connection string to the database has not changed.



The specific error displayed in the browser is:
ERROR: Could not connect to database specified in connectionString for SqlDataProvider

In event viewer is this message:

Exception information:

Exception type: SqlException

Exception message: Cannot open user default database. Login failed.

Login failed for user 'NT AUTHORITYNETWORK SERVICE'.



My connection string is this:

<add name="SiteSqlServer" connectionString="Data Source=.SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Database.mdf;" providerName="System.Data.SqlClient" />



Any suggestions about how I can correct this?

View 3 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

Multipile Instance In MSDE

Jan 12, 2005

I have installed 2 MSDE 2000 engines in to the PC. one is no instance name, another one's instance name is 'TEST'.

I could use a GUI MSSQL manager to connect both with local machine.

But when I tried to connect both with other machine, I found that I only could connect either one which is start in service earlier.

My case is normal?

Are they conflict by the same network port? If yes, could I change the portnumber of the MSDE??


Thanks for your support!!

View 2 Replies View Related

Installing MSDE With A Different Instance Name

Jul 20, 2005

Hi All,

I'm trying (and have been for ages) to install a MSDE server with a
different instance name than the default.  Im setting the
instancename when using the setup.exe file and all seems to install
fine, but when I then restart my system the SQL icon appears in the
system tray but the white circle is completely empty.  It says
that it is not connected.

If i install with the default instance name then all seems to work fine.

Does anyone know what I am doing wrong and what I can do to fix this problem?

Thanks in advance for any help!

View 1 Replies View Related

MSDE Multiple Instance

Sep 6, 2006

I am trying to set up multiple instances of MSDE 2000 for use by Trend Micro virus scan products. I have the instance set up but I am trying to access svrnetcn.exe to set up named pipes and TCP/IP and I keep getting a 126 error "The Specified Module could not be found". Any ideas how to set this up.

thanks,

eric

View 5 Replies View Related

Access MSDE Instance Remotely

Nov 3, 2004

I have a named instance of MSDE running on my windows 2k3 web server. I can connect just fine using ODBC to that DB whailst I am on the server.

I would like to be able to create an ODBC connection from my local machine (running Windows XP pro) to the MSDE database on my server but I can't get it going.

I have heard that I need to edit the registry but a Google search warns that this could be a vulnerability...

How do I do it without compromising the security of my web server?

TIA

View 10 Replies View Related

Dbbackup.exe To Backup MSDE Instance

Feb 16, 2007

I'm running a Scheduled Task to execute dbbackup.exe to backup a local MSDE Instance for Live Comm. Server. When I save it to the local drive it works fine but I'm trying to save the backup to a remote server. I can't seem to get it to work. The account being used has full access to the remote computer and backup folder share.

Syntax:

"C:program filesms lcs 2005serversupportdbbackup.exe" /backupfile:\servernameackupmsdebackup

but when I run the following it works fine:
"C:program filesms lcs 2005serversupportdbbackup.exe" /backupfile:c:ackupmsdebackp

Any ideas? Thanks for any help!!!

View 3 Replies View Related

MSDE 2000 Set-up: Invalid Instance Name

Nov 9, 2006

Thanks in advance.

I installed SQL 2000 Client Portion in my local computer: No server functionality. I selected my computer name as an instance name. Installation went OK.

Now, I am trying to install MSDE in my computer. Error comes in early part of installation: It says, "The instance name specified is not valid"

Please, any advise and suggestion.







View 4 Replies View Related

SQL Browser Not Enumerating MSDE Instance

Apr 10, 2008

So, here is the scenario. I have a server that is running a MSDE 2000 instance (8.0.2039). Runs just fine. I install another database, this one is SQL 2005 Express (9.0.3042). Both are installed as part of application setups. Now, for various reasons, I have to uninstall the MSDE 2000 application and reinstall it. After the reinstall, the SQL Browser service no longer enumerates the MSDE instance, only the 2005 instance. As a workaround I fixed the MSDE port on the server and the clients, and it works fine. It also works fine when the application is run from the local computer without a fixed port.

Any suggestions?

Thanks,
Mark

View 4 Replies View Related







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