sqlplus

Determining location of relevant tnsnames.ora file

南笙酒味 提交于 2019-11-26 00:49:02
问题 I installed both the 32 and 64-bit Oracle 11g drivers. I search my PC looking for files with the name \"tnsnames.ora\" and found 3 in the following locations: 1. C:\\Oracle\\product\\11203_32bit\\CLIENT_1\\NETWORK\\ADMIN 2. C:\\Oracle\\product\\11203_64bit\\CLIENT_1\\NETWORK\\ADMIN 3. C:\\Windows\\TNS The existence of the 3rd location of the tnsnames.ora file surprises me. I have the following Oracle clients installed on my PC: \"C:\\Program Files (x86)\\Quest Software\\Toad for Oracle 11.6\

How do I ignore ampersands in a SQL script running from SQL Plus?

余生颓废 提交于 2019-11-26 00:48:43
问题 I have a SQL script that creates a package with a comment containing an ampersand (&). When I run the script from SQL Plus, I am prompted to enter a substitute value for the string starting with &. How do I disable this feature so that SQL Plus ignores the ampersand? 回答1: This may work for you: set define off Otherwise the ampersand needs to be at the end of a string, 'StackOverflow &' || ' you' EDIT: I was click-happy when saving... This was referenced from a blog. 回答2: If you sometimes use

How do I spool to a CSV formatted file using SQLPLUS?

冷暖自知 提交于 2019-11-26 00:21:25
问题 I want to extract some queries to a CSV output format. Unfortunately, I can\'t use any fancy SQL client or any language to do it. I must use SQLPLUS. How do I do it? 回答1: You could also use the following, although it does introduce spaces between fields. set colsep , -- separate columns with a comma set pagesize 0 -- No header rows set trimspool on -- remove trailing blanks set headsep off -- this may or may not be useful...depends on your headings. set linesize X -- X should be the sum of