How to kill Statement Runner in SQL Developer - oracle

May I ask how to stop the Statement Runner in SQL Developer (Ver 19.4.0.354 Build 354.1759. Database Version 12.1.0.2)?
SQL Developer have started a dummy StatementRunner Task since yesterday and have been running for 16 Hours. I tried to pause it as I don't want to close my SQL Developer while in the middle of running a SQL file with many scripts.
I tried to use Monitor Session tool by starting a new SQL Developer this morning and I find that there was only one active session to the database, which is the session used by the Monitor Session tool.
That means the Statement Runner Task from the other SQL Developer was actually not doing anything, but simply hold up the entire application.
Of course, for this time, I have kind of no choice but to kill the old SQL Developer instance using Windows Task Manager. However, as this is very common to me. Is there anyway to avoid it in future?
Thanks in advance!

Related

Create the database button is not active in Oracle SQL Developer

I don't know how to describe the problems with the Oracle SQL developer program. I am new at this. The story is here;
I downloaded Oracle SQL Developer 22.2. And I started sqldeveloper.exe. Oracle SQL Developer is started but I am not doing anything in this program. Everything freezes. The Create database button is inactive. Press the... button and press .. but nothing changes.
My computer is a gaming computer and not old. The hardware is above the minimum requirements to install the program.
I tried resetting the windows factory settings...
I tried deleting and installing it.
I tried the old version of sqldevelepor.exe...
How can I solve this problem?
SQL Developer is a GUI tool we use to access (most usually) an Oracle database.
But, to do that, you need a database. According to what you said so far, there's none so - SQL Developer itself can't do much.
I'd suggest you to visit the same site (Oracle Technology Network, OTN) from which you downloaded SQL Developer, and this time download the database. Pick the Express Edition (XE) as it is easy to install and use. Along with the installation process, the setup will create the database for you (so you won't have to create it manually).
Then, once it is done, you should be able to use SQL Developer to connect to it. At first, you'll use SYSTEM or SYS users (pay attention to connect as SYSDBA in that case). Don't use these users for anything but administration purposes - create a new user (you can call it e.g. "berfin"), grant privileges to it (most usual are create session, create table, create view, create procedure) so that you could start working with it. In that schema (i.e. user) create your own tables, insert data, do whatever you planned to do).
I believe you should read some documentation first; OTN has it all. Start with the Concepts book, see short DBA (so that you'd be able to create your own user, etc.), have a look at SQL reference book (if you don't know SQL already). That should get you started. On the other hand, you could take shortcuts and check some YouTube videos/tutorials, ask here and there, Google for problems you meet but - in a long turn, if you really want to work with Oracle - read documentation.
tools --> preferences --> environment --> look and feel: windows (not oracle)

Is there an editor out there that allows me to test PL/SQL scripts without a connection?

I work at a facility that does not allow me access to a Oracle Database offsite. So I can't connect to the server through a Oracle client connection right now, because of COVID I'm forced to work from home.
I'm required right now to write a PL/SQL script that will update records across the entire database, however I don't know anything about setting up a test environment on my home computer so that I can run the script in a controlled environment to test it before I bring it back on site.
At one of my previous jobs, they had a PROD, PREPROD, and so forth copies of Oracle databases that one could run the script on before I sent it up the chain to production. The setup we're using doesn't have that, just the production database and thus we have the problem with our workflow that we have one shot to get it right.
So my question is, is there an editor out there for Oracle that will allow me to create a test database, so that I can run the script on that, see the results, edit it to make it work right, before I bring it back to work and run it on our production server? I'm opposed to installing a full Oracle database implementation on my own computer for licensing reasons and/or honestly I don't know what I'm doing setting up an Oracle server on my own (Tried it, couldn't even find documentation on it).
Oracle Express Edition (XE) is free so - no licensing reasons here.
If you want, you can download pre-configured Virtual Box machine which has the database already installed, along with SQL Developer GUI tool to access it so you're up and running in a matter of minutes.
Alternatively, create an account on https://apex.oracle.com/en/; it is also free, gives you certain quota (was 25MB, don't know how much is it now, possibly somewhat more than that) which is enough to try your queries.
Or, use https://dbfiddle.uk/
As you can see, there are various options; pick the one that suits you best.

