I'm working a little side project on R Studio and I'm trying to import data from an Oracle database. The problem is, whenever I try to establish the connection using the DBI::dbConnect command, it just 'hangs'. It won't continue to the next command on my R Studio script. I've added a timeout to the dbConnect command, but it doesn't help anything. In order to exit, I have to shut down R Studio completely.
I've tested the connection, check the screenshot below, using the 'Connections' tab on R Studio. As you can see, it is able to establish the connection. So that should mean the parameters are set correctly, right? But when I run it on the script, it just keeps 'hanging' on the dbConnect command.
What can I do?
When it connects successfully to the database RStudio loads in connection pane a tree which present all schemas and all tables. It's useful by it can be slow.
Depending on Oracle database I use, it often takes a long time to load this and it's longer when user have low privileges on database (user with only one schema for instance).
I see two ways trying to go further:
connect with your statement on RGui to see if it works correctly then it's really linked to RStudio's connection pane
connect with system / admin or a higher level user to check if it's work better with
Related
I have a flexdashboard which queries from a local DuckDB (similar to SQLite) but every so often it says:
Warning: Error in initialize: duckdb_startup_R: Failed to open database
There is no "onStop dbdisconnect" style command in my code (I'm not sure where to put it in flexdashboard) so it doesn't shut down correctly if my R instance crashes. My only solution is to restart the computer. How can I fix this?
I am used to using R in RStudio. For a new project, I have to use R on the command line, because the data storage and analysis are only allowed to be on a specific server that I connect to using ssh. This server doesn't have rstudio-server to support remote RStudio sessions.
The project involves an extremely large dataset, and some pre-written code to load/format the data that I have been told to run using "source()" before I do anything else. This takes several minutes to run and load the data each time.
What would a good workflow be for something like this? Editing my code in a .r file, saving, then running it would require taking several minutes to load the data each time. But just running R in an interactive session would make it hard to keep track of what I am doing and repeat things if necessary.
Is there some command-line equivalent to RStudio where you can have an interactive session but be editing/saving a file of your code as you go?
Sounds like JuPyteR might be your friend here.
The R kernel works great.
You can use it on a remote server either with exposing an open port (and setting up JuPyteR login credentials)
Or via port forwarding over SSH.
It is a lot like an interactive reply, except it holds state.
And you can go back and rerun cells.
(Of course state can be dangerous for reproduceability)
For RStudio you can launch console and ssh to your remote servers even if your servers don't use expensive RStudio for servers platform. You can then execute all commands from R Studio directly into the ssh with the default shortcut key. This might allow to continue using R studio, track what you're doing in the R script, execute interactively.
I am currently running R on a Microsoft Azure instance (Ubuntu virtual machine) using RStudio as my IDE, to which I connect simply through my browser. I am trying to run some commands that take quite some time to complete from within RStudio and figured that I could simply close my tab with RStudio open and the process would keep running. However, when I try to reconnect to see how the process is doing, the page keeps loading but I am unable to see RStudio.
I have a few questions regarding running RStudio on a server:
First, am I correct in thinking that I can close my tab and keep the process running?
Second, is it normal behaviour that I am unable to connect to the server while the process is running?
Third, am I going about this the correct way or are there better ways?
Yes, you can close your tab and keep it running.
RStudio Server waits on updates from the R process to update the UI. This means that if you have a long-running computation, your tab may not fully reload until it's finished. You may also have seen this in the middle of a session: when R is busy, you can have problems saving scripts that are open in the editor pane.
Logging out in the middle of a computation should be safe, but be aware that RStudio will save your workspace and shut R down after a period of inactivity. It then reloads everything when you log back in. But this only extends to objects in memory; if you have any files saved in your temp directory, they'll have disappeared when you come back. They're probably still on the disk, but since your new R session has a new temp directory, you'll have to do a manual search for them.
I see this error in my Geneos active console quite often whenever we use "SQL Toolkit" plugin, This error gets corrected whenever we restart the probe but reappears again. There is no pattern by which these error shows up.
Has anybody come across such error in Geneos and does anyone have nay solution to this?
This looks like an Oracle related error. Check that you can execute the SQL statement on command line from the server that the netprobe is running on using the account that the netprobe is running under.
Supplementary checks would be around the Environment variables like ORACLE_HOME etc.
Might be beneficial to see what SQL you are running and tagging this with ORACLE and SQL
Alright, so I've been working on this project for the past year and I've never understood this one issue in crystal reports. (I'm using the crystal reports that comes with Visual Studio 2008)
Let's say I want to modify a database field nested in the command.
I right-click the command field and choose the database expert option from the context menu.
I then right-click the command once again and choose the Modify option.
Here's where I always get stuck.. I enter the password (which is the same I use in the ConnectionString for my project) and click the finish button..
..only to be presented with the following error message, which translates to "ORA-12154: TNS:could not resolve the connect identifier specified"
After some searching around I found this article : http://scn.sap.com/thread/3291225
The answer to the same problem that I'm getting was :
You must install the Oracle Driver 64 if youe OS is 64 bits, and then install Oracle Driver 32 in the same home_oracle, this should be the home1. SAP just works with home1.
You must install the Oracle Client Administrator mode.
After that you must configure your ODBC driver to Oracle Home 1. Right now test if your ODBC connection is successful.
Your application should run in 32 bit mode.
Unfortunately I'm connected to this computer remotely and am not authorized to install / uninstall drivers and applications.
My question is, is there another way that I can solve this issue so I can change that one field to a string?
Thanks!
To the extent I see there are 2 problems in your question.
The error you getting is nothing related to the datatype of the field you want to change. The present error is because You are trying to access the database for that uou need to have oracle client and you should create a ODBC connection then you will be able to make connection and can view query in crystal report.
To the extent I am aware you can't change the dataatype of a database field using the command in Crystal Report, but what you can do is instead of going to command, You can create one formula in crystal report and cast the number to string using ToText
Let me know if you need further more information