Sponsored Content
Special Forums UNIX and Linux Applications UNIX spool command not extracting complete record from the Oracle table Post 302959161 by venkat_reddy on Thursday 29th of October 2015 12:30:41 PM
Old 10-29-2015
UNIX spool command not extracting complete record from the Oracle table

Hello All,

I'm trying to spool an oracle table data into a csv file on unix server but the complete record is not being extracted. The record is almost 1000 characters but only 100 characters are being extracted and rest of the data getting truncated.

I'm setting below options :

Code:
SET HEADING OFF
SET SPACE 0
SET PAGESIZE 0
SET PAGESIZE 1000
SET LINESIZE 10000
SET FEEDBACK OFF
SET TAB OFF
SET TRIMSPOOL ON

Please suggest

Thanks in advance

Last edited by Don Cragun; 10-29-2015 at 04:28 PM.. Reason: Add CODE tags.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

unix file to oracle table

Hi , Can anyone help me regarding loading a unix file data to oracle database table using shell scripts? I wanted to grep only this data from a spool file sql_test.txt 99 00:00:00:01 but if I use grep I am getting format sql_test.txt 99 rows selected. Elapsed:... (2 Replies)
Discussion started by: ran16
2 Replies

2. UNIX for Dummies Questions & Answers

Extracting column names from a table.. SQL with UNIX

:rolleyes: hi there everybody, i need help,... thanks anyway! i am working on a very huge table with the name table1. the problem is that i know only one field name in this table..., working with a ksh environment i don't know how to view the table to check out the field names :confused:. ... (4 Replies)
Discussion started by: fmina
4 Replies

3. UNIX for Dummies Questions & Answers

Advice on extracting special characters from a DB2 table to a file in the UNIX ENV

need some advice on the following situation. I have a DB2 table which has a varchar Column. This varchar column can have special characters like ©, ®, ™ . When I extract from this table to a sequential file for this varchar column I am only able to get © and ® . To Get the ™... (1 Reply)
Discussion started by: cosec
1 Replies

4. UNIX for Dummies Questions & Answers

Spool command in Unix

Hi, Is there any command in unix similar to spool command in oracle. (6 Replies)
Discussion started by: manosubsulo
6 Replies

5. Shell Programming and Scripting

Check the record count in table (table in oracle)

I have requirement: 1) Check the record count in table (table in oracle) 2) If records exists generate the file for existing records and wait for some time (Go to sleep mode) and Again check the record count after 10 min.......... (Loop this process if record count >0). 3) Generate touch... (1 Reply)
Discussion started by: kamineni
1 Replies

6. Shell Programming and Scripting

Check the record count in table (table in oracle)

I have requirement: 1) Check the record count in table (table in oracle) 2) If records exists generate the file for existing records and wait for some time then Go to sleep mode and Again check the record count after 10 min.......... (Loop this process if record count >0). 3) Generate touch... (1 Reply)
Discussion started by: kamineni
1 Replies

7. Shell Programming and Scripting

Unix command to extract a record from a table

Suppose there is a table like the following...I just wanted to know if there is any command using which we can get the record/name of the person who joined before 2005.. Sl Name des y.o.joining 1 Ram Engineer 2001 2 Hari Doctor 2004 3 David Plumber 2005 4 Rahim painter 2007 5 gurmeet... (1 Reply)
Discussion started by: satyajit007
1 Replies

8. Shell Programming and Scripting

Insert into Oracle table thru UNIX - linux 2.6.9-89

Hi, I am trying to insert a record into a table (say dips_tbl) which resides in Oracle DB through a ksh script. I want to insert records into few of the table columns-not all. I'll give an e.g. for the date column "CREATE_DATE". For that I first execute SQL1="SELECT SYSDATE FROM DUAL" ... (1 Reply)
Discussion started by: dips_ag
1 Replies

9. Shell Programming and Scripting

Delete oracle table from UNIX script

Hi, Is it possible to delete oracle table datas using a UNIX script/Shell script? how can we do this?? I have oracle Database and i have to delete millions of record everyday.. adn it is taking hours togather to execute this. Will the delete query triggered from UNIX be faster can we expect any... (1 Reply)
Discussion started by: Codesearcher
1 Replies

10. Shell Programming and Scripting

How to lock Oracle table through UNIX?

Hi frndz, Can anyone provide me some input or pseudo code for my req as mentioned below... I am loading 2 files through unix script into oracle table...as i am doing some updates also i am getting an error where both files try to update the table simultaneously and my script fails.. so i... (3 Replies)
Discussion started by: gnnsprapa
3 Replies
SET 
ROLE(7) PostgreSQL 9.2.7 Documentation SET ROLE(7) NAME
SET_ROLE - set the current user identifier of the current session SYNOPSIS
SET [ SESSION | LOCAL ] ROLE role_name SET [ SESSION | LOCAL ] ROLE NONE RESET ROLE DESCRIPTION
This command sets the current user identifier of the current SQL session to be role_name. The role name can be written as either an identifier or a string literal. After SET ROLE, permissions checking for SQL commands is carried out as though the named role were the one that had logged in originally. The specified role_name must be a role that the current session user is a member of. (If the session user is a superuser, any role can be selected.) The SESSION and LOCAL modifiers act the same as for the regular SET(7) command. The NONE and RESET forms reset the current user identifier to be the current session user identifier. These forms can be executed by any user. NOTES
Using this command, it is possible to either add privileges or restrict one's privileges. If the session user role has the INHERITS attribute, then it automatically has all the privileges of every role that it could SET ROLE to; in this case SET ROLE effectively drops all the privileges assigned directly to the session user and to the other roles it is a member of, leaving only the privileges available to the named role. On the other hand, if the session user role has the NOINHERITS attribute, SET ROLE drops the privileges assigned directly to the session user and instead acquires the privileges available to the named role. In particular, when a superuser chooses to SET ROLE to a non-superuser role, she loses her superuser privileges. SET ROLE has effects comparable to SET SESSION AUTHORIZATION (SET_SESSION_AUTHORIZATION(7)), but the privilege checks involved are quite different. Also, SET SESSION AUTHORIZATION determines which roles are allowable for later SET ROLE commands, whereas changing roles with SET ROLE does not change the set of roles allowed to a later SET ROLE. SET ROLE does not process session variables as specified by the role's ALTER ROLE (ALTER_ROLE(7)) settings; this only happens during login. SET ROLE cannot be used within a SECURITY DEFINER function. EXAMPLES
SELECT SESSION_USER, CURRENT_USER; session_user | current_user --------------+-------------- peter | peter SET ROLE 'paul'; SELECT SESSION_USER, CURRENT_USER; session_user | current_user --------------+-------------- peter | paul COMPATIBILITY
PostgreSQL allows identifier syntax ("rolename"), while the SQL standard requires the role name to be written as a string literal. SQL does not allow this command during a transaction; PostgreSQL does not make this restriction because there is no reason to. The SESSION and LOCAL modifiers are a PostgreSQL extension, as is the RESET syntax. SEE ALSO
SET SESSION AUTHORIZATION (SET_SESSION_AUTHORIZATION(7)) PostgreSQL 9.2.7 2014-02-17 SET ROLE(7)
All times are GMT -4. The time now is 05:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy