Detaching A Replication Databse

Mar 17, 2004

I am trying to detatch a database that is set up as a publisher. I have desabled the replication tasks on both the publisher and subscriber db and am still unable to detach the db. Any ideas?

The image below is an example of the message I receive. I have tried after hours so at that time the users are 0.

Thanks.

View 2 Replies


ADVERTISEMENT

Detaching A Replication Databse

Mar 17, 2004

I am trying to detatch a database that is set up as a publisher. I have desabled the replication tasks on both the publisher and subscriber db and am still unable to detach the db. Any ideas?

The image below is an example of the message I receive. I have tried after hours so at that time the users are 0.

Thanks.

View 3 Replies View Related

Databse Replication

Sep 10, 2007

Dear All I've made transactional replication between two SQL 2005 servers.Everything looks fine, synchronization working fine, no errors, however size of replicated database file = 97 Mb,on Publications server the database file size = 184 Mb. What is wrong :S ? Best RegardsPiotr

View 5 Replies View Related

Reattaching And Detaching

Jan 29, 2002

Hi
I have tried to restore on db to another on different servers. Unfortunatly the sort orders dont match. Does anyone out there have any articles or know how to attach the the source db data and log files to the destination db. I would appreciate any assistance.
Thanks
D

View 1 Replies View Related

Reinstalling SQL 7 After Detaching Dbs

Dec 8, 1999

I understand that you must sp_detach_db and sp_attach_db to move databases to a new server. What if you want to reinstall SQL 7.0 to a different drive on the same server? My situation is this:

We have C:, D:, and E: drives. I accidentally installed SQL 7 on the C: drive instead of the D: drive. I need to reinstall on D: and I need the data. Any suggestions?

Alan

View 1 Replies View Related

Detaching Non-existing Db's

Jan 9, 2006

Hello all

From time to time I receive mssql server databases to export from our customers. Last time I deleted the database files without detaching them. How can I detached them, since I need to atach new ones with the same name?
I'm using MS SQL Server 2003 and the databases are 6.5.

Thank you all.

Regards.

View 7 Replies View Related

Detaching And Attaching

Dec 10, 2006

Hi,
Im not new to SQL Server but I am new to v.2005. We have done a class project and to finish up I am creating schemas, logins and different user roles and permissions.
I now need to detach the DB and send it to our team leader for submission. I'm scared to do this because I don't know if all the logins and passwords I've created will appear in it's new location. Will they be there in the new server's security folder just as I created them or will they dissapear into the ether?
Signed:
Sweating very much


It is better to be prepared and not have an opportunity than to not be prepared and have an opportunity

View 7 Replies View Related

Detaching Database

Sep 28, 2007

I need to detach a db. When I right click and choose detach the popup box shows 0 connections however, I'm getting the error 3701 cannot detach because it's currently in use. How can I tell what is causing this or what is using the db?

View 3 Replies View Related

Detaching And Reattaching A Read-only DB

Nov 30, 2000

Anybody know if it's possible to re-attach a readonly database without making it operational? I'm using log shipping to keep my hot standby current, but would like to take the detached db and duplicate it elsewhere, I just cant re-attach it as read-only again when I'm done. Thanks!

View 2 Replies View Related

Attaching-detaching Db = Too Long

Jun 18, 2004

Why does it take time to detach or attach a Db sometimes ?

View 4 Replies View Related

Attaching And Detaching A Database

Jul 20, 2005

Q1.)In SQL Server 2000, is it always possible to use copies of thedata and transaction log files of a database from one server toreattach to a new database on another server, or even to the sameserver, without first detaching from the existing database?Books Online says that detaching a database closes the data and logfiles cleanly. I read some where that some times, it is possible toattach without detaching, if the data and log file are in stablestate.This is what I tried - Tried to copy Northwind.mdf and ldf files usingwindows explorer and it gave an error message that the files are inuse. I shutdown the server and now I could easily copy them. Afterthat I renamed these files and successfully attached them as a newdatabase.Q2.)Is it possible to do the same with large production databases?Q3.) Please explain what goes on during detaching /attaching process.Thanks in advanceRavi

View 1 Replies View Related

Detaching And Moving Databases

Nov 23, 2006

Not sure if this is the exact forum I need but here goes.

Having a bit of an issue 'moving' a database. I've only just installed SQL Server 2005 on a Development/Test box so I can learn and mess around with it without doing any serious damage to anything important.

