Can't Attach Sqlexpress Db

Dec 19, 2006

Hi,

After having published the timetracker starterkit from visual studio 2005 to local wwwroot,

I try to access my homepage with ie.

But still get the same error message :
An attempt to attach an auto-named database for file C:Documents and SettingsEmmanuelMy DocumentsVisual Studio 2005WebSitesGestWaresApp_DataTimeTracker.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

This is how i configure my web.config :

<connectionStrings>

<remove name="LocalSqlServer"/>

<add name="LocalSqlServer" connectionString="Data Source=.SQLExpress;Integrated Security=True;AttachDBFilename=|DataDirectory|TimeTracker.mdf;User Instance=true"/>

<add name="aspnet_staterKits_TimeTracker" connectionString="Data Source=.SQLExpress;Integrated Security=True;AttachDBFilename=|DataDirectory|TimeTracker.mdf;User Instance=true"/>

<add name="ConnectionString" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|TimeTracker.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>

</connectionStrings>





Has someone any idea how my connectionstrings statement has to look like?

thanks in advance.



Manu.



View 1 Replies


ADVERTISEMENT

To Attach DataBase In SQLExpress!

Jul 4, 2005

I have install SQLExpress, too I download AdventureDB, but it created files *.mdf and *.ldf.Now in SQLExpress I cann't attach database witch mouse, I believe that it in code, how I can goal it?. Is there some other way to make this in SQLExpress?

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

Attach/Detach On SqlExpress 2005

Sep 8, 2005

Alan writes "Is it possible to create scripts which can be started remotely
to attach and detach databases into SQLExpress 2005.
If so how."

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

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

Can't Start SQLEXPRESS So That I Can't Install Latest SQLEXPRESS Security Updates.

Mar 13, 2007

I can't start SQLEXPRESS.

The SQL ERRORLOG shows: Error is 3414, Severity 21, State 2 and says: "An error occurred during recovery, preventing the database 'model' (database ID 3) from restarting." Just prior to this, I get a warning: "did not see LP_CKPT_END".

Any thoughts why this might be and how I can fix this?

View 3 Replies View Related

Installing SqlExpress (Advanced Services) Will This Break Existing SqlExpress?

Sep 21, 2006

hiya,

I have sqlExpress and sqlServerManagementStudio on my XP pro box.

Will the installation of sqlExpress (Advanced Services) cause any problems?IS thereanything that I shold be aware of in advance?

many thanks,

yogi

View 3 Replies View Related

