Hello, you are not logged in.  Login or sign up
BLOGS
Search Toad World Search

Blogs
Toad and Database Commentaries

Toad World blogs are a mix of insightful how-tos from Quest experts as well as their commentary on experiences with new database technologies.  Have some views of your own to share?  Post your comments!  Note:  Comments are restricted to registered Toad World users.

Do you have a topic that you'd like discussed?  We'd love to hear from you.  Send us your idea for a blog topic.

Run Toad off a USB Flash Drive
 
Location: Blogs Bert Scalzo's Blog    
 Bert Wednesday, November 19, 2008 1:32 PM

Lot’s of people have asked “How can I setup Toad to run off a flash drive?” The reason for this question varies in nature and intent by requestor – but the general concept is that some users need the ability to carry Toad with them. Some are contractors who must use whatever computer and/or desk is open that day. Some are database developers who must travel around their company to perform or assist with various tasks. And finally, some are DBA’s who need to travel around while diagnosing and troubleshooting problems. In all cases, the request makes total sense (i.e. making portable a legal license). Now we have a way to do it!

Note – Toad is normally licensed per seat, therefore this is not a mechanism or technique to circumvent or violate the spirit of that license agreement. The basic idea is that per seat means for a single USB Flash Drive being used by a single user on a single computer at a time – and thus no concurrency.
 
Here are the steps:
  1. Format the USB Flash Drive as an NTFS file system.
     
    1. File explorer, right hand mouse, properties, hardware tab
    2. Select the USB Flash Drive and press the properties button
    3. Policies tab, choose Optimize for Performance and press OK
    4. Format the USB Flash Drive – NTFS should now be available
       
  2. Create TOAD_FLASH directory on your USB Flash Disk (at topmost level)
     
  3. Download and then unzip the TOAD_FLASH.zip file onto your USB Flash Disk
     
  4. Unzip the contained Oracle Instant Client installation file onto your USB Flash Disk
     
  5. Install Toad for Oracle and copy the Toad home (install directory) to your flash drive
     
    Example: xcopy /s /q "C:\Program Files\Quest Software\Toad 9.7" "X:\Toad 9.7\"
     
  6. Run TOAD_FLASH_SETUP.bat file to install (and save pre-existing Toad setups)
     
  7. Run TOAD_FLASH_RUN.bat file to launch Toad (must enter license first time)
     
  8. Run TOAD_FLASH_RESTORE.bat file to restore PC back to prior Toad state
You can download the file at http://www.bertscalzo.com/Files/TOAD_FLASH.zip
 
Permalink |  Trackback

Comments (6)  
By wdelange on Thursday, November 20, 2008 11:02 PM
Why the NTFS file system? Speed issues?

By bscalzo on Saturday, November 22, 2008 6:12 AM
In order to create a directory shortcut (i.e. link) so that Toad thinks it's running off C:\Documents and Settings\username\Application Data\Quest Software\Toad when in fact it's been redirected to the flash drive. This Windows feature requires the NTFS file system.

By DavidSt on Thursday, December 11, 2008 7:36 AM
Will this or something similar work for Toad for SQL Server?

By dchristian on Monday, January 05, 2009 12:35 PM
Toad for SQL Server is built from a completely different architecture as Toad for Oracle so there are some differences. Toad for SQL Server does not currently provide any way to direct it to look for setting files, which are normally found in the user’s profile folder, on a flash drive. Also, there are some registry settings that may not be present on a new machine that would most likely cause the application to fail. The best way to move Toad for SQL Server between different customer sites would be to install it on a laptop.

By onetimeposter on Thursday, January 08, 2009 9:31 AM
Hi all,

I have made some reverse engineering and found a workaround to get "Toad for SQL Server" working from Portable Flash drive!! :-)

it is a small batch file. Which does all the stuff befor the app. is started and revert it after the app. is terminated.

Its very simple and basic stuff inside. Improvements or a NSIS launcher as it is made for other apps. (see at portableapps.com) would be nice.