One of the first things I've done is install the AdventureWorks database and, having installed it, decided I would move the files to their optimum locations. However having detached the database I can't seem to move or copy the .mdf or .ldf files - something still seems to have its tentacles around them - 'Access denied' error. Even rebooting the server doesn't work. So I've had to delete then re-attach the database. The question then is does Detach serve any useful purpose? Or am am doing something wrong? With SS2000 I could detach a database, relocate the physical files and re-attach in seconds. The same procedure with SS2005 has taken me an hour!

Regards,

Gordon F.

View 4 Replies View Related

Views On Attaching/Detaching Mdf Files

Apr 9, 2008

I am currently having a problem in the implementation of a Database for my C#.net winform application.

Look at the 2 diagrams below:

Diagram 1 : A typical databse design where it usees only 1 mdf file.


Diagram 2: A new proposed approach to implement the Database with multiple mdf files of the same schema!!

In the new proposal of the DB, each mdf files is kept separately and an additional module is required to attach and detach these databases as and when required. The purpose: the performance of all actions on the small data is not affected by the size of the large data

How does this 2 methods measure up in terms of resource usage, performance, etc??

Need comments and views. Thanks.

View 9 Replies View Related

Detaching And Attaching A Database For My Project

Mar 22, 2008

I hope this is the right forum for this question.

I am working with an asp.net project in Visual Web Developer 2005 Express. This is a starter kit project. There is a database that came with the project that I want to open up in the SQL Server 2005 Express management studio so that I can modify it.

I have detached the db in the VWD environment.But, I do not see this db in the db folder with in the SQL Server studio's IDE. I am assuming that I have to attach the database to the SQL Server management studio in order to work with it. Is this the correct way to do this type of thing? Is there a better way of doing it(a stored proc like mentioned below)?

I also have a question about the icons that pertain to this situation. I have noticed two variations of the same icon. I want to be sure I am interpretting these correctly. I am assuming that the icon that is a cylinder representing a db with the little
electrical plug coming out from behind it means that the db is attached. There is another version of this icon that has a red "x" over the plug. I am assuming that this means it is detached. Is this correct?

I have attached and detached dbs in Sql Server Express. Is the process the same for doing this with a project in Visual Web Developer? Is there a stored proc that I can use to detach from the SQL Server 2005 environment after I have made a database and attach this to my project in VWD in one step?

-thanks in advance

View 4 Replies View Related

Detaching DB From MSDE And Attaching To SQL Express Using SQLDMO.

Dec 19, 2007

All,

I wanted to to detach a DB say MyDB from MSDE and wanted to attach it to SQL Express.
It could able to Detach the DB from MSDE,but attachment to SQL 2005 is failing. When I verified MSDE Instance through Managment studio "MyDB" wasnot there ; means it got detached.I couldnt find the DB in SQL 2005. When I tried manually through command prompt I was able to attach "MyDB" to SQL2005.
Please help me out!!
Here is the code which I have written.

