Search Results

Search found 231 results on 10 pages for 'detach'.

Page 1/10 | 1 2 3 4 5 6 7 8 9 10  | Next Page >

  • Difference between Detach/Attach and Restore/BackUp a DB

    - by SAMIR BHOGAYTA
    Transact-SQL BACKUP/RESTORE is the normal method for database backup and recovery. Databases can be backed up while online. The backup file size is usually smaller than the database files since only used pages are backed up. Also, in the FULL or BULK_LOGGED recovery model, you can reduce potential data loss by performing transaction log backups. Detaching a database removes the database from SQL Server while leaving the physical database files intact. This allows you to rename or move the physical files and then re-attach. Although one could perform cold backups using this technique, detach/attach isn't really intended to be used as a backup/recovery process. Commonly it is recommended that you use BACKUP/RESTORE for disaster recovery (DR) scenario and copying data from one location to another. But this is not absolute, sometimes for a very large database, if you want to move it from one location to another, backup/restore process may spend a lot of time which you do not like, in this case, detaching/attaching a database is a better way since you can attach a workable database very fast. But you need to aware that detaching a database will bring it offline for a short time and detaching/attaching does not provide DR function. For more information about detaching and attaching databases, you can refer to: Detaching and Attaching Databases http://technet.microsoft.com/en-us/library/ms190794.aspx

    Read the article

  • Detach an entity from a JPA persistence context (JPA 2.0 / Hibernate / EJB 3 / J2EE 6)

    - by Julien
    Hi, I wrote a stateless EJB method allowing to get an entity in "read-only" mode. The way to do this is to get the entity with the EntityManager then detach it (using the JPA 2.0 EntityManager). My code is the following: @PersistenceContext private EntityManager entityManager; public T getEntity(int entityId, Class<T> specificClass, boolean readOnly) throws Exception{ try{ T entity = (T)entityManager.find(specificClass, entityId); if (readOnly){ entityManager.detach(entity); } return entity; }catch (Exception e){ logger.error("", e); throw e; } } Getting the entity works fine, but the call to the detach method returns the following error: GRAVE: javax.ejb.EJBException at ... Caused by: java.lang.AbstractMethodError: org.hibernate.ejb.EntityManagerImpl.detach(Ljava/lang/Object;)V at com.sun.enterprise.container.common.impl.EntityManagerWrapper.detach(EntityManagerWrapper.java:973) at com.mycomp.dal.MyEJB.getEntity(MyEJB.java:37) I can't get more information and don't understand what the problem is... Could somebody help ?

    Read the article

  • SQL SERVER – Attach or Detach Database – SQL in Sixty Seconds #068

    - by Pinal Dave
    When we have to move a database from one server to another server or when we have to move a database from one file to another file, we commonly use Database Attach or Detach process. I have been doing this for quite a while as well. Recently, when I was visiting an organization I found that in this organization lots of developers are still using an older version of the code to attach the database. I quickly pointed that out to them the new method to attach the database, however it was really interesting to find out that they really did not know that sp_attach_db is now a deprecated method to attach the database. This really made me to do today’s SQL in Sixty Seconds. I demonstrate in this SQL in Sixty Seconds how to attach or detach the database using a new method of attaching database. The code which I have used in this code is over here: -- Detach Database USE [master] GO EXEC MASTER.dbo.sp_detach_db @dbname = N'AdventureWorks2014_new' GO -- Deprecated Way to Attach Database USE [master] GO EXEC MASTER.dbo.sp_attach_db 'AdventureWorks2014_new', 'E:\AdventureWorks2012_Data_new.mdf', 'E:\AdventureWorks2012_log_new.ldf' GO -- Correct Way to Attach Database USE [master] GO CREATE DATABASE [AdventureWorks2014_new] ON ( FILENAME = 'E:\AdventureWorks2012_Data_new.mdf'), ( FILENAME = 'E:\AdventureWorks2012_log_new.ldf') FOR ATTACH GO Here is the question back to you – Do you still use old methods to attach database? If yes, I suggest that you start using the new method onwards. SQL in Sixty Seconds Video I have attempted to explain the same subject in simple words over in following video. Action Item Here are the blog posts I have previously written on the subject of SA password. You can read it over here: SQL SERVER – 2005 – T-SQL Script to Attach and Detach Database SQL SERVER – Move Database Files MDF and LDF to Another Location SQL SERVER – 2005 Take Off Line or Detach Database SQL SERVER – Attach mdf file without ldf file in Database SQL SERVER – Copy Database from Instance to Another Instance – Copy Paste in SQL Server You can subscribe to my YouTube Channel for frequent updates. Reference: Pinal Dave (http://blog.sqlauthority.com)Filed under: PostADay, SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, SQLAuthority Book Review, SQLAuthority News, T SQL, Video

    Read the article

  • How do you detach an array of strings from shared memory? C

    - by Tim
    I have: int array_id; char* records[10]; // get the shared segment if ((array_id = shmget(IPC_PRIVATE, 1, 0666)) == -1) { perror("Array Creating"); } // attach records[0] = (char*) shmat(array_id, (void*)0, 0); if ((int) *records == -1) { perror("Array Attachment"); } which works fine, but when i try and detach i get an "invalid argument" error. // detach int error; if( (error = shmdt((void*) records[0])) == -1) { perror(array detachment); } any ideas? thank you

    Read the article

  • attach / detach mssql 2008 sql server manager [SOLVED]

    - by Tillebeck
    An external consult wrote a guide on how to copy a database. Step two was detach the database using Sql Server Manager. After the detach the database was not visible in the SQL Server Manager... Not much to do but write a mail to the service provider asking to have the database attached again. The service porviders answer: Not posisble to attach again since the SQL Server security has been violated". Rolling back to last backup is not the option I want to use. Can any one give feedback if this seems logic and reasonable to assume that a detached database in a SQL Server 2008 accessed through SQL Server Manager cannot be reattached. It was done by rightclicking the database and choosing detach. -- update -- Based on the comments below I update the question with the server setup. There are two dedicated servers: srv1: Web server with remote desktop and an Sql Server Manager srv2: Sql server that can be accessed through the Sql Server Manager on the web server -- update2 -- After a restart of the server the DBA could suddenly do the attachment of the database. And I guess that after the restart it was a simple task. So all of your answer were rigth! It seems that I can only mark one as a correct answer so I marked the first answer correct. But all are correct answer. Thanks a lot. Without posting the link to this thread then we might had so suffer while watching our database beeing restored by a backup :-) Thanks a lot. BR. Anders

    Read the article

  • Scripting a database copy from MS Sql 2005 to 2008 without detach/backup/RDP

    - by James Santiago
    My goal is to move a single SQL 2005 database to a seperate 2008 server. The issue is my level of access to both servers. On each I can only access the database and nothing else. I cant create a backup file or detach the database because I don't have access to the file system or to create a proxy. I've tried using the generate script function of sql 2005 management studio express to restore the schema but receive command not supported errors when attempting to execute the sql on the new database. Similarly I tried using EMS SQL Manager 2005 Lite to script a backup of the schema and data but ran into similar problems. How do I go about acomplishing this? I can't seem to find any solutions outside of using the detach and backup functions.

    Read the article

  • How to cache L2E entity without attach/detach?

    - by Eran Betzalel
    The following code will select a key/value table in the DB and will save the result to the cache: using (var db = new TestEntities()) { if(Cache["locName_" + inventoryLocationName] != null) return Cache["locName_" + inventoryLocationName]; var location = db.InventoryLocationsSet.FirstOrDefault( i => i.InventoryLocationName.Equals( inventoryLocationName, StringComparison.CurrentCultureIgnoreCase)); db.Detach(location); // ???? Cache["locName_" + inventoryLocationName] = location; return location; } But it doesn't work well when I'm trying to use the cached object. Of course, the problem is the different ObjectContext, so I use Attach/Detach and then the problem solves but with a codding horror price: db.Attach(locationFromCache); // ???? try { // Use location as foreign key db.SaveChanges(); } finally { db.Detach(locationFromCache); // ???? } So, how can I use cached objects without using attach/detach methods? What happens if more than one user will have to use this cached object? Should I put the whole thing in a CriticalSection?!

    Read the article

  • Detach a filter driver from certain drivers?

    - by Protector one
    The driver for my laptop's keyboard has a kernel-mode filter driver from Synaptics (SynTP.sys) attached. Is it possible to detach the SynTP.sys filter driver from my keyboard's driver, without detaching it from my Touchpad's driver? This Microsoft Support page explains how to completely disable a filter driver, but my touchpad requires SynTP.sys as well. I'm trying to do this is because the Synaptics driver disables my touchpad when I type. (Explained fully in this question: Use touchpad while "typing"?.) Since I don't have a solution to that problem, I figured removing the filter driver from the keyboard could prevent the Synaptics driver from detecting key strokes, thus stopping it from disabling the touchpad.

    Read the article

  • Detach Disk from deleted virtual machine

    - by user1628043
    I had an Virtual Machine running in Azure for a couple of weeks and suddenly it stopped responding. I shut it down and tried to restart it but that failed saying the VM faulted. I then deleted the VM which leaves the VHD file intact on my storage account. I was intending to try recreating a new VM using thie VHD from the first VM however, the OS disk and Data disk are both still marked as being attached to the original VM which no longer exists. Is there any way to detach these disks so I can use them to create a new VM?

    Read the article

  • Detach many subdirectories into a new, separate Git repository

    - by prisonerjohn
    This question is based on http://stackoverflow.com/questions/359424/detach-subdirectory-into-separate-git-repository Instead of detaching a single subdirectory, I want to detach a couple. For example, my current directory tree looks like this: /apps /AAA /BBB /CCC /libs /XXX /YYY /ZZZ And I would like this instead: /apps /AAA /libs /XXX The --subdirectory-filter argument to git filter-branch won't work because it gets rid of everything except for the given directory the first time it's run. I thought using the --index-filter argument for all unwanted files would work (albeit tedious), but if I try running it more than once, I get the following message: Cannot create a new backup. A previous backup already exists in refs/original/ Force overwriting the backup with -f Any ideas? TIA

    Read the article

  • Laptop freezes on Wireless Mouse Adapter attach/detach

    - by Sergiy Byelozyorov
    I am using Microsoft Wireless Notebook Optical Mouse 3000 with Toshiba Satellite Pro P300-1CG. Recently I have installed Windows 7 64-bit. Now once in a while when I plug-in or plug-out wireless mouse adapter, the computer freezes (image stays on the screen, but the computer is not responsive). I have noticed that it mostly happens after I recover my computer from sleep mode. To continue using laptop I have to shut it down by pressing and holding power button for 7 seconds and then booting it up again. What can be done to prevent this?

    Read the article

  • How to run a process and completely detach it of its parent shell

    - by Bicou
    I'm running a program on a linux server that will take days to complete. I'm launching it from my workstation from an SSH terminal, as this program is command-line only. I want to be able to do all of these : launch that program, redirect standard outputs to files, exit my SSH session without making this terminate the process. I thought about $ ./MyProg.csh -params -foo -bar </dev/null 1>~/out.log 2>~/err.log & However, the process is terminated the moment I close my SSH session. My workstation is running Windows XP, and I cannot guarantee its uptime over several days, which is required for the processing of my data on the Linux server. As you may have noted, my program requires to be launched from CSH. Is it possible to do this ? Thanks.

    Read the article

  • Copy 2 databases without detach in SQL 2005

    - by molgan
    Hello I have a server with live databases, and I have a test-server where I sometimes restore databases from the live one, to get fresh data. But this way I have to set up all the users again, I have about 4 different users with different permissions that need set again. Is there some way to do this a better way without using detach and attach, since I cant take the databases offline on the live-server? Prefered some thing I could run that "re-fills" the tables with fresh data. No need to redo stored procedures and rights. /M

    Read the article

  • Detach subdirectory into separate Git repository

    - by matli
    I have a Git repository which contains a number of subdirectories. Now I have found that one of the subdirectories is unrelated to the other and should be detached to a separate repository. How can I do this while keeping the history of the files within the subdirectory? I guess I could make a clone and remove the unwanted parts of each clone, but I suppose this would give me the complete tree when checking out an older revision etc. This might be acceptable, but I would prefer to be able to pretend that the two repositories doesn't have a shared history. Just to make it clear, I have the following structure: XYZ/ .git/ XY1/ ABC/ XY2/ But I would like this instead: XYZ/ .git/ XY1/ XY2/ ABC/ .git/

    Read the article

  • RoR Server won't detach with -d option

    - by Rodrigo
    I had to reinstall a bunch of my port installs the other day and now when I launch my RoR server with "ruby script/server -d -p 3000" the server wont work. I am not seeing any errors in the logs. If I start it with "ruby script/server -p 3000" it works fine. Any ideas of what I might have uninstalled that would cause this behavior?

    Read the article

  • Flash "Play" button doesn't play video unless you hit rewind or fast forward

    - by Jack Marchetti
    So I had an IE issue with flash videos continuing to play even when their DIV's display property was set to none ( $('flashdiv').hide(); ) So I was able to solve this problem, by using .detach() and then reinserting the div. This worked great, however the problem now is that the "play" button doesn't work. However, if I hit rewind, or fast forward, it plays, and the play/stop button work fine. The way I'm reinserting the divs is like this: var divid = $('#flashdiv').clone('true'); and then to reinsert: $('#test').html(divid); Any idea why the play button would not work?

    Read the article

  • why jquery detach element will cause a form to submit?

    - by jiewmeng
    i wonder why in the following example, trying to detach an element (li) causes the form containing it to submit html <form id="frmToDo" name="frmToDo"> <p id="lineInput"> ... <input type="submit" id="btnSubmit" value="Add" /> </p> <ul id="todolist"> <!-- added in ajax --> </ul> </form> JS $("#frmToDo").submit(function() { // this runs after: $("#todolist").detach(...) }); $("#todolist").delegate("li[id^=task-] button", "click", function() { $("#todolist").detach($($(this).parent()).id()); return false; });

    Read the article

  • Integration Widget (GWT) with DynamicForm (Smartgwt) - com.google.gwt.user.client.ui.AttachDetachExc

    - by keweishang
    I had this problem when I created a Window (Smartgwt) and put a DynamicForm (Smartgwt) in this Window, In this DynamicForm, I have a CanvasItem (Smartgwt) in which I put a RichTextArea (GWT). And when I press "ESC", I can quit the Window (Smartgwt) without probleme. But when I press "F5" to refresh my application, the browser pops up a exception saying "com.google.gwt.user.client.ui.AttachDetachException". To solve this problem, I do the following: public class MailWindow extends Window { public MailWindow(){ this.addCloseClickHandler(new CloseClickHandler() { public void onCloseClick(CloseClientEvent event) { form.getRichTextArea().removeFromParent(); MailWindow.this.destroy(); } }); } } Which solved my problem! :) Kewei

    Read the article

  • How to stop debugging (or detach process) without stopping the process?

    - by Valentein
    I often use VS 2008 to debug a .NET C# component of an application. Sometimes, I want to quit debugging and continue running the application. Stop Debugging kills the process I was debugging. How can I achieve my aim? This is not a web app, it's a local process that runs managed and unmanaged code. I don't see any "Detach" or "Detach All" option in the Debug menu (is it enabled in some option?).

    Read the article

  • Word automation - SaveAs

    - by nXqd
    I try to write a simple MFC - Word Automation to save for every 1 minute. I follow this article : http://www.codeproject.com/KB/office/MSOfficeAuto.aspx And this is what Im trying to implement , I'm new to COM so I think there's problem here: my VBA is generated by Word 2010: ActiveDocument.SaveAs2 FileName:="1.docx", FileFormat:=wdFormatXMLDocument _ , LockComments:=False, Password:="", AddToRecentFiles:=True, _ WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _ SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _ False, CompatibilityMode:=14 And my code to implement VBA code above : { COleVariant varName(L"b.docx"); COleVariant varFormat(L"wdFormatXMLDocument"); COleVariant varLockCmt((BYTE)0); COleVariant varPass(L""); COleVariant varReadOnly((BYTE)0); COleVariant varEmbedFont((BYTE)0); COleVariant varSaveNativePicFormat((BYTE)0); COleVariant varForms((BYTE)0); COleVariant varAOCE((BYTE)0); VARIANT x; x.vt = VT_I4; x.lVal = 14; COleVariant varCompability(&x);; VARIANT result; VariantInit(&result); _hr=OLEMethod( DISPATCH_METHOD, &result, pDocApp, L"SaveAs2",10, varName.Detach(),varFormat.Detach(),varLockCmt.Detach(),varPass.Detach(),varReadOnly.Detach(), varEmbedFont.Detach(),varSaveNativePicFormat.Detach(),varForms.Detach(),varAOCE.Detach(),varCompability.Detach() ); } I get no error from this one, but it doesn't work.

    Read the article

  • Detach current session and attach to another session, done with one script, can I?

    - by Jimm Chen
    After reading the vague official doc of GNU screen( http://www.gnu.org/software/screen/manual/screen.html ) and asking quite some questions at this site. I still cannot figure out how to accomplish such a task with a shell script. This task costs some words to describe. Assume I'm using PuTTY to telnet into my Linux server. ?STEP 1? Launch 2 telnet connections . From putty window 1 (PTWIN1),telnet into Linux Bash shell, execute screen -RR to launch a screen session, and get session name 21385.pts-4.linux-ic37 . From putty window 2 (PTWIN2), do that same as in PTWIN1, but this time, I get session name 22041.pts-9.linux-ic37 . Now, we have two screen sessions running simultaneously. We can check this: $ screen -ls There are screens on: 22041.pts-9.linux-ic37 (Attached) 21385.pts-4.linux-ic37 (Attached) 2 Sockets in /var/run/uscreens/S-chj2. ?STEP 2? Assume that for some reason, PTWIN1's TCP connection is lost abnormally(but server doesn't know that), and an urgent work is pending on session 21385 and I want to quickly regain control of it. Fortunately, we know the 21385 session is still there, so, I want to have PTWIN2 attach to session 21385. Because I hate to remember the esoteric screen option all the time, so I decide to write a script called sttach. I hope that sttach 21385.pts-4.linux-ic37 can let me attach to session 21385(for PTWIN2). Now, let's say sttach works well and I take control of 21385 on PTWIN2. ?STEP 3? Some minutes later. I want to go back to work on session 22041. Here, please allow me to have PTWIN2 remain associated with session 21385. What I would like to do is to launch another putty window (PTWIN3), telnet into server, and execute sttach 22041.pts-9.linux-ic37 in hope that I can resume session 22041 on PTWIN3 . You can see the benefit of sttach: as long as I know the target session name, I can call it to have my PuTTY window switch to that session, regardless whether the target session is "(Attached)" or "(Detached)", and regardless whether the running context is inside a screen session or not. Now the question: How to write the (Bash) script sttach? I mean, run screen with appropriate options in sttach to accomplish the goal. Waiting for your kind answer. Thank you. My previous questions regarding GNU screen: GNU screen, how to get current sessionname programmatically Is it possible to change GNU screen session name after created? How do I know I'm running inside a linux "screen" or not? My env: openSUSE Linux 11.3, GNU screen 4.00.03 (FAU) 23-Oct-06

    Read the article

  • How to detach a sql server 2008 database that is not in database list?

    - by Amir
    I installed SQL Server 2008 on Windows 7. Then I created a database. After 2 days I reinstalled Windows and SQL Server. Now I am trying to attach my database file, but I have encountered the error below. I think that the files are like an attached file and I can't attach them. What is difference between an attached file and a non-attached file? How can I attach this file? Please Help Me. Error Text: TITLE: Microsoft SQL Server Management Studio Attach database failed for Server 'AMIR-PC'. (Microsoft.SqlServer.Smo) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600.1+((KJ_RTM).100402-1540+)&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.ConnectionInfo) Unable to open the physical file "F:\Company.mdf". Operating system error 5: "5(Access is denied.)". (Microsoft SQL Server, Error: 5120) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600&EvtSrc=MSSQLServer&EvtID=5120&LinkId=20476

    Read the article

  • How do I detach a local SVN working copy?

    - by Simon A. Eugster
    I cannot just rm -rf $(find . -name '.svn'), because I've got some directories in my working copy which are unversioned (on svn:ignore) and at the same time working copies of other svn repositories. my-repo |+ directory ||- .svn (to delete) ||- files... |+ another_directory ||- .svn (to delete) ||- files... |+ directory_ignored (svn:ignore) ||- .svn (different working copy) ||- more files ... So I'd like to just tell subversion to remove all .svn directories belonging to this working copy only. Is this possible? The directory structure is quite complex, so doing it manually would really suck.

    Read the article

  • Detaching EBS Volumes (in LVM) take a lot of time

    - by Cheezo
    I have an EC2 Instance(EBS Backed-root partition) with EBS volumes configured via LVM. I have formatted it as ext4 and can mount it to store data etc. Now i want take a snapshot of the root partition, hence in that case i go and detach the other non-root EBS volumes (configured in LVM). Here a regular detach does not work, and i have "force" detach almost always. Although, i another similar setup with RAID instead of LVM and there after stopping RAID, i can easily detach. The whole setup is running Ubuntu Maverick 10.10 Please assist me in the same.

    Read the article

  • Managing persistent data on an Amazon EC2 web server

    - by Derek
    I've just started trying out Amazon's EC2 service for running an asp.net web app which uses a SQL Server 2005 Express database. I have some questions about how to configure and operate it best for reliability, and I'm hoping to tap into some collective wisdom here as this is my first foray into EC2. Here's how I have it configured currently: OS: Windows 2003 SQL Server Express 2005 Web content stored on an EBS Volume (E Drive) Database Data stored on an EBS Volume (E Drive) Database backups to "C Drive" and then copied off to S3. Elastic IP Address attached to the production instance. Now when I make a change to the OS configuration, I make a new AMI using the bundle feature. Unfortunately, I found that this results in significant downtime. While the bundle is created and the new instance is started. It seems that when I'm ready to make a new AMI, I should: Start up a new temporary instance. Detach the EBS volume from the production instance. Detach the IP Address from the production instance. Attach the IP Address to the temporary instance. Attach the EBS volume to the temporary instance. Create an AMI from the production instance. After the production instance restarts, reverse the attach/detach steps to put it back in production. Is this the right order of events to prevent any chance to corrupt the EBS volume? Will the EBS volume become corrupt if I detach it while a database Write is taking place? Should I snapshot the EBS volume of the production instance and attach it to the temporary instance instead? Or could taking a snapshot of the EBS volume while it's in use cause corruption? Any suggestions to improve the reliability and operations?

    Read the article

1 2 3 4 5 6 7 8 9 10  | Next Page >