oracle-sqldeveloper

Oracle SQL Developer copy database step by step

一笑奈何 提交于 2019-12-22 06:50:58
问题 I'm having big trouble in copying an Oracle DB to the same server but with another name, to use as a development DB. I'm used to SQL Server, I'm new to Oracle (11g). I wanted to use the 'Database copy' from SQL Developer, but I'm getting errors all the way. First it was about missing tablespaces. Then when I manually created them in my new empty DB the errors were about missing users. I wanted to create the users manually, but then I first needed to create missing roles. When all that was

PL / SQL to search a string in whole database

只愿长相守 提交于 2019-12-21 21:26:54
问题 More than a question, its an information sharing post. I have come across a situation today where i needed to look for a sting in the entire database of an application with no idea of, which table/column it belongs to. Below is a PL/SQL block i wrote and used to help my propose. Hope its helps others to with a similar requirement. Declare i NUMBER := 0; counter_intable NUMBER :=0; BEGIN FOR rec IN ( select 'select count(*) ' || ' from '||table_name|| ' where '||column_name||' like''%732-851%'

Connecting to oracle 12c using Oracle Sql developer (remote)

天涯浪子 提交于 2019-12-21 20:25:38
问题 I have been trying to connect to Oracle 12c remotely by using Oracle SQL developer. It shows the below error during connecting to the server : Status : Failure -Test failed: IO Error: The Network Adapter could not establish the connection I do can connect to oracle database on the server, but the problem is regarding to connect to this server (database) remotely The content of my listener.ora is : SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = CLRExtProc) (ORACLE_HOME = D:\app

display select results inside anonymous block

爷,独闯天下 提交于 2019-12-21 12:01:16
问题 I'm trying to debug a SELECT inside a procedure, and I'm trying to this using a anonymous block. I would like that SQL Developer simply return the last SELECT statement, but I get the error: ORA-06550: line 21, column 5: PLS-00428: an INTO clause is expected in this SELECT statement Inside the procedure, I have an INTO for that select, but is there a simple way that I can simply get the results for the last SELECT statement for my debugging? I'm using anonymous block and variables so that the

How do I edit BLOBs (containing JSON) in Oracle SQL Developer?

让人想犯罪 __ 提交于 2019-12-21 04:24:12
问题 How do I edit BLOBs (containing JSON text) in Oracle SQL Developer? I can open and view them, but do I need an external editor to edit them? Any help on what to use, even if just notepad, and how to go about it would be greatly appreciated in the answer. EDIT: BLOBs in question contain JSON text. 回答1: If you run a query in SQL Developer 3.1 (and probably earlier releases) that returns a BLOB, you can double-click on the particular BLOB you're interested in where you'll be prompted either to

How to create a small and simple database using Oracle 11 g and SQL Developer?

泪湿孤枕 提交于 2019-12-20 12:06:53
问题 How to create a small and simple database using Oracle 11 g and SQL Developer ? I am seeing too many errors and I cannot find any way to make a simple database. For example create database company; Caused the following error: Error starting at line 1 in command: create database company Error at Command Line:1 Column:0 Error report: SQL Error: ORA-01501: CREATE DATABASE failed ORA-01100: database already mounted 01501. 00000 - "CREATE DATABASE failed" *Cause: An error occurred during create

Where to get this Java.exe file for a SQL Developer installation

…衆ロ難τιáo~ 提交于 2019-12-20 10:16:42
问题 I just installed Oracle 11g, and tried to start Oracle SQL developer so as to start writing queries. It is asking me: Enter the full pathname for the java.exe file . Where do I find this? I did a global search for java.exe and am sure did not get some Oracle related pdf files. Also my Oracle is installed out of users/vas. 回答1: I found my java.exe that worked for SQL Developer at C:\ORACLE11G\product\11.2.0\client_1\jdk\bin where C:\ORACLE11G is my Oracle Home. The client that I have installed

Oracle SQL syntax

这一生的挚爱 提交于 2019-12-20 06:55:53
问题 This is my table structure . I have many problems in trying to make different things work . How do I enter the values into task where Monday = 62 ? INSERT INTO it_time_track (task,percentage) VALUES ('Support',null) where Monday=62; commit ; This gives me an error -- I fixed it by making it an interactive Grid on Oracle Apex and doing a select to display this table and then I went on to edit it manually . 回答1: UPDATE it_time_track SET Monday = (SELECT SUM(Monday) FROM it_time_track ) WHERE Id

CASE conversion from IIF

淺唱寂寞╮ 提交于 2019-12-20 06:41:06
问题 I started off with SQL (access) IIf(Len([CAT]) < 3, Left([CAT],1) & 0 & Right([CAT],1), [CAT]) AS CAT1, [HD0] & IIf([TABLE].[HD1]<>"00", " / " & [HD1_ABR], Null) & IIf([HD2]<>"00", " / " & [HD2_NAME], Null) & IIf([HD3]<>"000", " / " & [HD3_NAME], Null) & IIf([HD4]<>"00", " / " & [HD4_NAME]) AS NAME, and did Oracle (Sql Developer) Case When length(cat) < 3 Then SubStr(cat,1,1) || '0' || SubStr(cat,-1,1) Else cat End cat1,hd0 Case When TABLE <>"00" then " / " else HD1_ABR,null When I run query

How to find median in sql

喜你入骨 提交于 2019-12-20 05:22:09
问题 I have the following sql query which gives me the total h_time grouped by month, week and day. Instead I want the median h_time for month, week and day. How do I do that in Oracle SQL? SELECT DAY, MEDIAN(H_TIME) AS HANDLE_TIME FROM( select MONTH, WEEK, DAY, CASE WHEN C.JOINED IS NOT NULL THEN (NVL(C.TOTAL_TALK,0) + NVL(C.TOTAL_HOLD,0) + (NVL((C.DATETIME - C.START_DATETIME)*86400,0)) )/86400 ELSE 0 END AS H_TIME from TABLE1 C LEFT JOIN TABLE2 S ON S.ID = C.ID where c.direct = 'Inbound' ) where