Script for Single User Mode

I manage two school Mac labs and have relied on ARD for many years!
I have been unable to successfully write an ARD script to to force my lab machines to restart in "Single User Mode". This would allow me to run AppleJack 1.5 remotely.
Any help would be appreciated.

When you say you have "OSX" but not the "original install disks" do you mean the mac originally came with an earlier version and you don't have those disks, but you have a retail copy of Tiger?
The circle with the slash means that Open Firmware cannot find BootX. Basically, I think this means that Open Firmware recognises the startup volume as such but cannot hand control to the operating system at all. BootX is what it uses to get the operating system going. Without this, as you've seen, you cannot make even single-user mode.
What is SMU?
*Is your data backed up? If not, prioritise that unless you can afford to loose it.*
Does DiskWarrior repair permissions? If not and you have the Tiger retail version, try running Disk Utility to do that. I don't think this will help, but it won't hurt.
Do you have another Mac? If so and you have the retail Tiger, you might be able to use Pacifist to replace BootX (in /System/Library/CoreServices). Alternatively, if the other Mac is running the same version of the OS and is also a PPC Mac, you could try copying the file from that machine.
Before you do any of this (with the exception of the permissions repair), try to backup any data you need if that's at all possible.
- cfr

Similar Messages

  • IMac G5 won't boot in normal and safe mode, but will from single-user mode

    Hello everyone,
    I'm quite new here, so I try to do my best if you have a question.
    Yesterday, someone nearby me had a iMac G5 (Powermac8,1), and he sayd, that the computer sometimes will boot, sometimes not.
    I did test it, I thought it was running fine, but when I played some music in iTunes, it was stuck on 9 seconds, and crashed (with a kernel panic). The guy also sayd, that there was nothing important on the computer, so a clean install was fine.
    Now, the problem is, that it will not boot in normal mode (without anything pressed on boot), also it won't in safe mode (shift-boot), but it will, when I enter single-user mode, mount the hard drive and exit from single-user mode so it will go futher on booting. Sometimes it will not, and immediately gives you a kernel panic in single-user mode, but it will 90 percent of the time.
    Then you've got another problem: when it's running in the normal desktop from single-user mode, it'll be stuck after some time again. If I look into the Kernel Panic file created, most times it's because of Spotlight indexing, so I disabled that.
    He also gave me the disks (Apple Hardware Test and Extra Applications, and iMac G5 Mac OS X Install Disks 1-3) that came with the Mac. He sayd that I could use them, but I think he didn't test out the SuperDrive, because when I insert a disk, it will try to read, but it will make 2 same sounds, and quits after 10 tries, when it will spit the cd out. Also normal (audio) disks.
    Also, I must hurry with the commands for mounting and exiting in single-user mode, or it will just not boot.
    In all cases, after 30-45 seconds from pressing the power button, the fan will start blowing at full speed, and it will stop after the exit command in Single-user mode. That's weird.
    I can't do anything with the SuperDrive, I can't normally boot in Mac OS X except for Single-user mode (but I don't think he would like to do that every time the computer boots up), and I have very limited time when Mac OS X arrived on the desktop.
    When booting in Verbose mode, it will be stuck on this:
    AppleSMU::PMU vers = 0x000d004c, SPU vers = 0x15, SDB vers = 0x01,
    (and sometimes ends with a kernel crash by fsck_hfs)
    Things I've tried (without any success):
    - /sbin/fsck -fy (in single-user mode)
    - Disabling Spotlight and mds
    If you want some more information, feel free to ask!
    Greetings
    -MrYoranimo
    PS: My main language is Dutch, so my English can be bad at some points.

    Thank you for your support! This reply is a little bit late, because I was to the camping this weekend.
    The only thing I sure do know, is that the iMac has a bad SuperDrive. That's one problem, but I don't really wanna use it, and you fix everything by Single-user mode and when I get to the desktop to test things and change stuff in the Preference Panes.
    What also came to my mind was that there also is a problem with the videocard (driver), because sometimes when I boot into Single-user mode, I can see some white pixels which aren't supposed to be there. And when booting from SUM you can see that some of the colors are different and there are weird patterns on the screen.
    I also tried to setup a NetBoot server on this computer (MacBook Mid 2010) with just Lion 10.7.4 on it, but I'm not that expert and I didn't really find the good posts on the Internet, although I tried it with the Server applications and both Server applications and DeployStudio. But I didn't succeed.
    I don't really like buying a new FireWire hard disk or external FireWire dvd reader/writer, except if it has USB support, because my MacBook doesn't support FireWire, and I really wanna make use of it then.
    If I know more or have fixed it, I will surely post again here with what I did to fix it (if no one else has posted here already ).

  • Can you run a bash script on boot in single user mode

    Hey guys quick question.
    Is it possible to run a bash script on boot in single user mode.
    I can create a file and dump it on the root hd.
    Let's call it repair.
    I can then boot to single user mode and run it by typing /repair.
    But I want it to do it automatically.
    Every time I go into my machines that I clean for my job. I have to run sbin/fsck -fy
    Then I have to mount the drive and then remove all cache files, then reboot the machines.
    I would like to automate this by just holding command s and then moving to the next computer.
    There must be some sort of boot daemon somewhere.
    Please help.
    Sincerely,
    John

    Have you seen Applejack?
    http://applejack.sourceforge.net/
    It doesn't start automtically, but does cleanup.
    Robert

  • Can't log in with valid password, can't boot from disk, can't access disk utility, in single user mode can't reset password as appears locked in caps mode with '?' for forward slash, can anyone help?

    Can't log in with valid password, can't boot from disk, can't access disk utility, in single user mode can't reset password as appears locked in caps mode with '?' for forward slash, can anyone help?

    Which keyboard layout you were using? German, French ... I suppose your layout is reset to the default: US and you are unable to find the "?" or "/" ...
    Please have a look into the keyboard viewer, to see how the layout of your keyboard is actually.
    marek

  • Why can't I enter single user mode on my Mac Mini for an admin password reset?

    Hi,
    I recently created a new user account for my mac and deleted the old one, not realising that this was the only account with admin priveleges. As such, I no longer have access to administrator priveleges, and cannot grant them to my new user account.
    I have tried to boot in single user mode and recovery mode but neither command results in any reaction on the part of my computer.
    This thread follows on from a previous, unrelated disscussion:
    BDAqua: If you hold alt key at bootup do you see a lock in the middle?
    Yenots: No...what does this mean?
    BDAqua: If it did, it would mean Firmware Password Protection was enabled, which prevents booting in other modes, so that's not the problem, are you using a wired Mac KB, or Windows KB?
    Yenots: I'm using an 'Apple Keyboard with Numeric Keypad' [ http://store.apple.com/uk/product/MB110B/B/apple-keyboard-with-numeric-keypad-br itish ]
    If you find me here BDAqua, hit me with your knowledge!
    Any other contributions are welcome and, now we're under the right heading, will hopefully help other users who have encountered this problem.
    Thanks, Cristo

    Hi,
    Thanks for the link to MacPilot, and the sexy screenshot. I found an archived version for 10.4 on the koingosw website. That solves getting into single user/safe mode. Though I'd be interested to see whether sudo nvram boot-args="-s" will result in single user boot.
    As for creating administrator priveleges for my new user account, I've found a method which looks good:
         \single user mode\
         cmd-s
         \mount drive\
         mount -uw
         \open 'directory access'\
         lauchctl load /System/Library/LaunchDaemons/com.apple.opendirectory.plist
         \list users\
         ls /Users
         \change password\
         dscl . passwd /Users/<username> <password>
    I think that this method intends that if I change the root users password I'll be changing the administrator password  (as root is the only user with administrator priveleges), and subsequently be able to change my new user accounts priveleges using 'netinfomanager'. But I'm not 100%. Could you give me your opinion on this?
    Furthermore, three keys 'L' 'O' and '(' aren't working on my keyboard, which means I can't try this until I find an intact keyboard to borrow. I was thinking maybe a mod version of the above instructions would work in terminal using sudo, so I could use the keyboard viewer to type the missing characters. If you have any ideas on constructing such a mod I would be interested to hear them.
    Otherwise, Thank You for your help BDAqua! And enjoy your summer wherever you are.

  • Single User Mode: Still waiting for root device

    iMac G4.
    I reset the NVRAM, PRAM. It won't attempt to boot from anything but a OS 10.4 cd; booting from OS 9 cd just leaves me at the flashing question mark icon.
    If I try to boot from OS X cd, it comes back with the prohibitory sign.
    If I try to boot into single user mode, it gives me a bunch of "...."has no kernal dependency lines, then a 'still waiting for root device' line, and repeats that.
    Something to the effect before the 'still waiting for root device' is "Waiting on <dict ID="0"><key>IOProvider-Class</key><string ID="1">IOResouces</string><key>IOResouceMatch></key><string ID="2">boot-uuid-media</string></dict>"
    Any help please?

    Nevermind...I found out that the hard drive was bad...still puzzles me why it wouldn't boot from CD though, as I thought they all should even if no drive is present.

  • Single User Mode: Searching for root...

    My 2 year old unplugged my PowerMac iMac G5 (single) and now it won't start up.
    I was finally able to boot up off of Disk Warrior and replace the directory, but it won't start up past the gray Apple screen. The fan comes on after about 45 seconds and blows hard. Then, I get the circle with a line through it, in gray. I've never seen that on a mac.. the international "no" sign.
    When trying to start up in Single User Mode, I get a long list of stuff either disabled, not found, missing etc and then it starts writing to the screen every 30 seconds a line like:
    Still searching for root.
    I've tried pulling the back off, resetting the SMU, starting up in Safe Mode, etc.
    This has happened with storms before and I can usually get it back.
    I don't have original install discs.

    When you say you have "OSX" but not the "original install disks" do you mean the mac originally came with an earlier version and you don't have those disks, but you have a retail copy of Tiger?
    The circle with the slash means that Open Firmware cannot find BootX. Basically, I think this means that Open Firmware recognises the startup volume as such but cannot hand control to the operating system at all. BootX is what it uses to get the operating system going. Without this, as you've seen, you cannot make even single-user mode.
    What is SMU?
    *Is your data backed up? If not, prioritise that unless you can afford to loose it.*
    Does DiskWarrior repair permissions? If not and you have the Tiger retail version, try running Disk Utility to do that. I don't think this will help, but it won't hurt.
    Do you have another Mac? If so and you have the retail Tiger, you might be able to use Pacifist to replace BootX (in /System/Library/CoreServices). Alternatively, if the other Mac is running the same version of the OS and is also a PPC Mac, you could try copying the file from that machine.
    Before you do any of this (with the exception of the permissions repair), try to backup any data you need if that's at all possible.
    - cfr

  • Proper procedure for patching from Single User mode

    Typically when I install a patch cluster from Sun, I do a sanity reboot from the console of the server using:
    shutdown -y -g0 -i6
    When the system comes back online, I log into the console again and then do:
    shutdown -y -g0 -i0 (to go into OBP)
    then
    boot -s (to go into single user mode)
    The procedure above was given to me from a Sun technician.
    Then I install the patch cluster and reboot. It has come to my attention that Sun recommends breaking any mirrors between your disks before patching. I wanted to know what is the best way to do this for both Veritas Volume Manager and Solaris Volume Manager. For Veritas Volume Manager, I was thinking of going into the vxdiskadm menu driven utility and choosing the option to "Remove a disk for replacement" for the rootmirror disk and then after a reboot to check that the patches did not cause a problem, go back into vxdiskadm and choose the option "Replace a failed or removed disk" and select the rootmirror which should then begin to automatically resync itself to the primary rootdisk. Any comments on if this is a proper way to do this or if someone has a better method, I would love to hear it. I am assuming a system with just two internal disks: c1t0d0s2 and c1t1d0s2
    Also, if anyone can comment on how to do this with Solaris Volume Manager or if it is required would be great also.
    Thanks much for any advice.

    Typically when I install a patch cluster from Sun, I
    do a sanity reboot from the console of the server
    using:
    shutdown -y -g0 -i6
    When the system comes back online, I log into the
    console again and then do:
    shutdown -y -g0 -i0 (to go into OBP)
    then
    boot -s (to go into single user mode)
    The procedure above was given to me from a Sun
    technician.Not a bad thing to check reboot before patching, but I don't think it's in any official documentation that I'm aware of.
    Then I install the patch cluster and reboot. It has
    come to my attention that Sun recommends breaking any
    mirrors between your disks before patching.Again, I don't know if it's "official", but if you have a backup copy that you could boot from, it does reduce the possibilities of critical problems from a bad patch.
    I wanted
    to know what is the best way to do this for both
    Veritas Volume Manager and Solaris Volume Manager.
    For Veritas Volume Manager, I was thinking of going
    into the vxdiskadm menu driven utility and choosing
    the option to "Remove a disk for replacement" for the
    rootmirror disk and then after a reboot to check that
    the patches did not cause a problem, go back into
    vxdiskadm and choose the option "Replace a failed or
    removed disk" and select the rootmirror which should
    then begin to automatically resync itself to the
    primary rootdisk. Any comments on if this is a proper
    way to do this or if someone has a better method, I
    would love to hear it. I am assuming a system with
    just two internal disks: c1t0d0s2 and c1t1d0s2
    Also, if anyone can comment on how to do this with
    Solaris Volume Manager or if it is required would be
    great also.Well, it'll work as you've described, but what if the patches fail? The disconnected mirror is not bootable. You'd have to go through an unencapsulation and other things from a CD.
    I've often simply pulled one side of the mirror while the machine was shutdown. Since the mirror was valid prior to pulling, it will boot. If there's a problem, I shut down, swap disks, and boot from the untouched mirror. If no problem, I re-insert, reattach the disk to the diskgroup, then recover the volumes.
    I don't know of any nice supported method of booting from an offline VxVM mirror that doesn't involve a very long series of steps. My method isn't supported, but it does work. If you have both disks in the machine at the same time though, it'll update the private regions. Don't do that until you're ready to sync up one way or the other. Test before doing it in production.
    In any event, you should have a backup ready to go.
    Darren

  • Is there a way to switch to single-user mode for screen sharing in Lion?

    Hello,
    with the new multiple user mode one screen sharing guest can not see the mouse cursor of another - even if they use the same login.
    It's a pity, because we use screensharing to discuss the content of the screens with multiple screen sharing users.
    It is necessary to point with the cursor to show the other members of this 'screen sharing meeting' things while discussing.
    This is not possible anymore with Lion and multi user screen sharing.
    Does anybody know a patch or terminal command to switch back to single user mode for screen sharing?
    Kind regards
    Carl M.

    Try using OmniDazzle to help draw attention to what you want:
    http://www.omnigroup.com/products/omnidazzle/

  • Wipe a HD via Unix in Single User Mode?

    Is it possible to wipe a hard drive using diskutil or another method when booting up in Single User Mode? We routinely need to wipe drives and if possible, this would be the easiest.
    I suspect because the OS that boots in Single User Mode is on that same drive will make this impossible.
    Thanks in advance for your tips and comments,
    Doug

    Yes, you cannot erase an OS while it's 'hosting' the erasure. Single user mode is part of Mac OS X, so it's on the hard drive, not in the firmware or anything super-low-level like that. Oh well. So... you might be able to erase the vast majority of user, application, and even OS files, but it won't be complete and won't be 'as good as' a volume-format.
    A couple alternatives come to mind (sorry if you know all this. Not trying to be pedantic or patronizing, just making sure you know your options).
    We keep host computers around just for running wipes, backups, and diagnostics that cannot run from a drive holding the booted OS. You simply restart the to-be-wiped Mac holding the 't' key, connect it via firewire, and treat it as an external hard drive.
    You could also just boot from a Mac OS X install disc and wipe from the copy of Disk Utility included on the disc. Better yet, throw a +bona fide+ copy of OS X onto a pocket hard drive, boot the victim-Mac from that (hold option while it is first starting up), and wipe the internal HD normally, now that it's not in use. You could maybe even use single user mode in the booting OS, like you'd imagined, and format from there (I'm not sure that would be faster than letting it boot normally, though, as you might have to use "dd" or some other similar low-level wipe method, as I don't think the frameworks required for Apple's cli "diskutil" are available in single user mode).
    I haven't tried to use it on a Mac, but I have a 256 MB USB flash drive with, er, ['Darn' Small Linux|http://tinyurl.com/5md7t] on it for diagnosing Windows boxes. It runs a script on boot which, if you don't intervene to run utilities or what-have-you, will wipe all attached hard drives and shut down. I keep it locked up for understandable reasons, but its super useful just as a time-saver, booting most machines and beginning the countdown-to-wipe in under ten seconds.
    Anyway, let us know what your goals and thoughts are.
    Cheers, Joel

  • Mount external Hard drive in Single user mode

    Do any know how to mount an external hard drive in single user mode:
    I've issue the following command:
    /sbin/mount -uw /
    mkdir /Volumes/ex1
    /sbin/mount_hfs /dev/disk2s3 /Volumes/ex1
    (I've checked my external hard drive using df -k showing the device is disk2s3)
    Result:
    Permission denied

    I seem to remember the "Permission denied" or "Device busy" coming up in some situations but not others when attempting to mount drives at this early stage in "single user" mode...
    It might be worth trying to run:<pre>sh /etc/rc</pre>This is actually present among the "Tiger" messages in "Single User" mode, as the procedure to continue booting but remaining in "single user" mode. Indeed, it seems to start up the usual "services" like starting disk arbitration (so you can eg. use 'diskutil' to repair permissions, or loading "NetInfo" so you don't need to work in '-raw' mode - in the past, people had posted complicated procedures for doing these things manually.
    After running the 'rc' script, try creating your mount point and and running 'mount_hfs' as usual...

  • Automatic scrip execution on the console in single user mode on Solaris 10

    Hi All,
    On Solaris 8, I am able to launch my script automatically on the console when the system comes up into single user mode without having to enter the password. However, on Solaris 10, the script is display in the foreground on the console. When i do a ps -ef , I see the process running. Can someone please tell me how to get this to work on solaris 10?
    To automatically boot the system into single user mode:
    # svcadm milestone -d milestone/single-user:default
    Files edited for this to work on solaris 8:
    To login without a password:
    # cat > /etc/default/sulogin <<EOF
    PASSREQ=NO
    CONSOLE=/dev/console
    ALTSHELL=YES
    EOF
    # echo "/sbin/su -" > /sbin/rc1
    (Solaris 10, I used rcS instead of rc1)
    my script is called from the /.profile when the system comes up into single user mode.
    I did the same on solaris 10, but no success.
    Please let me know if you have any suggestions.
    Thank you,
    Brian

    try
    - add 'set -x' to your /etc/profile
    - add 'set -x' to /etc/rc? scripts
    - check /etc/vfstab for a nfs mountpoint not using 'bg'

  • In single user mode is it possible to create a user

    in single user mode is it possible to create a user using the niutil command. if so, can the user be given admin status so that software can be added to the system.
    if it's possible could you post a link to how this is done or tell me if you have time.
    thanks very much,
    g.

    the short answer is yes, you can add users in single user mode and make them admins.
    i usually add users on the command line like so:
    (i don't have any attribution for this script, but i found it online somewhere. i used to do less than this when adding users.)
    #!/bin/sh
    echo "Enter username:"
    read newuser
    echo "Enter the full name for user $newuser's:"
    read long_name
    echo "Will $newuser be an Admin user (y/N)?"
    read is_admin
    new_uid=`nidump passwd . | awk -F: '{print $3f}' | sort -n|tail -1`
    new_uid=`expr $new_uid + 1`
    nicl . -create /users/$newuser
    nicl . -create /users/$newuser uid $new_uid
    nicl . -create /users/$newuser realname "$long_name"
    nicl . -create /users/$newuser passwd ""
    nicl . -create /users/$newuser gid 20
    nicl . -create /users/$newuser shell "/bin/tcsh"
    nicl . -create /users/$newuser home "/Users/$newuser"
    nicl . -create /users/$newuser writerspasswd $newuser
    passwd $newuser
    ditto /System/Library/UserTemplate/English.lproj /Users/$newuser
    chown -R $newuser:staff /Users/$newuser
    nicl . -read /users/$newuser
    if [ "$is_admin" = Y -o "$is_admin" = y ]
    then
    nicl . -append /groups/wheel users $newuser
    nicl . -append /groups/admin users $newuser
    nicl . -read /groups/wheel
    nicl . -read /groups/admin
    fi
    also, when you're in SUM, you're root, so you can just type sh /etc/rc to start the necessary subsystems and install what you want.

  • Error Installing ruby with RVM Single User mode

    I've just installed RVM on ArchLinux x64 in single user mode via the recommended install script
    curl -L https://get.rvm.io | bash -s stable
    I've also installed all the requirements listed in
    rvm requirements
    However, I'm having trouble actually installing any version of ruby. And getting the following error:
    arch:~ % rvm install 1.9.3
    No binary rubies available for: ///ruby-1.9.3-p194.
    Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
    Fetching yaml-0.1.4.tar.gz to /home/christopher/.rvm/archives
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 460k 100 460k 0 0 702k 0 --:--:-- --:--:-- --:--:-- 767k
    Extracting yaml-0.1.4.tar.gz to /home/christopher/.rvm/src
    Prepare yaml in /home/christopher/.rvm/src/yaml-0.1.4.
    Configuring yaml in /home/christopher/.rvm/src/yaml-0.1.4.
    Error running ' ./configure --prefix=/home/christopher/.rvm/usr ', please read /home/christopher/.rvm/log/ruby-1.9.3-p194/yaml/configure.log
    Compiling yaml in /home/christopher/.rvm/src/yaml-0.1.4.
    Error running 'make', please read /home/christopher/.rvm/log/ruby-1.9.3-p194/yaml/make.log
    Please note that it's required to reinstall all rubies:
    rvm reinstall all --force
    Installing Ruby from source to: /home/christopher/.rvm/rubies/ruby-1.9.3-p194, this may take a while depending on your cpu(s)...
    ruby-1.9.3-p194 - #downloading ruby-1.9.3-p194, this may take a while depending on your connection...
    ruby-1.9.3-p194 - #extracting ruby-1.9.3-p194 to /home/christopher/.rvm/src/ruby-1.9.3-p194
    ruby-1.9.3-p194 - #extracted to /home/christopher/.rvm/src/ruby-1.9.3-p194
    Skipping configure step, 'configure' does not exist, did autoreconf not run successfully?
    ruby-1.9.3-p194 - #compiling
    Error running 'make', please read /home/christopher/.rvm/log/ruby-1.9.3-p194/make.log
    There has been an error while running make. Halting the installation.
    The log files are as follows:
    arch:~ % cat ~/.rvm/log/ruby-1.9.3-p194/yaml/configure.log
    __rvm_log_command:32: permission denied:
    arch:~ % cat ~/.rvm/log/ruby-1.9.3-p194/yaml/make.log
    make: *** No targets specified and no makefile found. Stop.
    arch:~ % cat ~/.rvm/log/ruby-1.9.3-p194/make.log
    make: *** No targets specified and no makefile found. Stop.

    I can't picture what is doing this other than something missing or muxed, but perhaps it's time for a relatively painless Archive & Install, which gives you a new/old OS, but can preserve all your files, pics, music, settings, etc., as long as you have plenty of free disk space and no Disk corruption, and is relatively quick & painless...
    http://docs.info.apple.com/article.html?artnum=107120
    Just be sure to select Preserve Users & Settings.

  • Server going to Single User mode

    Hi guys,
    I am having a database which we refresh every night with same back up where it is used for testing purposes. we will refresh the database thorough job. every time it refreshes it goes to single user mode, I should manually go and change the process using
    following steps:
    1) to execute sp_dboption
    sp_dboption 'testdb01', 'single user', 'FALSE';
     go
    2) to retrieve client session per database
    select d.name, d.dbid, spid, login_time, nt_domain, nt_username, loginame
      from sysprocesses p inner join sysdatabases d on p.dbid = d.dbid
     where d.name = 'testdb01'
    go
    3) kill the particular session
    kill 51
    go
    4)Now I can ‘remove’ the database from Sinlge user mode.
    exec sp_dboption 'testdb01', 'single user', 'FALSE'
    go
    Is there any way to write a query  in which if the session goes to single user mode  kill that session and start the restore process again? can you guys  help in implementing that code.
    thanks,
    aravind.

    i got one solution. I added the below script above the restore step process and in the restore store procedure i removed this statement "SINGLE_USER  WITH ROLLBACK IMMEDIATE".
    Declare @name as varchar(15)
    Declare @spid as varchar(4)
    Declare sess_curs CURSOR
    for select d.name, spid
      from sysprocesses p inner join sysdatabases d on p.dbid = d.dbid
     where d.name = 'Test_DB'
    OPEN sess_curs
    FETCH NEXT FROM sess_curs into @name,@spid
        While @@FETCH_STATUS = 0
            BEGIN
                EXEC('KILL '+ @spid)
                FETCH NEXT FROM sess_curs into @name,@spid
            END
        CLOSE sess_curs
        DEALLOCATE sess_curs
        Exec sp_dboption 'Test_DB', 'single user', 'FALSE'

Maybe you are looking for

  • Logical Database KDF

    Hello, i want to select all open items of the vendor accounts. I have tried this with the logical database KDF and the selection screen 900 for open items. Now i have the problem, that i also want the customer items of the vendor account. Can i get t

  • Opening an external url in the same browser

    Hi all, I need to open an external URL (for instance,www.google.com) from my WDA application by 'linktoaction' or 'button' event and this should be happen in the same parent window and not as a external window. Please suggest me steps with example co

  • How to get the label of parent container?

    Hi I have a Canvas, Its label is "News". I added a text control in it and i want to set its text dynamically from the canvas label. But i dont know how to access the label of the Canvas "without" using the id of the canvas. like <mx:Canvas label="New

  • Exporting full size photos from library to email

    I want to export my full size photos (4.8MB) as an attachment to an email. However, my IMac keeps on reducing its size to 22KB - even though I indicate it as JPEG maximum. Can any help?

  • IWeb '08 Site - Published to MobileMe Account - Not Viewable by Others

    I'm new to iWeb. I created a simple site with a few pages, and then "Published All" to MobileMe. When I view the site, it looks fine. When others try, they get the "Are you looking for something on MobileMe?" page. I have looked at the "site inspecto