setting up remote connection with an existing monetdb db - monetdb

I create a monetdb database using mserver5 (in actual fact I use R and MonetDB.R for this part).
Retrospectively (once the db has been created) I would like to do the following:
set a remote connection to the db
set a passphrase for the remote connection (apparently necessary)
Please note that from the manuals I think I can do the above on a new dbFarm created with monetdbd.
My problem is to do the above retrospectively on an existing db.
To start I tried to use monetdbd and pointing it to the db folder (created by mserver5) with
monetdbd get all myFolderCreatedWithmserver5
But I get
unable to read properties from myFolderCreatedWithmserver5: no such file or directory

You are most probably providing monetdbd the wrong folder. You can identify the "dbfarm" folder by its contents:
.merovingian_lock
merovingian.log
.merovingian_properties
one folder for each database
If you provide a folder above this one, or any folder of a database, you will get the above error message.

Related

What is significance of ewallet.p12.lck and cwallet.sso.lck files in oracle wallets?

I am confused regarding the significance of ewallet.p12.lck file and cwallet.sso.lck files. I assumed like any other lock files, whenever a user tries to create DB connection using wallets it creates a lck file so that no other user could use the same wallet files again.
Is my assumption correct?
If yes, is lck file recreated every time a new connection is created using wallets?
I checked oracle wallet documentation they explaing the use of ewallet.p12 and cwallet.sso file, but do not give significance of .lck files created.
https://docs.oracle.com/en/database/oracle/oracle-database/12.2/dbimi/using-oracle-wallet-manager.html#GUID-D0AA8373-B0AC-4DD8-9FA9-403E345E5A71
Oracle DB version 12c
Check out this blog, *.lck files are created while setting up the wallet files. But, these are not created when a connection is established. Also, you need to have only the ewallet.p12 and cwallet.sso for the connection to be established.
This is from my experience with Oracle wallet.
The lock files: ewallet.p12.lck and cwallet.sso.lck are created by Oracle UCP driver at startup after accessing the wallet files ewallet.p12 and cwallet.sso, which must be located in the path pointed by -Doracle.net.wallet_location=<path>.
It seems they are created with rw------- permissions, which indicates that they are not supposed to be used by other users, but I haven't tested if that is possible.
The lock files are not recreated every time a new connection is created. They are only created at startup as a way of getting the DB connection string.
In my tests, different processes can read the same wallet files and get connections to DB, though if they start at the same time, it is likely to get a Failed to lock - cwallet.sso.lck (Access is denied), which I solved duplicating the wallet files in different directory locations.

DB2 database in Oracle SQL developer with SSL option

Need help to connect DB2 on cloud with Oracle SQL developer.
I have configured SQL developer with third party JDBC to other DBs, but not work in DB2 with SSL option.
There have no option to set "sslConnection=true" in connection dialog. I have tried db2 type 2/4 jdbc drivers, that's same result.
Oracle-SQL-Developer successfully lets me connect to Db2-on-cloud with SSL.
My version of Oracle-SQL-Developer is old 17.02 and yes that version seems to lack a GUI way to add connection attributes for Db2 connections . I will update this answer for version 19.02 later.
A workaround is:
append the required property to the database name field.
Example: BLUDB:sslConnection=true; . Depending on version, the GUI
may misbehave , in which case do not try a connect or test at this
time, but instead try SAVE and then close Oracle-SQL-Developer - to
cause it to update its connections.xml file.
The connection information is stored in file connections.xml
which you can edit when Oracle-SQL-Developer is closed. The location
of that file may depend on which operating-system you are using. For
Linux it is in the .sqldeveloper tree off the home directory of the user running SQL-Devleoper
. First take a backup of that file before
you change it. Search for your newly created connection name. Look
through the settings to find the customUrl for your Db2-on-cloud
connection. You can edit it to look something like below:
<StringRefAddr addrType="customUrl">
<Contents>
jdbc:db2://dashdb-txn-sbox-***********.services.*****.bluemix.net:50001/BLUDB:sslConnection=true;
</Contents>
If you made changes, save the file, take another backup of the changed file (in case it gets overwritten next time), and restart SQL-Developer. Your connection should appear in the Connections pane, and the connect should succeed if you entered all other credentials and connection-parameters correctly. Works for me...

Can I Restore data from ORACLE datafiles folder?

