Search Results

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

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

  • Move SQL Server transaction log to another disk

    - by Jim Lahman
    When restoring a database backup, by default, SQL Server places the database files in the master database file directory.  In this example, that location is in L:\MSSQL10.CHTL\MSSQL\DATA as shown by the issuance of sp_helpfile   Hence, the restored files for the database CHTL_L2_DB are in the same directory     Per SQL Server best practices, the log file should be on its own disk drive so that the database and log file can operate in a sequential manner and perform optimally. The steps to move the log file is as follows: Record the location of the database files and the transaction log files Note the future destination of the transaction log file Get exclusive access to the database Detach from the database Move the log file to the new location Attach to the database Verify new location of transaction log Record the location of the database file To view the current location of the database files, use the system stored procedure, sp_helpfile 1: use chtl_l2_db 2: go 3:   4: sp_helpfile 5: go   Note the future destination of the transaction log file The future destination of the transaction log file will be located in K:\MSSQLLog   Get exclusive access to the database To get exclusive access to the database, alter the database access to single_user.  If users are still connected to the database, remove them by using with rollback immediate option.  Note:  If you had a pane connected to the database when the it is placed into single_user mode, then you will be presented with a reconnection dialog box. 1: alter database chtl_l2_db 2: set single_user with rollback immediate 3: go Detach from the database   Now detach from the database so that we can use windows explorer to move the transaction log file 1: use master 2: go 3:   4: sp_detach_db 'chtl_l2_db' 5: go   After copying the transaction log file re-attach to the database 1: use master 2: go 3:   4: sp_attach_db 'chtl_l2_db', 5: 'L:\MSSQL10.CHTL\MSSQL\DATA\CHTL_L2_DB.MDF', 6: 'K:\MSSQLLog\CHTL_L2_DB_4.LDF', 7: 'L:\MSSQL10.CHTL\MSSQL\DATA\CHTL_L2_DB_1.NDF', 8: 'L:\MSSQL10.CHTL\MSSQL\DATA\CHTL_L2_DB_2.NDF', 9: 'L:\MSSQL10.CHTL\MSSQL\DATA\CHTL_L2_DB_3.NDF' 10: GO

    Read the article

  • Show me your Linq to SQL architectures!

    - by Brad Heller
    I've been using Linq to SQL for a new implementation that I've been working on. I have about 5000 lines of code and am a little ways from a solid demo. I've been pretty satisfied with Linq to SQL so far -- the tools are excellent and pretty painless and it allows you to get a DAL up and running quickly. That said, there are some major draw backs that I just keep hitting over and over again. Namely how to handle separation of concerns between my DAL and my business layer and juggling that with different data contexts. Here is the architecture I've been using: My repositories do all my data access and they return Linq to SQL objects. Each of my Linq to SQL objects implements an IDetachable interface. A typical implementation looks like this: partial class PaymentDetail : IDetachable { #region IDetachable Members public bool IsAttached { get { return PropertyChanging != null; } } public void Detach() { if (IsAttached) { PropertyChanged = null; PropertyChanging = null; Transaction.Detach(); } } #endregion } Every time I do a DAL operation in my repository I "detach" when I'm done with the object (and it should theoretically detach from any child objects) to remove the DataContext's context. Like I said, this works pretty well, but there are some edge cases that seem to be a big pain in the ass. For instance, my Transaction object has many PaymentDetails. Even when there are no PaymentDetails in that collection it's still attached to the DataContext's context! Thus, if I try to update (I update by Attach()ing to the object and then SubmitChanges()) I get that dreaded "An attempt has been made to Attach or Add an entity that is not new, perhaps having been loaded from another DataContext. This is not supported." message. Anyway, I'm starting to doubt that this technology was a good gamble. Has anyone got a decent architecture that they're willing to share? I'd really love to use this technology but I feel like I spend 1/3 of my time just debugging is retarded quirks!

    Read the article

  • When and why would Windows Explorer lock an external hard disk?

    - by Ngu Soon Hui
    I am quite surprised to see that Windows Explorer is locking my external hard disk. Is there any reason why explorer.exe is holding on to my external hard disk? Before I was trying to detach the external hard disk, I was opening a csproj file using Visual Studio 2008. I made sure that I closed down Visual Studio before trying to detach the external hard disk. There was no other active program except Google Chrome, from what I could see, that was running.

    Read the article

  • EF 4.1 Code First Detaching Entity

    - by Nazaf
    I am trying to add an entity to the DB. Once I have added it, I want to detach it, so I can manipulate the object safely without making any changes to the DB. After calling context.SaveChanges() I do the following to detach the entity: // save context.Stories.Add(story); // attach tags. They already exists in the database foreach(var tag in story.Tags) context.Entry(tag).State = System.Data.EntityState.Unchanged; context.SaveChanges(); context.Entry(story).State = System.Data.EntityState.Detached; However, changing the entity state to DETACHED will remove all related entities associated with the my entity. Is there a way to stop this ? If I don't detach the entity, all my changes are sent to the DB next time I call context.SaveChanges() Thanks!!

    Read the article

  • c# event and delegate question

    - by user359562
    I want to detach the custom event but could not detach. Please find below I am using -= to detach the event. I assume after this, TextChanged2 method should not be invoked as I have unregistered the event. Let me know if my understanding is wrong. public delegate void TextChangedEventHandler1(object sender, TextBoxargs ta); public event TextChangedEventHandler1 TextChanged1; private void textBox1_TextChanged(object sender, EventArgs e) { this.TextChanged1 -= new TextChangedEventHandler1(TextChanged2); TextChanged2(sender, e); } public void TextChanged2(object sender, EventArgs e) { textBox1.Text = textBox1.Text.ToUpper(); }

    Read the article

  • Specific issue on data pump API in oracle

    - by Median Hilal
    I have a client/server architecture. Using an Oracle dbms on the database server side. I need to perform a user-triggered (from client side) backup of the database, where the best way to perform that is using a stored procedure on the server side which the client may call, as the client has no oracle tools to perform the backup. I've searched thorough inside available solutions and have found that using a stored procedure is the best way. Well, then I found that using oracle data pump API is the best way to use inside a PL/SQl stored procedure. My specific questions about the API are... I would like to ask about two issues ... ---- The first ----- the detach function to detach the handler, is it necessary to be used at the end of the procedure? and what if I don't use it? I read the Oracle documentation but I didn't get their point, they say it doesn't terminate the job but indicates that the user is not interested in it, an when I use detach at the end of my procedure the exported .dmp file disappears. ---- The second ----- to perform a user (client side) triggered back up as the modification are only to the data, I used TABLE parameter for the export operation. But the version parameter... what should it be? I also read the documentation but couldn't determine what I need (LATEST or COMPATIBLE) ? Thanks

    Read the article

  • Duplicate a collection of entities and persist in Hibernate/JPA

    - by Michael Bavin
    Hi, I want to duplicate a collection of entities in my database. I retreive the collection with: CategoryHistory chNew = new CategoryHistory(); CategoryHistory chLast = (CategoryHistory)em.createQuery("SELECT ch from CategoryHistory ch WHERE ch.date = MAX(date)").getSingleResult; List<Category> categories = chLast.getCategories(); chNew.addCategories(categories)// Should be a copy of the categories: OneToMany Now i want to duplicate a list of 'categories' and persist it with EntityManager. I'm using JPA/Hibernate. UPDATE After knowing how to detach my entities, i need to know what to detach: current code: CategoryHistory chLast = (CategoryHistory)em.createQuery("SELECT ch from CategoryHistory ch WHERE ch.date=(SELECT MAX(date) from CategoryHistory)").getSingleResult(); Set<Category> categories =chLast.getCategories(); //detach org.hibernate.Session session = ((org.hibernate.ejb.EntityManagerImpl) em.getDelegate()).getSession(); session.evict(chLast);//detaches also its child-entities? //set the realations chNew.setCategories(categories); for (Category category : categories) { category.setCategoryHistory(chNew); } //set now create date chNew.setDate(Calendar.getInstance().getTime()); //persist em.persist(chNew); This throws a failed to lazily initialize a collection of role: entities.CategoryHistory.categories, no session or session was closed exception. I think he wants to lazy load the categories again, as i have them detached. What should i do now?

    Read the article

  • perl threading problem

    - by Alice Wozownik
    I'm writing a multithreaded website uptime checker in perl, and here is the basic code so far (includes only threading part): !/usr/bin/perl use LWP::UserAgent; use Getopt::Std; use threads; use threads::shared; my $maxthreads :shared = 50; my $threads :shared = 0; print "Website Uptime Checker\n"; my $infilename = $ARGV[0]; chomp($infilename); open(INFILE, $infilename); my $outfilename = $ARGV[1]; chomp($outfilename); open(OUTFILE, "" . $outfilename); OUTFILE-autoflush(1); while ($site = ) { chomp($site); while (1) { if ($threads < $maxthreads) { $threads++; my $thr = threads-create(\&check_site, $site); $thr-detach(); last; } else { sleep(1); } } } while ($threads 0) { sleep(1); } sub check_site { $server = $_[0]; print "$server\n"; $threads--; } It gives an error after a while: Can't call method "detach" on an undefined value at C:\perl\webchecker.pl line 28, line 245. What causes this error? I know it is at detach, but what am I doing wrong in my code? Windows shows lots of free memory, so it should not be the computer running out of memory, this error occurs even if I set $maxthreads as low as 10 or possibly even lower.

    Read the article

  • Weak event handler model for use with lambdas

    - by Benjol
    OK, so this is more of an answer than a question, but after asking this question, and pulling together the various bits from Dustin Campbell, Egor, and also one last tip from the 'IObservable/Rx/Reactive framework', I think I've worked out a workable solution for this particular problem. It may be completely superseded by IObservable/Rx/Reactive framework, but only experience will show that. I've deliberately created a new question, to give me space to explain how I got to this solution, as it may not be immediately obvious. There are many related questions, most telling you you can't use inline lambdas if you want to be able to detach them later: Weak events in .Net? Unhooking events with lambdas in C# Can using lambdas as event handlers cause a memory leak? How to unsubscribe from an event which uses a lambda expression? Unsubscribe anonymous method in C# And it is true that if YOU want to be able to detach them later, you need to keep a reference to your lambda. However, if you just want the event handler to detach itself when your subscriber falls out of scope, this answer is for you.

    Read the article

  • NDK app onDestroy cleanup - how to DetachCurrentThread

    - by Aristarhys
    So if we attach we must detach thread after after it finish, right? JNIEnv* get_jni_env() { JNIEnv* res; JAVA_VM->GetEnv((void**) &res, JNI_VERSION_1_6);//Using cached JavaVM JAVA_VM->AttachCurrentThread(&res, NULL); return res; } I call next native method from @Override protected void onDestroy() of my Activity class void free_jni_manager() { JNIEnv* env = get_jni_env(); ... //Here i delete global refs (jclass) //JAVA_VM->DetachCurrentThread(); } ERROR: detaching thread with interp frames (count=16) - main thread still running and we try to detach it. Even if we take any function that use JNIEnv (for example calling java methods), putting DetachCurrentThread will cause same error. DetachCurrentThread works flawlessly if used in pthread function static void* thread_func(void* arg) { get_jni_env(); // attach new thread //Do thread stuff JAVA_VM->DetachCurrentThread();//thread done detached it with ok return NULL; } Do we need detach main thread then we done with JNI, there do it? Or then activity will be destroyed, it will freed itself with JavaVM? Do we need do call DestroyJavaVM() (just doing crash if use onDestroy), how free cached JavaVM or garbage cleaner will handle this? P.S. What benefits of using AttachCurrentThreadAsDaemon()

    Read the article

  • C++ -- Why should we use operator -> to access member functions of a SmartPtr?

    - by q0987
    Hello all, The question is given in the last two lines of code. template<class T> // template class for smart class SmartPtr { // pointers-to-T objects public: SmartPtr(T* realPtr = 0); T* operator->() const; T& operator*() const; T* Detach( void ) { T* pData = pointee; pointee = NULL; return pData; } private: T *pointee; ... }; class TestClass {} SmartPtr<TestClass> sPtr(new TestClass); TestClass* ptrA = sPtr->Detach(); // why I always see people use this method to access member functions of a Smart pointer. We can use sPtr-> b/c we have defined operator->() in SmartPtr. TestClass* ptrB = sPtr.Detach(); // Question: Is this a valid C++ way? If not, why? Thank you

    Read the article

  • GNU screen - Unable to reattach to screen after lost connection

    - by subhashish
    I was using irssi in screen but lost connection. After I ssh'd back in to the server, I can no longer attach to that screen. screen -ls shows that the screen is already attached. I tried screen -D to force detach it, and it said detach but screen -ls still says it's attached. I tried screen -x and it just hangs there. [sub@server ~]$ screen -ls There are screens on: 4033.poe (Detached) 7728.irssi (Attached) 2 Sockets in /var/run/screen/S-sub. What can I do now?

    Read the article

  • After logging out of SSH, screen sessions disappear on Arch Linux

    - by Ivan
    On Arch Linux (I'm on a single dedicated server, where my domain name points to only one IP), when I SSH into a user (say, for example, user mc), and then do screen -S test (or -dmS, the resulting issue is the same), run a command, and then detach from it, then exit out of my SSH session, and log back in, the screen session disappears. screen -ls returns No Sockets found in /run/screens/S-mc. The only way I can reattach to my sessions is if I never logged out of my SSH. How do I fix this? I do have read/write access in /run/screens/S-mc I detach from screen sessions with Ctrl-A,D disown -a && exit gives me the same problem shopt huponexit returns "huponexit off" There is no ~/.logout, and ~/.bash_logout is empty, with 3 lines of comments, telling me it's the ~/.bash_logout file ls -l /usr/bin | grep screen returns lrwxrwxrwx 1 root root 12 Oct 31 2012 screen -> screen-4.0.3 -rwsr-xr-x 1 root root 363672 Oct 31 2012 screen-4.0.3

    Read the article

  • Dell M4600 with nVidia Quadro 2000M hangs on boot when external monitor is connected

    - by vladeta
    I have a problem with my fresh installed Ubuntu 12.04 LTS on my Dell M4600: nVidia quadro 2000M i7-2860 16GB ram 128GB SSD Dell/Samsung 750GB HDD IPS RGB laptop display When it is connected via DP++ to the external Dell U2311H monitor, it hangs on boot or when wakening from suspend. If I detach the DP cable it boots normally. I have tried all combinations that I have found, as adding to grub: "no splash", "boot=pci", "acpi=off", etc... I have also changed in nVidia X settings that external monitor is the primary one and also tried to delete monitor.xml file. There is no change it hangs each time after grub. It starts to load daemons then both screens are blank and then completely hangs with beep sound. What I discovered is if I detach the cable and wait for about 2 sec after grub starts booting and then physically connect DP cable while the Ubuntu is still booting everything works normally and I have a picture on my external screen while the laptop screen is off, just as I wanted. Do you maybe know how to solve this issue? Thank You.

    Read the article

  • ubuntu 12.04 LTS hangs on boot when external monitor is connected

    - by vladeta
    I have a problem with my fresh installed Ubuntu 12.04 LTS on my Dell M4600: nVidia quadro 2000M i7-2860 16GB ram 128GB SSD Dell/Samsung 750GB HDD IPS RGB laptop display When it is connected via DP++ to the external Dell U2311H monitor, it hangs on boot or when wakening from suspend. If I detach the DP cable it boots normally. I have tried all combinations that I have found, as adding to grub: "no splash", "boot=pci", "acpi=off", etc... I have also changed in nVidia X settings that external monitor is the primary one and also tried to delete monitor.xml file. There is no change it hangs each time after grub. It starts to load daemons then both screens are blank and then completely hangs with beep sound. What I discovered is if I detach the cable and wait for about 2 sec after grub starts booting and then physically connect DP cable while the Ubuntu is still booting everything works normally and I have a picture on my external screen while the laptop screen is off, just as I wanted. Do you maybe know how to solve this issue? Thank You.

    Read the article

  • Oracle Solaris: Zones on Shared Storage

    - by Jeff Victor
    Oracle Solaris 11.1 has several new features. At oracle.com you can find a detailed list. One of the significant new features, and the most significant new feature releated to Oracle Solaris Zones, is casually called "Zones on Shared Storage" or simply ZOSS (rhymes with "moss"). ZOSS offers much more flexibility because you can store Solaris Zones on shared storage (surprise!) so that you can perform quick and easy migration of a zone from one system to another. This blog entry describes and demonstrates the use of ZOSS. ZOSS provides complete support for a Solaris Zone that is stored on "shared storage." In this case, "shared storage" refers to fiber channel (FC) or iSCSI devices, although there is one lone exception that I will demonstrate soon. The primary intent is to enable you to store a zone on FC or iSCSI storage so that it can be migrated from one host computer to another much more easily and safely than in the past. With this blog entry, I wanted to make it easy for you to try this yourself. I couldn't assume that you have a SAN available - which is a good thing, because neither do I! What could I use, instead? [There he goes, foreshadowing again... -Ed.] Developing this entry reinforced the lesson that the solution to every lab problem is VirtualBox. Oracle VM VirtualBox (its formal name) helps here in a couple of important ways. It offers the ability to easily install multiple copies of Solaris as guests on top of any popular system (Microsoft Windows, MacOS, Solaris, Oracle Linux (and other Linuxes) etc.). It also offers the ability to create a separate virtual disk drive (VDI) that appears as a local hard disk to a guest. This virtual disk can be moved very easily from one guest to another. In other words, you can follow the steps below on a laptop or larger x86 system. Please note that the ability to use ZOSS to store a zone on a local disk is very useful for a lab environment, but not so useful for production. I do not suggest regularly moving disk drives among computers. In the method I describe below, that virtual hard disk will contain the zone that will be migrated among the (virtual) hosts. In production, you would use FC or iSCSI LUNs instead. The zonecfg(1M) man page details the syntax for each of the three types of devices. Why Migrate? Why is the migration of virtual servers important? Some of the most common reasons are: Moving a workload to a different computer so that the original computer can be turned off for extensive maintenance. Moving a workload to a larger system because the workload has outgrown its original system. If the workload runs in an environment (such as a Solaris Zone) that is stored on shared storage, you can restore the service of the workload on an alternate computer if the original computer has failed and will not reboot. You can simplify lifecycle management of a workload by developing it on a laptop, migrating it to a test platform when it's ready, and finally moving it to a production system. Concepts For ZOSS, the important new concept is named "rootzpool". You can read about it in the zonecfg(1M) man page, but here's the short version: it's the backing store (hard disk(s), or LUN(s)) that will be used to make a ZFS zpool - the zpool that will hold the zone. This zpool: contains the zone's Solaris content, i.e. the root file system does not contain any content not related to the zone can only be mounted by one Solaris instance at a time Method Overview Here is a brief list of the steps to create a zone on shared storage and migrate it. The next section shows the commands and output. You will need a host system with an x86 CPU (hopefully at least a couple of CPU cores), at least 2GB of RAM, and at least 25GB of free disk space. (The steps below will not actually use 25GB of disk space, but I don't want to lead you down a path that ends in a big sign that says "Your HDD is full. Good luck!") Configure the zone on both systems, specifying the rootzpool that both will use. The best way is to configure it on one system and then copy the output of "zonecfg export" to the other system to be used as input to zonecfg. This method reduces the chances of pilot error. (It is not necessary to configure the zone on both systems before creating it. You can configure this zone in multiple places, whenever you want, and migrate it to one of those places at any time - as long as those systems all have access to the shared storage.) Install the zone on one system, onto shared storage. Boot the zone. Provide system configuration information to the zone. (In the Real World(tm) you will usually automate this step.) Shutdown the zone. Detach the zone from the original system. Attach the zone to its new "home" system. Boot the zone. The zone can be used normally, and even migrated back, or to a different system. Details The rest of this shows the commands and output. The two hostnames are "sysA" and "sysB". Note that each Solaris guest might use a different device name for the VDI that they share. I used the device names shown below, but you must discover the device name(s) after booting each guest. In a production environment you would also discover the device name first and then configure the zone with that name. Fortunately, you can use the command "zpool import" or "format" to discover the device on the "new" host for the zone. The first steps create the VirtualBox guests and the shared disk drive. I describe the steps here without demonstrating them. Download VirtualBox and install it using a method normal for your host OS. You can read the complete instructions. Create two VirtualBox guests, each to run Solaris 11.1. Each will use its own VDI as its root disk. Install Solaris 11.1 in each guest.Install Solaris 11.1 in each guest. To install a Solaris 11.1 guest, you can either download a pre-built VirtualBox guest, and import it, or install Solaris 11.1 from the "text install" media. If you use the latter method, after booting you will not see a windowing system. To install the GUI and other important things, login and run "pkg install solaris-desktop" and take a break while it installs those important things. Life is usually easier if you install the VirtualBox Guest Additions because then you can copy and paste between the host and guests, etc. You can find the guest additions in the folder matching the version of VirtualBox you are using. You can also read the instructions for installing the guest additions. To create the zone's shared VDI in VirtualBox, you can open the storage configuration for one of the two guests, select the SATA controller, and click on the "Add Hard Disk" icon nearby. Choose "Create New Disk" and specify an appropriate path name for the file that will contain the VDI. The shared VDI must be at least 1.5 GB. Note that the guest must be stopped to do this. Add that VDI to the other guest - using its Storage configuration - so that each can access it while running. The steps start out the same, except that you choose "Choose Existing Disk" instead of "Create New Disk." Because the disk is configured on both of them, VirtualBox prevents you from running both guests at the same time. Identify device names of that VDI, in each of the guests. Solaris chooses the name based on existing devices. The names may be the same, or may be different from each other. This step is shown below as "Step 1." Assumptions In the example shown below, I make these assumptions. The guest that will own the zone at the beginning is named sysA. The guest that will own the zone after the first migration is named sysB. On sysA, the shared disk is named /dev/dsk/c7t2d0 On sysB, the shared disk is named /dev/dsk/c7t3d0 (Finally!) The Steps Step 1) Determine the name of the disk that will move back and forth between the systems. root@sysA:~# format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c7t0d0 /pci@0,0/pci8086,2829@d/disk@0,0 1. c7t2d0 /pci@0,0/pci8086,2829@d/disk@2,0 Specify disk (enter its number): ^D Step 2) The first thing to do is partition and label the disk. The magic needed to write an EFI label is not overly complicated. root@sysA:~# format -e c7t2d0 selecting c7t2d0 [disk formatted] FORMAT MENU: ... format fdisk No fdisk table exists. The default partition for the disk is: a 100% "SOLARIS System" partition Type "y" to accept the default partition, otherwise type "n" to edit the partition table. n SELECT ONE OF THE FOLLOWING: ... Enter Selection: 1 ... G=EFI_SYS 0=Exit? f SELECT ONE... ... 6 format label ... Specify Label type[1]: 1 Ready to label disk, continue? y format quit root@sysA:~# ls /dev/dsk/c7t2d0 /dev/dsk/c7t2d0 Step 3) Configure zone1 on sysA. root@sysA:~# zonecfg -z zone1 Use 'create' to begin configuring a new zone. zonecfg:zone1 create create: Using system default template 'SYSdefault' zonecfg:zone1 set zonename=zone1 zonecfg:zone1 set zonepath=/zones/zone1 zonecfg:zone1 add rootzpool zonecfg:zone1:rootzpool add storage dev:dsk/c7t2d0 zonecfg:zone1:rootzpool end zonecfg:zone1 exit root@sysA:~# oot@sysA:~# zonecfg -z zone1 info zonename: zone1 zonepath: /zones/zone1 brand: solaris autoboot: false bootargs: file-mac-profile: pool: limitpriv: scheduling-class: ip-type: exclusive hostid: fs-allowed: anet: ... rootzpool: storage: dev:dsk/c7t2d0 Step 4) Install the zone. This step takes the most time, but you can wander off for a snack or a few laps around the gym - or both! (Just not at the same time...) root@sysA:~# zoneadm -z zone1 install Created zone zpool: zone1_rpool Progress being logged to /var/log/zones/zoneadm.20121022T163634Z.zone1.install Image: Preparing at /zones/zone1/root. AI Manifest: /tmp/manifest.xml.RXaycg SC Profile: /usr/share/auto_install/sc_profiles/enable_sci.xml Zonename: zone1 Installation: Starting ... Creating IPS image Startup linked: 1/1 done Installing packages from: solaris origin: http://pkg.us.oracle.com/support/ DOWNLOAD PKGS FILES XFER (MB) SPEED Completed 183/183 33556/33556 222.2/222.2 2.8M/s PHASE ITEMS Installing new actions 46825/46825 Updating package state database Done Updating image state Done Creating fast lookup database Done Installation: Succeeded Note: Man pages can be obtained by installing pkg:/system/manual done. Done: Installation completed in 1696.847 seconds. Next Steps: Boot the zone, then log into the zone console (zlogin -C) to complete the configuration process. Log saved in non-global zone as /zones/zone1/root/var/log/zones/zoneadm.20121022T163634Z.zone1.install Step 5) Boot the Zone. root@sysA:~# zoneadm -z zone1 boot Step 6) Login to zone's console to complete the specification of system information. root@sysA:~# zlogin -C zone1 Answer the usual questions and wait for a login prompt. Then you can end the console session with the usual "~." incantation. Step 7) Shutdown the zone so it can be "moved." root@sysA:~# zoneadm -z zone1 shutdown Step 8) Detach the zone so that the original global zone can't use it. root@sysA:~# zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / solaris shared - zone1 installed /zones/zone1 solaris excl root@sysA:~# zpool list NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT rpool 17.6G 11.2G 6.47G 63% 1.00x ONLINE - zone1_rpool 1.98G 484M 1.51G 23% 1.00x ONLINE - root@sysA:~# zoneadm -z zone1 detach Exported zone zpool: zone1_rpool Step 9) Review the result and shutdown sysA so that sysB can use the shared disk. root@sysA:~# zpool list NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT rpool 17.6G 11.2G 6.47G 63% 1.00x ONLINE - root@sysA:~# zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / solaris shared - zone1 configured /zones/zone1 solaris excl root@sysA:~# init 0 Step 10) Now boot sysB and configure a zone with the parameters shown above in Step 1. (Again, the safest method is to use "zonecfg ... export" on sysA as described in section "Method Overview" above.) The one difference is the name of the rootzpool storage device, which was shown in the list of assumptions, and which you must determine by booting sysB and using the "format" or "zpool import" command. When that is done, you should see the output shown next. (I used the same zonename - "zone1" - in this example, but you can choose any valid zonename you want.) root@sysB:~# zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / solaris shared - zone1 configured /zones/zone1 solaris excl root@sysB:~# zonecfg -z zone1 info zonename: zone1 zonepath: /zones/zone1 brand: solaris autoboot: false bootargs: file-mac-profile: pool: limitpriv: scheduling-class: ip-type: exclusive hostid: fs-allowed: anet: linkname: net0 ... rootzpool: storage: dev:dsk/c7t3d0 Step 11) Attaching the zone automatically imports the zpool. root@sysB:~# zoneadm -z zone1 attach Imported zone zpool: zone1_rpool Progress being logged to /var/log/zones/zoneadm.20121022T184034Z.zone1.attach Installing: Using existing zone boot environment Zone BE root dataset: zone1_rpool/rpool/ROOT/solaris Cache: Using /var/pkg/publisher. Updating non-global zone: Linking to image /. Processing linked: 1/1 done Updating non-global zone: Auditing packages. No updates necessary for this image. Updating non-global zone: Zone updated. Result: Attach Succeeded. Log saved in non-global zone as /zones/zone1/root/var/log/zones/zoneadm.20121022T184034Z.zone1.attach root@sysB:~# zoneadm -z zone1 boot root@sysB:~# zlogin zone1 [Connected to zone 'zone1' pts/2] Oracle Corporation SunOS 5.11 11.1 September 2012 Step 12) Now let's migrate the zone back to sysA. Create a file in zone1 so we can verify it exists after we migrate the zone back, then begin migrating it back. root@zone1:~# ls /opt root@zone1:~# touch /opt/fileA root@zone1:~# ls -l /opt/fileA -rw-r--r-- 1 root root 0 Oct 22 14:47 /opt/fileA root@zone1:~# exit logout [Connection to zone 'zone1' pts/2 closed] root@sysB:~# zoneadm -z zone1 shutdown root@sysB:~# zoneadm -z zone1 detach Exported zone zpool: zone1_rpool root@sysB:~# init 0 Step 13) Back on sysA, check the status. Oracle Corporation SunOS 5.11 11.1 September 2012 root@sysA:~# zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / solaris shared - zone1 configured /zones/zone1 solaris excl root@sysA:~# zpool list NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT rpool 17.6G 11.2G 6.47G 63% 1.00x ONLINE - Step 14) Re-attach the zone back to sysA. root@sysA:~# zoneadm -z zone1 attach Imported zone zpool: zone1_rpool Progress being logged to /var/log/zones/zoneadm.20121022T190441Z.zone1.attach Installing: Using existing zone boot environment Zone BE root dataset: zone1_rpool/rpool/ROOT/solaris Cache: Using /var/pkg/publisher. Updating non-global zone: Linking to image /. Processing linked: 1/1 done Updating non-global zone: Auditing packages. No updates necessary for this image. Updating non-global zone: Zone updated. Result: Attach Succeeded. Log saved in non-global zone as /zones/zone1/root/var/log/zones/zoneadm.20121022T190441Z.zone1.attach root@sysA:~# zpool list NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT rpool 17.6G 11.2G 6.47G 63% 1.00x ONLINE - zone1_rpool 1.98G 491M 1.51G 24% 1.00x ONLINE - root@sysA:~# zoneadm -z zone1 boot root@sysA:~# zlogin zone1 [Connected to zone 'zone1' pts/2] Oracle Corporation SunOS 5.11 11.1 September 2012 root@zone1:~# zpool list NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT rpool 1.98G 538M 1.46G 26% 1.00x ONLINE - Step 15) Check for the file created on sysB, earlier. root@zone1:~# ls -l /opt total 1 -rw-r--r-- 1 root root 0 Oct 22 14:47 fileA Next Steps Here is a brief list of some of the fun things you can try next. Add space to the zone by adding a second storage device to the rootzpool. Make sure that you add it to the configurations of both zones! Create a new zone, specifying two disks in the rootzpool when you first configure the zone. When you install that zone, or clone it from another zone, zoneadm uses those two disks to create a mirrored pool. (Three disks will result in a three-way mirror, etc.) Conclusion Hopefully you have seen the ease with which you can now move Solaris Zones from one system to another.

    Read the article

  • in visual studio 2008, when I stop debugging an asp classic website visual studio always crashes

    - by yamspog
    We are running visual studio 2008 (with the service pack) and having troubles when we are debugging an asp classic website. We can attach to the w3p process and debug just fine. breakpoints work, we can view variable values. The difficulty arises when it comes time to detach or stop the debugger. Every time we take either approach (detach or stop the debugger) we get a series of crashes from Visual studio. Has anyone seen anything like this? Any suggestions on what to look at?

    Read the article

  • MVVM/WPF: Button is not disabled although the CanExecute says return value is FALSE ??

    - by msfanboy
    Hello, I have a detach and attach button with Command="..." bound to my ViewModel. Although I have only 1 selected pupil but have NOT selected a subject the detach button is not disabled, the attach button is ??? public RelayCommand AttachdSubjecstCommand { get { return _attachSubjectsCommand ?? (_attachSubjectsCommand = new RelayCommand(() => AttachSubjects(), () => CanAttachSubjects)); } } public RelayCommand DetachSubjectsCommand { get { return _detachSubjectsCommand ?? (_detachSubjectsCommand = new RelayCommand(() => DetachSubjects(), () => CanDetachSubjects)); } }

    Read the article

  • Creating Membership Tables, SPROCs, Views in Attached DB

    - by azamsharp
    I have AdventureWorks database mdf file in my VS 2010 project. Is there anyway I can create Membership tables inside my AdventureWorks database. I know I can detach the database attach in SQL SERVER 2008. Create the tables and then detach. But I don't have SQL SERVER 2008 and I want to see if this can be done using command line tool. I tried this but no use: aspnet_regsql.exe -d AdventureWorks.mdf -A mr -E -S .\SQLEXPRESS Update: If I right click and see the properties of the AdventureWorks.mdf database then it shows the name as "C4BE6C8DA139A060D14925377A7E63D0_64A_10\ADVENTUREWORKSWEBFORMS\ADVENTUREWORKSWEBFORMS\ADVENTUREWORKS\APP_DATA\ADVENTUREWORKS.MDF" This is interesting!

    Read the article

  • weird data-grid-view/crystal-reports behaviour c# winforms

    - by jello
    I have a winforms project which I keep in different versions, each version having its own project folder. All these projects use the same database file, which is copied in each project folder too. So if I run a project, let's say 0.34, and then I try to run 0.35, all the database functions don't work, unless I detach the database in SQL server management studio express. So all the database functions don't work, except the data grid view and/or crystal reports. But then, if I detach the database, and I run any version, all the database functions work, except the data grid view and/or crystal reports. So to recap, when the database functions work (like select), crystal reports doesn't work. But when the database functions don't work because the database is not detached, crystal reports works. weird. any ideas?

    Read the article

  • adding new Input to jquery validationEngine form?

    - by Hailwood
    I have some fairly complex ajax logic etc going on in the onValidationComplete function for a form with jQuery Validation Engine. This is working perfect, but one thing is bothering me. in the form I have the ability to dynamically add inputs (add new row button). so my code structure wise looks like: var form = $('#myForm'); form.validationEngine('attach', {onValidationComplete:validationComplete}); $('#newInput').on('click', function(){ form.append('<input />'); form.validationEngine('detach'); form.validationEngine('attach', {onValidationComplete:validationComplete}); }); function validationComplete(form, status){/*all my logic here*/} What I don't like about it is that every time I add a new input I have to detach and then re-attach the validationEngine. Is there any way to just tell it to add the new input to it's list of inputs to validate?

    Read the article

  • SQL Server 2005 to 2008 Bak file help please!

    - by Brandon
    I have a SQl Server 2005 database backup that I want to transfer to SQL Server 2008 on my server. I spent 3 days transferring the .bak file from my own machine to my server. I then tried to restore the bak file and I got an error. I then read online a completely different method for adding a SQL server 2005 Database to SQL server 2008 which was the detach and attach method which means I need to detach the database in SQL Server 2005 and then transfer the MDF file from it via ftp to my server and then attach it in SQL Server 2008. Well I already used a lot of bandwidth transferring the .bak file to my server. is there a way to convert my .bak file which is already on my server to an MDF file and attach it in SQL server 2008?

    Read the article

  • Forcing a method to be non-transactional in JPA (Eclipselink)

    - by rhinds
    Hi, I am developing an application using Eclipselink and as part of the app I need to be able to manipulate some of the objects which involves changing data without it being persisted to the database (i merging/changing objects for some batch generation processes). I am reluctant to change the data in the Entity objects, as there is a risk that even though i have not marked the methods as @Transactional, this method could in the future be inadvertantly called from within a transactional method and these changes could be persisted. So my question is, is there anyway to get around this? Such as force a method to always be non-transactional regardless; terminate any transactionality as soon as the method is started; etc. I know there is a .detach() method that can detach the objects from the Entity Manager, however, there are many objects and this seems like a potentially error prone fail-safe on my code.

    Read the article

  • Sorting a ListView in WPF – Part II

    - by marianor
    Some time ago I wrote a post about how to sort a ListView by clicking on the header of the column. The problem with that solution was that you needed to implement it each time and you have to define an explicit header for each column. As a more general solution I use attached properties to extend the ListView and GridViewColumn . The first attached property is tied to the ListView itself, and it indicates that the control supports sorting. This property attach or detach to the Click event of the...(read more)

    Read the article

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