How to specify zsh terminal column width and display line numbers so they correspond with SQL and ORA stack error log file?

The questions I have are:

  • Why does this log file point to exceptions that seemingly don’t exist?
  • How am I supposed to diagnose this if I can’t locate the error?
  • Does anybody have a solution for printing these logs out in their terminal, with the correct columns and line indentation (it looks like the log files are observing 80 total columns; 0-79, which seems to be an artifact of time immemorial)?

I ran into an issue with a recent Oracle REST Data Services (ORDS) install, and I see the exceptions in the log, like this (tail end of the log file):

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>102 end;
103 Error report -
104 ORA-01031: insufficient privileges
105 ORA-06512: at "ORDS_METADATA.ORDS_ADMIN", line 1148
106 ORA-06512: at "ORDS_METADATA.ORDS_INTERNAL", line 512
107 ORA-06512: at "ORDS_METADATA.ORDS_INTERNAL", line 602
108 ORA-06512: at "ORDS_METADATA.ORDS_INTERNAL", line 602
109 ORA-06512: at "ORDS_METADATA.ORDS_ADMIN", line 1137
110 ORA-06512: at line 43
111 ORA-06512: at line 86
112 01031. 00000 - "insufficient privileges"
113 *Document: YES
114 *Cause: A database operation was attempted without the required
115 privilege(s).
116 *Action: Ask your database administrator or security administrator to
grant
117 you the required privilege(s).
118
119 More Details :
120 https://docs.oracle.com/error-help/db/ora-01031/
121 https://docs.oracle.com/error-help/db/ora-06512/
</code>
<code>102 end; 103 Error report - 104 ORA-01031: insufficient privileges 105 ORA-06512: at "ORDS_METADATA.ORDS_ADMIN", line 1148 106 ORA-06512: at "ORDS_METADATA.ORDS_INTERNAL", line 512 107 ORA-06512: at "ORDS_METADATA.ORDS_INTERNAL", line 602 108 ORA-06512: at "ORDS_METADATA.ORDS_INTERNAL", line 602 109 ORA-06512: at "ORDS_METADATA.ORDS_ADMIN", line 1137 110 ORA-06512: at line 43 111 ORA-06512: at line 86 112 01031. 00000 - "insufficient privileges" 113 *Document: YES 114 *Cause: A database operation was attempted without the required 115 privilege(s). 116 *Action: Ask your database administrator or security administrator to grant 117 you the required privilege(s). 118 119 More Details : 120 https://docs.oracle.com/error-help/db/ora-01031/ 121 https://docs.oracle.com/error-help/db/ora-06512/ </code>
102 end;
   103  Error report -
   104  ORA-01031: insufficient privileges
   105  ORA-06512: at "ORDS_METADATA.ORDS_ADMIN", line 1148
   106  ORA-06512: at "ORDS_METADATA.ORDS_INTERNAL", line 512
   107  ORA-06512: at "ORDS_METADATA.ORDS_INTERNAL", line 602
   108  ORA-06512: at "ORDS_METADATA.ORDS_INTERNAL", line 602
   109  ORA-06512: at "ORDS_METADATA.ORDS_ADMIN", line 1137
   110  ORA-06512: at line 43
   111  ORA-06512: at line 86
   112  01031. 00000 -  "insufficient privileges"
   113  *Document: YES
   114  *Cause:    A database operation was attempted without the required
   115             privilege(s).
   116  *Action:   Ask your database administrator or security administrator to 
grant
   117             you the required privilege(s).
   118  
   119  More Details :
   120  https://docs.oracle.com/error-help/db/ora-01031/
   121  https://docs.oracle.com/error-help/db/ora-06512/

But when I retrieve one of these PL/SQL packages, and open in either Database Actions (in my Autonomous Database) or my mac terminal, nothing “lines up.” Take for instance ORDS_METADATA.ORDS_INTERNAL:

The lines actually stop at 501. And same if I open the file in my terminal. I was able to find a command that got me part of the way there: cat -n demo-4.sql | fold Which produced this:

Even with the absence of correct indentation (on new/next lines), I still don’t see the exception. On the bright side, at least they line up with each other. Seems like log files from other Oracle products do this too, is that true?

What I’ve attempted thus far:

  • Spent 1-2 hours reserching the following commands:
    • vi/ex commands
    • Sed command
  • Read through the zsh manual for 1-2 hours
  • Spent another 1 hour trying to get a single command to work (achieved some results, although pretty poor).

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật