Problem with string which contains an “&” in sqlplus

Today I got a task to automate data extraction for reporting purpose from Oracle SQL Plus. My method for this automation is like below:

1. Create a batch file to call SQL Plus program.
2. The SQL PPlus program will generate a HTML report for my boss to view it.

As simple as that. And my tools required are:

1. A simple *.bat file (which to create a automatic daily folder to restore the report)
2. SQL Plus program
3. A sql script will able to produce a HTML report (this is quite tough one). I can post on how to do this maybe later.

So, my problem is, in my script there is a compulsory string [&]. Which you may already know, the string [&] is being used by ORACLE to identify variable.

This is the solution:
SET DEFINE OFF
This command line needed to be put inside the sql file before reaching [&] string, and it will stop sqlplus interpreting [&].

Thats all for today.

Interesting Google Chrome Web Tools to capture a whole web page

For most of internet user, getting a snapshot of a web, or a picture from the web, is very common and sometimes it is difficult to mange.

But with Google Screen Capture for Google Chrome,to save a screenshot of a page is very interesting yet very easy to use. The best part of it, which I personally think very important and most interesting, this tool manage to capture the whole webpage from top to bottom of page. I love it so much!

Below are the simple step to install.

1. You will need a Google Chrome installed. If you do not have it, grab it here.
2. Open your chrome and click on the [Web Store] button located at right bottom of the Chrome page.
3. Search for [Google]
4. Scroll down and look for Google Screen Capture, and install it.

This is great tool, very much love it. Enjoy.

Problem open TOAD after install : You have no Oracle Client installed.

I encounter a problem with my TOAD for Oracle just now. It mentioned You have no Oracle Client installed .Wondering what is the problem and below was the screenshot of it.



You have no Oracle Client installed


The solution is very simple. And I also found the root cause of it.


Root cause: Toad do not support Oracle Client for 64 bit. As simple as that


Solution : Install Oracle Client 32 bit. You may install another copy of Oracle client, or you may remove the 64 bit which you previously installed.


To be particular, my machine was a Windows 64 bit platform, and I directly apply Resolution 2 as below.


Below are the statement from the Quest Software support site.
For more detail from the site: https://support.quest.com/Search/SolutionDetail.aspx?id=SOL39689
Cause
- There is no Oracle client installed on the machine or the client installed is 64-bit. Toad does not support a 64-bit Oracle client.
- Environment Variable Path is missing.


Solution for 'You have no Oracle Client installed' :

RESOLUTION 1:
Check to make sure there is an Oracle client installed on your machine. If there is not, you will need to install one. Please review solution SOL76452 for video demo and instructions on installing a 32-bit Oracle Instant Client. See additional information below for link to full 32-bit Oracle Client


RESOLUTION 2:
If there is an Oracle client installed on the machine, check to see if it is 64-bit. If it is, you will need to install a 32-bit Oracle client.


RESOLUTION 3:
1) Look for your OCI.DLL file in your computer and Copy the location path i.e. C:\oracle\product\10.2.0\client_1\BIN
2) Right-Click your My Computer | Properties | Advanced Tab | Environment Variables button
3) Under ‘System Variables’ at lower half of screen, highlight ‘Path’ | click Edit
4) Under ‘Variable Value:’ | go to the very beginning of the existing entry | Paste the path you copied earlier
5) Add a semi-colon (;) | and then click OK, OK, OK.
6) Start Toad and re-test


RESOLUTION 4:
You installed an Oracle Client 10g version in a Windows 64-bit machine. There is an issue with the Oracle Client 10g version on a Windows 64-bit machines where 3rd party Oracle Tools like Toad for Oracle will not be able to see the client. Possible resolutions for this are:
- Install Toad in “C:\Quest Software\” folder instead of the default “C:\Program Files (x86)\” folder.
- Install and use Oracle Client 11g version instead. See the download link below for the client we recommend.


To download Oracle 11g Client software:
11g 64bit client
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win64soft-094461.html
11g 32bit Client
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win32soft-098987.html
You may need a Oracle Metalink account to download it.

ShareThis