Friday, July 22, 2022

WINSCP Access Denied using username@host

 Problem:

Using Winscp with a username@2.3.4.5: password@hostname

failed connection.

Example: Open sftp://username@server1:P@ssw0rd@server2/ -hotkey="ssh-rsa 1024..."


Solution:

1. Launch winscp.exe

2. Enter username, password, host, port 22

3. Connect

4. Go to the Menu Bar

5. Click Session

6. Click Generate session URL/code

7. Copy script to clipboard

8. Paste to your connection string in your script file

9.Try to connect



ORA-0020- Connected to an idle instance

"Connected to an idle instance" usually means that you connected "AS SYSDBA" and the instance you connected to is not started.

However, if your instance is out of processes, then a non-SYSDBA connection will error out with ORA-0020, and a SYSDBA connection will error out with "Connected to idle instance." It's a little misleading, but that's what happens.

Usually, when this happens, I want to get connected to the instance, so that I can try to figure out which user is causing the problem. One way to do that is to use the 'ps' command to identify some of the oldest server processes, and kill the 3-5 oldest processes, and then quickly try connecting to the database. Once you're in, you can look at things like V$SESSION to try and determine which user(s) is (are) consuming so many connections, and then go from there.


Image result for how to start oracle database
To start or shut down Oracle Database:
  1. Go to your Oracle Database server.
  2. Start SQL*Plus at the command prompt: C:\> sqlplus /NOLOG.
  3. Connect to Oracle Database with username SYSDBA: SQL> CONNECT / AS SYSDBA.
  4. To start a database, enter: SQL> STARTUP [PFILE=path\filename] ...
  5. To stop a database, enter: SQL> SHUTDOWN [mode]