i created a directory and placed inside it the directory ToadSQL (application directory) and ToadSQL_Data (the settings directory.

What it does:
- Move the settings directory to the side (if a installation is in place).
- Copy the settings from the portable drive into place.
- launches the NGenWrapper.exe coming with the app. (to register the dlls and do sime other optimisation stuff)
- set registry settings.
- Start the app and wait ...

- after termination the dlls are unregistered.
- the registry entries are extracted and stored
- the settings are copied to the USB
- original settings are restored
- original registry settings are restored.

Here is the batchfile source ...

---8<----------------------------------------------------
@ECHO OFF

SET APP_DIR=%CD%\ToadSQL
SET APP_DATA_DIR=%CD%\ToadSQL_Data
SET LCD=%CD%

SET TOAD_HOME=%APP_DIR%
SET TOAD_APPDATA=%USERPROFILE%\Local Settings\Application Data\Quest Software\Toad for SQL Server Freeware 4.1
SET TOAD_APPDATA2=%USERPROFILE%\Local Settings\Application Data\Quest Software
SET TOAD_USB_DATA=%APP_DATA_DIR%

ECHO ====

ECHO Copy portable settings
ren "%TOAD_APPDATA%" "Toad for SQL Server Freeware 4.1_backup"
xcopy /E /Y /C /I /H /R /K /Q "%TOAD_USB_DATA%" "%TOAD_APPDATA%"

ECHO Delete old backup file ... and create new backup of registry entries
DEL /f /q "%APP_DATA_DIR%\TOAD_FLASH_backup.hiv"

ECHO Create new backup of registry entries
REG SAVE "HKEY_CURRENT_USER\software\Quest Software\Toad for SQL Server Freeware" "%APP_DATA_DIR%\TOAD_FLASH_backup.hiv"
ECHO Delete backuped registry entries
REG DELETE "HKEY_CURRENT_USER\software\Quest Software\Toad for SQL Server Freeware" /va /f
ECHO Restore Portable Reg Settings
REG RESTORE "HKEY_CURRENT_USER\software\Quest Software\Toad for SQL Server Freeware" "%APP_DATA_DIR%\TOAD_FLASH_portable.hiv"

ECHO Add install directory path to registry
REG ADD "HKEY_CURRENT_USER\software\Quest Software\Toad for SQL Server Freeware" /f /v INSTALLDIR /d "%APP_DIR%"
REG ADD "HKEY_CURRENT_USER\software\Quest Software\Toad for SQL Server Freeware\4.1" /f /v INSTALLDIR /d "%APP_DIR%"


ECHO ====

ECHO Register .NET dlls ...
"%APP_DIR%\NGenWrapper.exe"

ECHO Start Toad
cd %TOAD_USB_DATA%
"%APP_DIR%\toad.exe"
cd %LCD%

ECHO UN-Register .Net dlls ... DISABLED
"%APP_DIR%\ngenUninstall.bat"

ECHO ====


ECHO Create new backup of registry entries
del /Q "%APP_DATA_DIR%\TOAD_FLASH_portable.hiv"
REG SAVE "HKEY_CURRENT_USER\software\Quest Software\Toad for SQL Server Freeware" "%APP_DATA_DIR%\TOAD_FLASH_portable.hiv"
ECHO Delete backuped registry entries
REG DELETE "HKEY_CURRENT_USER\software\Quest Software\Toad for SQL Server Freeware" /va /f
ECHO Restore Backup Reg Settings
REG RESTORE "HKEY_CURRENT_USER\software\Quest Software\Toad for SQL Server Freeware" "%APP_DATA_DIR%\TOAD_FLASH_backup.hiv"

ECHO Copy Settings back to Portibla data directory
xcopy /E /Y /C /I /H /R /K /Q "%TOAD_APPDATA%" "%TOAD_USB_DATA%"
ECHO data directory
rmdir /S /Q "%TOAD_APPDATA%"
ECHO Rename old settings dir
ren "%TOAD_APPDATA%_backup" "Toad for SQL Server Freeware 4.1"

ECHO ... END of things

REM pause

---8<----------------------------------------------------

Have fun with it!!! :-)

By Seansoft on Thursday, January 15, 2009 9:44 AM
Can I use a U3 Smart USB Drive and launch Toad from the U3 Lauchpad?

I don't know if I can reformat it to NTFS without losing the U3 applications

Search Blog Entries
 
Blogger and Topic List
 

 

All Recent Blog Entries
 

 

Johannes Ahrends
Unicode and Toad

Ben Boise
Toad SC Discussions

Kevin Dalton
Benchmark Factory

Steven Feuerstein
Oracle PL/SQL

Devin Gallagher
Toad SC discussions

  Henrik "Mauritz" Johnson
Toad Tips & Tricks on the "other" Toads
  Mark Kurtz
Toad SC discussions
Daniel Norwood
Toad for Data Analysts
John Pocknell
Toad for Oracle
Bert Scalzo Indicates Oracle ACE status
Toad for Oracle, Data Modeling, Benchmarking
Jeff Smith
Toad product family
Richard To
SQL Optimization
Jim Wankowski
DB2 - LUW and z/OS
John Weathington
Compliance
Doug Williams
Database Musings
  Toad World Editor
Toad World issues

  Toad Data Modeler Opens in a new window
Data Modeling
 
  Real Automated Code Testing for Oracle
Quest Code Tester blog
 

Copyright 2009 by Quest Software  | Terms Of Use | Privacy Statement | Contact Us