my server had been attacked by a ransomware .rapid and all my data had been encrypted , luckily for me the oracle home folder is not encrypted - yet - and most of the files including the datafiles folder and tablespaces are still accessible
Can any One please tell me how to recover my database objects?
no backup is available , only oracle home folder -most of it-
EDIT :
The System is broken , I am trying to know witch files to collect and copy that will enable me to recover my database files from another system
when I try to log into sqlplus throw cmd I get the following error :
'sqlplus' is not recognized as an internal or external command ,
operable program or batch file.
Blockquote
EDIT :
FILES THAT I STILL HAVE ACCESS TO - NOT ENCRYPTED -
Okay. If you can find an init.ora file on your server, that's the PFILE - initialization parameter file - that's the last thing missing to easily copy your database to a new server. If you can't find it, that's ok - it'll just be a little harder. As long as you have the datafiles, you can eventually get your database back.
Basically, you'll want to follow steps 2-8 in the link I posted. You can also find some helpful info in the Oracle guide to manually creating a database in Windows. I'll walk you through them.
Shutdown your old database (if it's still running). This will make sure your datafiles are in a consistent state for copying. Probably stopping the Windows Service would be the easiest way to do that if you can't access sqlplus.
Copy the data to your new server. I'm assuming it'll be in the same location, D:\app\Administrator\oradata\VTC\
Make a copy of the control file CONTROL01.CTL and name it create_db.sql (EDIT: I was assuming that this was a backup to trace ascii version of the control file, but it sounds like this is the binary file)
Edit create_db.sql. Where it says CREATE CONTROLFILE REUSE DATABASE "MY_DB" NORESETLOGS, change it to CREATE CONTROLFILE SET DATABASE "MY_DB" RESETLOGS. Make note of whatever "MY_DB" is - this is your database name. Most people make it the same as the SID. I normally do RESETLOGS which throws out the old redo logs, but you could try keeping them with NORESETLOGS if that works for you.
Remove or comment out the lines that say RECOVER DATABASE and ALTER DATABASE OPEN;. Make sure the paths for the datafiles and logfiles look correct. Save the file.
If you couldn't find your init.ora to copy, I think this very minimal one will work for you, although you'll want to fix your memory settings later. Create it in the same folder.
DB_NAME=MY_DB
INSTANCE_NAME=MY_DB
SERVICE_NAMES=MY_DB
CONTROL_FILES = ("D:\app\Administrator\oradata\VTC\CONTROL01.CTL")
DB_FILES=100
Create an Oracle Database Windows Service. Afterwards check Services to make sure it's running.
oradim -NEW -SID MY_DB -STARTMODE manual -PFILE "D:\app\Administrator\oradata\VTC\init.ora"
Log in to your new Oracle instance as SYSDBA. There's no database yet.
cd D:\app\Administrator\oradata\VTC\
set ORACLE_SID=MY_DB
sqlplus / as sysdba
Create the database, using the control file from the old server as a script.
#create_db.sql
If everything comes back OK, run:
alter database open

nopcommerce 3.40 Deployment cant create database

I installed on localhost with a local database. I compiled in Release mode - Any CPU. I have recopied the file system set from publish to the root folder as always.
I am taken directly to the install page. I try to install using my websites database server name. Ive tried reconnecting to an existing database.
I get the error message (Ive tried both connection methods):
Setup failed: Sequence contains more than one element
So i tried to just create a new database. i get error:
Setup failed: An error occurred while creating the database: CREATE DATABASE permission denied in database 'master'.
I have checked to make sure my username and password are correct for the database. I think maybe i need to reset the install files some how? I have tried everything from delete to editing the settings.txt file in the App_data folder. still cant get passed the install
You don't have permission to create a new database using these credentials. You should configure SQL Server to allow it
Most shared hosting doesn't allow you to create database from code. To overcome this, do:
Manually create database on your host
Get the connection string / connection info
Enter the info in [2] during installation, make sure you uncheck "create database if it doesn't exist"
The nopCommerce install never creates a database. If you so choose... nopCommerce will create tables.
Edit: I am marking this the answer because this concept helped solve both new database creation and connecting to existing databases.

Oracle XE 11g (windows 8) I can't connect to the Database (idle instance)

Hi I have problem with idle instance
When I trying:
sqlplus / as sysdba
I get result: Connected to an idle instance.
And when I try startup I get:
ORA-01078: failure in processing system parameters
ORA-01565 error in identifying file 'C:\oraclexe\app\oracle\product\11.2.0\server\dbs/spfileXE.ora
ORA-27041: unable to open file
ORA-04002: unable to open file
O/S-Error: (OS 2) File not found;
My system is Windows 8. Do you any idea how to solve it?
SOLUTION:
I have to startup using command:
startup pfile='<path to file>/init.ora'
and change all paths in init.ora where was
<ORACLE_BASE>
Thx for help
I've got that pain too.
To install Oracle XE you should login as local admin - NOT domain account.
This https://community.oracle.com/thread/2361291 made me happy :)
I just had the same problem.
You just have to start the setup to install the database as administrator.
After this and a reboot everything works fine.
I highly recommend reading the Oracle® Database 2 Day DBA manual, or hire a dba.
You are missing the init{ORACLE_SID}.ora, the parameter file which contains things like database name, controlfile locations. the init{ORACLE_SID}.ora is a text file that is edited with a regular text editor. This file can be converted to a spfile{ORACLE_SID}.ora that can be edited using a database instance. This is also a dynamic parameter file meaning that when you change parameters in an instance, the parameters can also be recorded in the spfile for later reuse.
For now add the db_name and control_files. Make sure that the contol_files parameter points to an existing controlfile[s]. If there are no existing control_file[s], just trash the initXE.ora, spfileXE.ora and start dbca, the Database Configuration Assistant and using that create a new database.

Resources