Like Cron on Unix, Windows has a Task Scheduler but by default the wizard only lets you select the following intervals:
Daily
Weekly
Monthly
One time only
When my computer starts
When I log on
I found myself needing to change the JVM on a Windows/JRun4/ColdFusion setup the other day. I knew how to do this in theory but hadn't given it a go before, here are the steps I took:
- Downloaded new JVM from sun (http://java.sun.com/products/archive/)
- Loaded new JVM on to server (D:\Java\latest\jre)
- Edited JRun jvm.config (D:\JRun4\bin\jvm.config)
- Change java.home from:
- Restarted JRun
java.home=D:/JRun4/jre
to:
java.home=D:\Java\latest\jre
Now normally I would have expected that to be it but I found ColdFusion refused to launch and it was throwing an error saying it couldn't find msvcr71.dll. A quick search of the file system told me that msvcr71.dll lives under the orinal JVM so I just copied it from D:\JRun4\jre\bin to D:\Java\latest\jre\bin. Restarted JRun and ColdFusion started to work again.
To run JRun4 & ColdFusion (32-bit version) on a 64-bit Windows machine with IIS you will have to switch IIS to run in 32-bit mode because of the JRun connectors. Here is how you switch from 64-bit to mode to 32-bit mode and back again:
To switch IIS from running in 64-bit mode to 32-bit mode, execute the following command from C:\Inetpub\AdminScripts directory:
cscript.exe adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 true
To switch IIS from running in 32-bit mode to 64-bit mode, execute the following command from C:\Inetpub\AdminScripts directory:
cscript.exe adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 false
Here's a quick guide to setting up a Linux instance on Amazon's ec2
compute colud (example instance ID's and IP's used). This is probably
more for my own reference than anything but feel free to ask questions
if you want more detail.
1. Find an image:
ec2-describe-images -o amazon
2. Start an instance:
ec2-run-instances ami-2b5fba42 -k keypair
3. Check the instance is running:
ec2-describe-instances
Here's a quick guide to setting up a Windows instance on Amazon's ec2 compute colud (example instance ID's and IP's used). This is probably more for my own reference than anything but feel free to ask questions if you want more detail.
1. Find an image:
ec2-describe-images -o amazon
2. Start an instance:
ec2-run-instances ami-40bf5829 -k keypair
3. Check the instance is running:
ec2-describe-instances
I needed to change a table owner in SQL so a quick google lead me to the sp_changeobjectowner stored procedure.
Taking a look at the the syntax and example I was still a little confused on how to use it.
sp_changeobjectowner [ @objname = ] 'object' , [ @newowner = ] 'owner'
sp_changeobjectowner 'authors', 'Corporate\GeorgeW'
After having a go I found the following syntax worked for me.
sp_changeobjectowner '[blogger].[blog_entries]' , 'dbo'
This will change the database owner of the blog_entries table from blogger to dbo.
Further to my post the other day about transporting Oracle tablespaces I meantioned that I use the mysql & mysqldump commands via the command line to transport mysql databases around. So here is how I do it:
- Connect to your database server, open a command line and run the following commands.
Move a single database:
- Export:
mysqldump -h localhost dbname -u username --password="password" -C >C:\dbname_date.sql - Recreate blank database.
- Import:
mysql -h localhost dbname -u username --password="password"
Move all databases:
- Export:
mysqldump -h localhost --all-databases -u username --password="password" -C >C:\alldbs_date.sql - Import:
mysql -h localhost -u username --password="password"
When working with ColdFusion I use Macromedia's JRun4 for managing my instances because it easily allows me to run multiple versions of ColdFusion. Anyhow I was setting up a site the other day on ColdFusion 7.0.2 (I mainly work with 8 now) and came across this error after removing a try catch.
Error Executing Database Query.
[Macromedia][Oracle JDBC Driver]Internal error: Net8 protocol error.
Not having seen this error before I had to do a bit of googling and was lead to this knowledge base article about upgrading the database drivers that ship with ColdFusion and sure enough after a quick upgrade I was away again. But I suppose the moral of this post is to double check which database versions work with which ColdFusion versions before starting as evidently ColdFusion 7.0.2 doesn't play nicely with Oracle 10g R2 out of the box.
I often have to move databases (or tablespaces in Oracles case) around between servers. There are lots of different ways to do this and in some cases I have to ask other people to do the initial export for me so with so many different tools out there I often find compatibility problems with exports as a particular tool has been used. In mysql I get around this by using the mysql & mysqldump commands via the command line and in Oracles case I use the imp (import) & exp (export) commands also via the command line. Here is the steps I would take to move an Oracle tablespace:
I have a test instance on Amazon's elastic compute cloud (ec2) and I usually connect to this using a SSH keypair but I added a few more users in and tried to connect without using the keypair and I expected it to just ask me for a password but instead I got.
Permission denied (publickey,gssapi-with-mic).
Now I know password authentication isn't as secure but didn't really feel like setting up more keypair's and its only a test instance. So after a bit of digging these are the steps you need to enable password authenication via SSH (keypair's still work).