How To Install Windows Application(C#) With SQLExpress In A System Which Is Having SQLExpress Already?

Jan 19, 2007

Hi All,

I have created an installation application which will install the application with SQL Express and .NET Framework 2.0.

If i install this application in a Fresh system(i.e which is not having SQL Express), it is installing the application with new database instance successfully.

But if i try to install the same in a system which is already having SQL Express, throwing "Object reference exception" because it is not able to create the new database instance.

Can anybody help me out .

Regards,

Doppalapudi.

View 2 Replies View Related

Sqlexpress Installer Doesn't Believe Sqlexpress Has Been Uninstalled

Mar 21, 2006

Because of numerous problems trying to get sqlexpress working, I uninstalled it with the intention of reinstalling (via Add or Remove Programs). However, now when I try to reinstall it, I get a message that the I am not making a changes so it won't let me install it.

I do have sql server 2005 developer's edition installed; is that the reason? and does that mean I cannot have both installed on the same machine?

View 1 Replies View Related

Convert A SQLExpress File Based DB Project To SQLExpress Server DB Project

Jul 1, 2006

Hi All,I've been struggling with this for hours...Could someone please advise me on how to convert my current File based SQL Server Express website to a Server based SQL Express one.Particularly interested in what I need to do in the SQL Express management tool, changes I need to make the projecvt itself and changes needed to get IIS to understand things have been changed.Thanks,Martin.

View 1 Replies View Related

Attach DB W/o Log

Mar 17, 2002

Help!

I did a sp_detach_db of a database, then deleted the log file because it was too big. Now, when I try to sp_attach_db, or even sp_attach_single_file_db, it will not re-create the db.

View 3 Replies View Related

Can&#39;t Attach A Db

Aug 19, 2002

When I tried to attach a database from Enterprise manager, I got "error 3624, location: scanrid.cpp:321 Expression: m_len != 0 spid 51 proseccid 436......" The files are all there, but it seems there are problems of activating files, or the files are crashed. Any one got idea? Actually, we just need one table in that database. Is there any way to save a table from mdf file or ndf file? Or repair files?

View 1 Replies View Related

How To Attach A DB

Jan 6, 2006

I have database DB1 on Box1 and I have the full backup of that database and also have data file and log file.If I want to restore the database on a diff box How can do that.

1.How can I restore the Database?
2.How ca I attach the data file to the database on new Box?

Thanks.

View 1 Replies View Related

Attach Help

Jan 16, 2004

I received three Files .mdf .ldf .ndf and a text how to use attach
but i always receive an error message "database is write protect ......."
What I do wrong ?

bye

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

Attach Db Failed

May 6, 2002

For a test I detached a database, copied the ldf to a new location, and re-attached successfully. OK, now I want to use the orignial ldf, so I detach, and when I try to attach to the origninal ldf I get:

Server: Msg 3624, Level 20, State 1, Line1

Location: recovery.c:2693
Expression: seenCkptEnd
SPID: 8
Process ID: 109

Connection Broken


Any Ideas on what happened and how to reattach to my original log file?

Rob

View 1 Replies View Related

Attach Db 823 Error

Sep 7, 2005

I know the chances of getting a positive answer on this are remote but here goes:
I have a db that I need to move to a new server (that isnt on the same network !)
Firstly tried, backing up the DB, copying the backup to various removable media, copied it onto the new server, then tried restoring. The restore almost completes, then comes up that backup is incomplete !
If I restore the DB on the original server from the same backup file it works fine !

Second method, detached the DB, copied the mdf file to a memory stick, copied onto the new server, attempted to attach the mdf file and get:
I/O error (bad page ID) detected during read at offset 0x00000003f80000 in file ..........mdf
Error: 823, Severity: 24, State: 2

If I re-attach the file on the original server this works !!!

My next step will be to get the two servers connected over the network, so that I can use DTS, but this is not ideal and would like to avoid this if possible.

If anybody has any suggestions, I would be eternally grateful.

p.s. I have tried restoring/attaching on other servers in case it was a problem with the new server, but get the same problems.

Regards
Tom

View 4 Replies View Related

Attach And Detach DB

Aug 11, 2004

Hello,

MSSQLSERVER VER : 2000
Using - Attach and Detach Database to move the database from one Server to another server.
I did detached the database from Production and attached my test server, everything OK

Questions about - syslogins & sysdevices data dictionary tables
1. When I select * from sysdevices on production it shows all the database name size,phyname etc. After attaching to my test server I cannot see these things.. I know because it different master database but, how do I fix this.
2. syslogins - is there way to move all the syslogins after attaching to test server.

Please let me know if you guys have done anything on this.

Thanks.

Regards,
K.

View 2 Replies View Related

Copy .mdf And Attach As New Db

May 2, 2008

I have copied the .mdf and .ldf files from one db and I'd like to attach the copies to a new db on the same server. When I try to attach the copied files I get the error, "the physical file name may be incorrect". Original db filename is "MC_DISC_Data.mdf", I copied this and renamed it to, "MC_Data.mdf" in my sqldata folder. I can see the physical file name is still the original name when I'm trying to attach db using EM, how can I change it to the copied name?

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

Detach And Attach DB To SQL

May 23, 2006

How I can detach from DB and validate it?
(I mean check if it is detached or not)
Is there any why to return a value from sp_detach_db in C++?


(may a cross posting, please check under developer posts)

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

Detached - Now Cannot Attach!

Mar 5, 2008

I feel that I have done something stupid here.

I used SSMSE to detach my database so that I could create a copy - no problem here.

But then in SSMSE I right-clicked Databases, chose attach and expected to see my original database. But there are no databases shown in the attach window!

I have tried to find the original database in SSMSE but nothing I do allows me to see it. However, Windows Explorer shows me that the files are still where they were when I detached them.

Please help - this is driving me crazy.

Thanks

Chris

View 1 Replies View Related

Attach DB With Corrupt .ldf?

Jul 20, 2005

Hey gang,I've been trying to restore a DB from it's MDF and LDF all morning;the catch? The LDF appears to be corrupt.When I first started the SQL Server, the db in question was marked as"Suspect'. I did some research on this and it has caused me to attemptdetaching, backing up, deleting the LDF, using ATTACH DB and evensp_attach_single_file_db, and sp_add_data_file_recover_suspect_db.Nothing works.So, with an MDF and no LDF ... is it possible to recreate thisdatabase somehow? Can I attach the MDF to another (empty) database toretrieve it's contents? (Tried it, couldn't get it to work), can Iextract the contents of the MDF - even if it's just the objects andnot the data itself - in some capacity?I've read in various places about attaching an MDF with no LDF and thesystem will recreate the LDF as needed, but that doesn't work either.Ideas are most, most, most welcome.

View 1 Replies View Related

Attach Error

Dec 16, 2006

I plan to move my database file to another folder, I detach it first (successfull), but I can't move (Cut&Paste) my database to another folder (Access is denied), And then I go back object explorer but error when I try to Attach

"Failed to retrieve data for this request (Microsoft.SQLServer.SmoEnum)...... CREATE FILE encountered operating system error 5 (Access is denied)"

please tell me how to attach my database, I really need the data..

thx..

 

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

Attach Error

Mar 21, 2006

Cannot access the specified path or file on the server. Verify that you have the necessary security privileges and that the path or file exists.

If you know that the service account can access a specific file, type in the full path for the file in the File Name control in the Locate dialog box.

------------------------------
I get this error when I try to attcah a Database file sitting in "My Documents" folder.

Any help will be appreciated

--Thanks

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







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