oracle-sqldeveloper

How can I avoid “raw variable length too long” errors in SQL Developer?

岁酱吖の 提交于 2019-11-29 10:06:56
I am updating a BLOB with large mount of text and I get this error: SQL Error: ORA-06502: PL/SQL: numeric or value error: raw variable length too long Is there any way around it? The text is 2,670 characters long, being converted via utl_i18n.string_to_raw , as explained in How do I edit BLOBs (containing JSON) in Oracle SQL Developer? , and is all on one line in the query. Update: The BLOB in question already contains text that is 2,686 characters long, which is longer than the text I am trying to insert. A RAW is limited to 2000 bytes. If your data is longer than that, you'll need to store

Oracle sqldeveloper - how to connect DB from command line

不打扰是莪最后的温柔 提交于 2019-11-29 10:01:18
I am writing a small DB utility. I would like to give the user the ability to open an instance of Oracle sqldeveloper directly from this utility. Is it possible to open Oracle sqldeveloper IDE that already connected to a specific DB? Something like sqldeveloper USERID/PASSWORD@DATABASE /? works rather than /h. There are options to override the cofiguration file so whether you can do that or not is probably determined by the facilities offered by the config file. It doesn't seem so. sqldeveloper.exe /h shows us possible launch parameters, and none of them seem to have anything in common with

How to extract only Time from a DateTime field in Oracle SQL Developer?

拈花ヽ惹草 提交于 2019-11-29 09:35:47
I tried To_Timestamp and other methods for SQL Developer but only this one worked fine for me. Select To_Number(To_Char(DateTime_FieldName, 'HH24')) || ':' || to_number(to_char(DateTime_FieldName, 'MI')) || ':' ||to_number(to_char(DateTime_FieldName, 'SS')) from TABLE_NAME Is there a better solution to this? Assuming your goal is to generate a string representing the time (which is what the query you posted returns despite the extraneous to_number calls) SELECT to_char( <<column_name>>, 'HH24:MI:SS' ) FROM table_name If you want to return a different data type, you'd need to tell us what data

Find the length of the longest row in a column in oracle

落爺英雄遲暮 提交于 2019-11-29 05:42:49
Does anybody know if there is a way to find what the length of the longest row in a column in Oracle? Basically I need to get the length of the longest row and then use that length plus 1 with SUBSTR to make the output of the column one character longer than the longest string. Thanks EDIT: Thanks for the advice. However, the MAX(LENGTH(column_name)) AS MAXLENGTH approach gives me the number I want but when I try to use it with SUBSTR(column_name,1, MAXLENGTH) I get an invalid identifier error. SO I made a function to return the numberI wanted then used: SUBSTR(column_name,1,maxlengthfunc)

ORA-12505, TNS:listener does not currently know of SID given in connect des

♀尐吖头ヾ 提交于 2019-11-29 05:11:02
Please kindly help me as I just installed Oracle 11g but cannot connnect using SQL Devloper using the settings below: Username: system Password: mypassword Hostname: localhost Port: 1521 SID: XE Error message: Status : Failure -Test failed: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor I checked on Windows Services: OracleServiceXE: Started OracleXETNSListener: Started I also unable to connect to admin page: **http://localhost:8080/apex/f?p=4950** It says "This page can't be displayed" I also tested

How do I change the default schema in sql developer?

坚强是说给别人听的谎言 提交于 2019-11-28 22:38:50
I don't see any tables in the tables section of a database that I've linked to w/ SQL developer. The DB admin says I need to change the default schema in SQL developer. How do I do that? Ram alter session set current_schema = otheruser; should do the trick. Just right clic on the created connection and select "Schema browser", then use the filter to display the desired one. Cheers. I don't know of any way doing this in SQL Developer. You can see all the other schemas and their objects (if you have the correct privileges) when looking in "Other Users" -> "< Schemaname >". In your case, either

CLEAR SCREEN - Oracle SQL Developer shortcut?

喜夏-厌秋 提交于 2019-11-28 21:12:50
With the aim of reducing mouse activity i was wondering if there was such a command shortcut (eg CLS or Ctrl+L) to provide the SQL*Plus (?) "CLEAR SCREEN" command functionality found by clicking the rubber-on-end-of-pencil icon in Oracle SQL Developer to clear the lower "Results" sub-tab (...incorrect terminology i'm sure). Rahul To clear the SQL window you can use: clear screen; which can also be shortened to cl scr; If you're using sqlplus in a shell, like bash you can run the shell's clear command from sqlplus: SQL> host clear you can abbreviate of course: SQL> ho clear SQL>Clear Screen (It

Rudimentary issue: basic PL/SQL console output? [duplicate]

喜你入骨 提交于 2019-11-28 20:22:39
This question already has an answer here: Why no output when PLSQL Anonymous block completes? [duplicate] 7 answers Printing the value of a variable in SQL Developer 8 answers I am using SQL Developer and want to output the contents of a variable to the console using DBMS_OUTPUT.PUT_LINE(). I am running the following code that adds the numbers 1 through 5 inclusive but I'm not seeing any output. SET SERVEROUTPUT ON; DECLARE n_counter NUMBER := 5; -- Substitute this variable n_sum NUMBER := 0; BEGIN WHILE n_counter != 0 LOOP n_sum := n_sum + n_counter; n_counter := n_counter -1; END LOOP; DBMS

Bad screen redrawing in Oracle SQL Developer

人盡茶涼 提交于 2019-11-28 18:49:55
I have a problem with Oracle SQL Developer. When I use it on a Windows Server 2003 machine, it works fine. When I use it on my Windows 7 desktop, I get a lot of redraw problems in the query results grid when I scroll either horizontally or vertically, like so: Edit: ImageShack was the original image host for my screenshot, and it's no longer a valid url. Since my problem is fixed now, I can't repro this. The gist is that the client area of the result grids was repainted as gibberish during scrolling. This makes it tricky to assess the results of your queries. Clicking on the header and on

Does SQLDeveloper support executing scripts?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-28 17:33:30
I was trying to follow some instructions today, and it starts with the comment REM In SQLPlus I manually copy in each line and execute it. That's nice, I don't have SQLPlus, I have SQLDeveloper. The lines that were pasted in were of the type: @\\server\dir\dir\dir\commandfile1.txt; COMMIT; ...etc. It didn't like it when I tried that in a SQL window. I opened up and pasted in the commands by hand, and it wasn't happy with that either. (Did I mention that I'm not so good with this application nor Oracle, but that everyone else was out today?) The files there started with code like: rem set echo