Oracle Database 12c Installed, but no SQL developer showed up

I've been trying to use Oracle 12c and SQL Developer on a Virtual Machine running Oracle Linux for weeks now but the process gets worse and worse and this is the fifth time I do the same installation again.
I used oracle-rdbms-server-12cR1-preinstall for the preinstallation process, I also added the groups DBA, OPER, BACKUPDBA, DGDBA, KMDBA, and RACDBA.
I then used the./runInstaller file that comes with the Database and went through the installation process without any issues. But when the installation finished and I closed the installer, there is no trace of SQL Developer anywhere.
I'm not even sure if the Oracle Database was actually installed correctly, I've been running this command to see if it returns me anything in order to check if the database is actually installed but I don't know if i'm correct.
Don't give up. You can do it!
The daunting part of Oracle Database is that you are installing the exact same binaries for your learning environment as the largest bank on this planet has installed in their production environment! Oracle Database is a very sophisticated RDBMS and it takes years to learn it!
Oracle Database and SQL Developer
Oracle Database and SQL Developer are two separate products. You can download both from OTN and install them separately.
Database creation
Did you create a database (datafiles) while installing the binaries? There is a checkbox in the installer for that. You can create a database using the tool dbca (Database Creation Assistant) in the $ORACLE_HOME/bin folder.
Instance not running.
pmon is a vital process for the instance (processes + memory) which indicates it hasn't started. Check /etc/oratab if there is a database added to the file. If yes, fire up!
# set the environment
$. oraenv
ORCLDB
# login as sys and start the database
$sqlplus / as sysdba
SQL>startup
Best of luck!
Bjarte

How to start Oracle DB and how to connect to it?

I have downloaded latest Database App Development Virtual Machine with Oracle Linux 7 and Oracle Database 12c Release 1 Enterprise Edition (12.1.0.2 with In-Memory Option) and Oracle SQL Developer.
How do i start database or verify that it is running?
How do I connect to it?
i just checked and the db is already running. Open an xterm window and type sqlplus system/oracle and you'll be logged into the db. It's all set to go. Firefox - Apex is working. SQLDeveloper is setup with a connection to System, password is "oracle".
And, if you go to Applications > System Tools > System Monitor and click on Processes and scroll down you'll see many "ora_" processes - these are the oracle server background processes running. If you connected to the database, one will represent your forground, connected process.
Please note. this is a lab environment meant for people to learn about developing apps on oracle. Consider this one for more "DBA" type learning and more info on startup/shut down.

Using TOAD's SQL Tracker with Visual Studio and IIS

My current project uses Visual Studio 2010 and TOAD. It is an MVC project with Oracle 11g. I can get the SQL I am producing with logging and or debugging, however, since I already have a TOAD license I would love to be able to use the Tools for Oracle product, SQL Tracker to get the SQL in runtime without having to use logging or break points.
I assume I need to use the devenv.exe (VS executable) process but I cannot get it to add to the SQL Tracker tool. I get the error:
cannot create process; error=[740] (the requested operation requires elevation.)
Any google search says it has to do with running as admin. I have tried to include the Command-line argument of "RUNAS Administrator" (as well as a variety of other options) with no luck.
Update:
I am now able to Start monitoring the devenv.exe process. In order to do this I needed to run the applications as administrator before I even started SQL Tracker. However, no output is being captured.
I think I probably need to monitor the IIS process instead (w3wp.exe). When I click to start monitoring this process I now get the error:
Failed to create remote thread; error=8 (Not enough storage is available to process this command.)
I believe monitoring IIS is the correct approach, however, this error is now holding me up. Again google is not helping and I am running everything as Administrator.
Root cause could be many reasons but one thing that I suspect is caching on IIS. You can start from looking there.
Here are few things that you can try out.
http://forums.iis.net/t/1150494.aspx?w3wp+exe+memory+usage+is+out+of+control
Running Studio as admin will not necessarily run your project as admin too, imagine the security hole. I am fairly confident you can make your project run as administrator by modifying the manifest. There is an article on here at Forcing an application to Admin from config file but no one ever confirmed whether the answer was right or not, but that does not mean its not. I have noticed on a number of occasions a C# answer gets preference over a VB.NET one on stackoverflow.

Resources