if SUCCEEDED(hr = CoCreateInstance (CLSID_SQLDMOServer, NULL, CLSCTX_INPROC_SERVER,
IID_ISQLDMOServer, (LPVOID*)&pSQLServer))
{

pSQLServer->SetLoginSecure (TRUE);
SQLDMO_LPCSTR DB = OLESTR("MyDB");
//Connect to MSDE First
if SUCCEEDED(hr = pSQLServer->Connect (szDbServer, szUserName, szPassword))
{

pSQLServer->DetachDB(DB,lpszResult); //Detach the DB
pSQLServer->DisConnect(); //Disconnect MSDE
LPBSTR lpszResult2 = NULL;
long lNumDB;
//Connect to SQL 2005
if SUCCEEDED(hr = pSQLServer->Connect (szSQLExpDbServer, szUserName, szPassword))
{
//LPCOLESTR lpo = A2COLE(sTemp);
//sTemp.operator LPCTSTR
pSQLServer->GetDatabaseCount (&lNumDB);
SQLDMO_LPCSTR files = OLESTR("C:\Program Files\Microsoft SQL Server\MSSQLData\MyDB.mdf,C:\Program Files\Microsoft SQL Server\MSSQL\Data\MyDB_log.ldf");
pSQLServer->AttachDB(DB,files,lpszResult2); // Attach the DB to SQL 2005

pSQLServer->DisConnect(); // Disconnect SQL 2005}

View 1 Replies View Related

Error 4064 After Detaching And Reattaching Database

Oct 8, 2007



Since the "Cannot Open User Default Database (error 4064)" thread is closed, and I had this same error, I'd thought I'd leave the solution that worked for me since I spent about 2 hours researching this problem. After detaching my database, then reattaching it, I couldn't log back in with my login ID. I could get in using the sa account. I could also log in with my login ID if I set the default database to master using SQL Server Management Studio by navigating to Security, Logins, right-clicking my login ID, then setting the default database to master. However, this isn't a solution, because I need my login ID to default to the database I reattached, not master.

One way of resolving this is to set the new Login ID as the owner. Right click the database under Databases in Management Studio, choose Properties, choose Files, then set the owner with the new login ID. I can then connect to the reattached database with my login ID. If I set the owner back to sa, I can't connect with my login ID, I have to use sa. If someone has a solution to relink my new login ID and the user with the same name so I can log in with sa set as the owner, I'd love to hear it. I can't make that work.

BTW, if I go under Logins, right click my new login ID, choose properties, then User Mapping, my reattached database is selected under Users mapped to this login. However, the Users and Default Schema columns are both set to dbo.

--Steve

View 1 Replies View Related

Whats The Difference Between Detaching And Taking A Db Offline?

Oct 22, 2007

what is the difference between these two db tasks in mgt studio?

View 7 Replies View Related

Is There A Problem Detaching A Database From SQL2000 And Attaching It To SQL2005?

Dec 5, 2007

Hi

I have to migrate a SQL2000 database to SQL2005, I tried to use CopyDatabase Wizard (CDW) but invariably stopped all processes (may be for permissions, but I really I don€™t know) so I decided to detach de database, copy files to new server and attach it to SQL2005, it apparently works well, except for the fact that Schemas where created with the name of the users of SQL2000.
Is that correct?
Could it affect the performance or any other thing?
Is correct to do what I did?
Could be another problem in the recently attached database?
(Compatibility, data loss, corrupted structures, collation or something like that)

The server I am using is in a domain, it has windows server 2003 R2 SP2
@@Vesion returns

Microsoft SQL Server 2005 - 9.00.3042.00 (Intel X86)
Feb 9 2007 22:47:07
Copyright (c) 1988-2005 Microsoft Corporation
Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 2)

And in the source server with windows 2000 SP4
@@Vesion returns

Microsoft SQL Server 2000 - 8.00.194 (Intel X86)
Aug 6 2000 00:57:48
Copyright (c) 1988-2000 Microsoft Corporation
Enterprise Edition on Windows NT 5.0 (Build 2195: Service Pack 4)


Thank you in advance

Any comment will be greatly appreciated

JAPonce

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

SQL Server Management Studio Express On Vista Home Premium (Error On Attaching And Detaching .mdf)

Sep 5, 2007



I have SQL Express 2005 SP2 installed in my Vista Home Premium. I am using SQL Server Management Studio Express to manage .mdf.

When I click "Add..." to attach .mdf database, I have this prompt error message :

The server principal "My-PCMyName" is not able to access the database "model" under the current security context. (Microsoft SQL Server, Error: 916)


I have elevated the rights, "Run as administrator", of my SQL Server Management Studio Express, but still having problem.

I also encounter security error when detaching the existing .mdf :
The EXECUTE permission was denied on the object 'sp_detach_db', database 'mssqlsystemresource', schema 'sys'. (Microsoft SQL Server, Error: 229)


Please advice. Thanks.

View 8 Replies View Related

Searching A Databse

Aug 31, 2006

i'm making a web page for a clinic.it needs to be able to search for patients by first name, surname, date of birth and patient number.i'm using visual web developer and i have my database, my data source and GridView grid.i want  4 text boxes for my first name, surname etc. when u click enter on any of them i want to retrieve all their data and display it in the gridview.at the moment i have  one text box on the web page and through the "Configure data source" option on the grid view i can retrieve the specified data but for only this one item, e.g. SELECT * FROM [Patients] WHERE ([DOB] = @DOB). if i add another text box to my web page, and don't do anything to it, the query wont run. if i add and "AND" statement to the query, e.g. SELECT * FROM [Patients] WHERE (([DOB] = @DOB) AND ([FirstName] = @FirstName)), again it won'r run or return and data. any ideas on what i can do or where i'm going wrong. thanks 

View 1 Replies View Related

New Databse - Notification

May 18, 2000

Does anyone know how I can receive some type of notification (an alert) that fires when a new database is created (or an old one deleted) on a server?

Thanks.

View 1 Replies View Related

How Can I Create Databse?

Apr 6, 2008

Hi,
I had downloded MS SQL express from Microsoft. But i did not find any place from where i can create databse, table etc..

please help me regarding this.

thanks
Sabbir

View 3 Replies View Related

Connection To Databse

Jun 29, 2006

hi, im totally new to this sql thing.
i have a set of classes here and my objective is to show that they can connect to the database. how am i supposed to do this?

can i post my classes here? theres a lot..

View 8 Replies View Related

How To Clear The Whole Databse?

Apr 7, 2007

Hi, my database i am working on is full of crab, who do I clear all the tables info?

View 3 Replies View Related

Databse Creation

Aug 2, 2007

How to create a database in MS SQLserver 2005 express edition.
Pleae help me to get started.I have learned some SQL commands.
But i want to execute those in SQLserver 2005.But i don't know the procedure for creating a database.please help me on this.

View 5 Replies View Related

Designing Databse

Sep 21, 2007

Im creating a sample database for purposes of keeping track of employee's jobs + billing codes for that job. currently they just use an excel spreadsheet to keep track of billing.

Question 1:

What would be the easiest way for the manager to enter billing codes? Billing codes are numbers like 956, 958, 805 and they co-relate to prices for each billing code.

1. I want the manager to enter the billing code and have the sql database find out how much that code is and add them up daily. This would prevent the manager from having to input prices and billing codes, and extra step.

Any links on the above topic would be helpful. I'm not looking for anyone to spoon feed me code just point me in the right direction. Im relatively new to sql having only a class of sql @ ITT.

Heres the way I have the db tables laid out currently.

employee table
employee_id
technumber
fname
lname
address
workphone
homephone
trucknumber
officelocation

employeejobs table
employee_id
jobs_id

jobs table
jobs_id
codes
date
timeframe
city

hours table
hours_id
employee_id
hoursworked
month


Any info would be much appreciated, Im going to go find a sql book now ;).

View 1 Replies View Related

Databse Offline

Jul 20, 2005

hi everyoneCould someone please help me in following:One of my database in SQL 2000 going Offline automatically. When ibring it back Online its Ok for 20/30 minutes and then again appear asOffline. I had similar problem when one of the database keep going to'Single user' automatically.Any idea what happening.Thank you*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!

View 1 Replies View Related

Add A Second Databse - Benefits?

Jul 20, 2005

Hi, there is an existing application running on a SQL Server database.Now I have to built a different app, which will have two common tableswith the existing database (Customers, sales)Is there any benefit (performance mainly) creating the tables for thenew app in a new database? (On the same machine and the same instance)*** Sent via Devdex http://www.devdex.com ***Don't just participate in USENET...get rewarded for it!

View 3 Replies View Related

Lost Databse

Jun 21, 2007

I went and detached a database. It is no longer showing in EM. I try to attach the database and I do not have any MDF files anywhere on my PC. Where did my database go when I detached it? How can I get it back. Please help.



Thank you

View 6 Replies View Related

How To Transfer Databse ..

May 7, 2007

Hi,

I am doing one E-commerce Application , throgh C#. & sql server express editon. Both my Local & Web Hosting servers are in sql server express 2005. I designed Databse Throghly, to my local server. Now I want to Transfer tables to my web server. I have already Sql server mangement studio Express. I can not do.. I spent, more than 5 yrs time..

Please help asasp..

Thanks

Partha

View 1 Replies View Related

Restoring A Databse

Oct 4, 2006

I have a system running on SQL Sever and i am trying to create a second file on a diffrent computer so that I can teach people how to use sql sever (express) without risking losing any data that I have on my proper database.

I have created a backup of my database which is in a dmp file and I would like to import this into SQL Server Management Studio Express so that I can make changes to the databse without affecting the one that is running on my website.



Cheers for any help

View 10 Replies View Related

How Do I Create A Databse Link?

Nov 6, 2006

I would like to run some queries  on two tables that reside in two different database (located on the same server). The databases are both MS SQL 2000.How do I create a database link (or a table link??) so that I can create the queries from the Enterprise Manager or the Query Analyzer? Thanks a lot, Christian 

View 1 Replies View Related







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