Showing posts with label attach. Show all posts
Showing posts with label attach. Show all posts

Thursday, March 22, 2012

Can I copy database files without dismounting them

Can I copy database files without dismounting them and attach them
from a different location.
I want to maintain two identical copies.
Thanks.Hello!
Yes, of course you can do that by using BACKUP \ RESTORE.
Back up your database and restore it on the other instance or SQL Server.
You may get more information about BACKUP and RESTORE from the following
address:
http://msdn2.microsoft.com/en-us/library/ms187048.aspx
--
Ekrem Önsoy
<war_wheelan@.yahoo.com> wrote in message
news:1189434972.953100.269150@.r34g2000hsd.googlegroups.com...
> Can I copy database files without dismounting them and attach them
> from a different location.
> I want to maintain two identical copies.
> Thanks.
>|||Why can't I copy the db files (mdf/ldf) to a new location without
detaching the database?
Why won't this work?
On Sep 10, 11:25 am, Ekrem =D6nsoy <ek...@.btegitim.com> wrote:
> Hello!
> Yes, of course you can do that by using BACKUP \ RESTORE.
> Back up your database and restore it on the other instance or SQL Server.
> You may get more information about BACKUP and RESTORE from the following
> address:http://msdn2.microsoft.com/en-us/library/ms187048.aspx
> --
> Ekrem =D6nsoy
> <war_whee...@.yahoo.com> wrote in message
> news:1189434972.953100.269150@.r34g2000hsd.googlegroups.com...
> > Can I copy database files without dismounting them and attach them
> > from a different location.
> > I want to maintain two identical copies.
> > Thanks.|||Because attaching is only guaranteed if you have a consistent state of the database, which is what
you get by detaching it.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
<war_wheelan@.yahoo.com> wrote in message
news:1189527362.768605.200480@.w3g2000hsg.googlegroups.com...
Why can't I copy the db files (mdf/ldf) to a new location without
detaching the database?
Why won't this work?
On Sep 10, 11:25 am, Ekrem Önsoy <ek...@.btegitim.com> wrote:
> Hello!
> Yes, of course you can do that by using BACKUP \ RESTORE.
> Back up your database and restore it on the other instance or SQL Server.
> You may get more information about BACKUP and RESTORE from the following
> address:http://msdn2.microsoft.com/en-us/library/ms187048.aspx
> --
> Ekrem Önsoy
> <war_whee...@.yahoo.com> wrote in message
> news:1189434972.953100.269150@.r34g2000hsd.googlegroups.com...
> > Can I copy database files without dismounting them and attach them
> > from a different location.
> > I want to maintain two identical copies.
> > Thanks.sql

Monday, March 19, 2012

Can I attach to my 2005 Express DB using the 2005 Mgt Studio (NOT EXPRESS) client?

I have a 2005 Express DB I wish to attach to using the 2005 Mgt Studio Client (Not the express version, but the full blown 2005 Mgt Studio Client from the SQL 2005 Standard Edition Install disk). Can this be done, or can I only use the 2005 Mgt Studio Express Edition Client?

Thanks in advance.
M. Scott Blalock

You can use either one.

Buck Woody

Can I Attach a database with SMO?

I just developed a solution locally, I would like my installer to attach a database on the CD and then modify the web.config, I am interested in learning how to attach it programatically with SMO?

ThankHere is a very simple example:

using System.Collections.Specialized;

using Microsoft.SqlServer.Management.Common;

using Microsoft.SqlServer.Management.Smo;

Server svr;

StringCollection sc;

svr = new Server();

sc = new StringCollection();

sc.Add(@."c:\test.mdf");

svr.AttachDatabase("test", sc);

|||Thank you very much. I love ya.. just kidding.

Can i attach a .NET assembly into SQL 2000 Server as an extended produce?

and how can it be done?See this KB article:INF: Using Extended Stored Procedures or SP_OA Stored Procedures to Load CLR in SQL Server Is Not Supported It is not recommended or supported. You will have to wait for Yukon.

You might also reada blog entry by Clemens Vasters for his thoughts and further explanation of why it is a problem.

Terri