oracle 12c with two database instances - oracle12c

I search a lot in google before creating this post , but couldn't solve my issue.
I installed oracle server 12c with single instance on a windows machine , and everything was working normally.
Now , I want to import a schema that contain some arabic characters (character set AR8ISO8859P6).
I tried to create a new pluggable database with this character set but I couldn't find how to set the character set for a PDB.
So I went to plan B , which is creating a new database (which is I think a new database instance and container) , where I could change the default character set , and which contain a pluggable database.
the database was installed successfully , but the issue is that I couldn't connect to it from SQLPlus or any other client tool.
when I checked the listener.ora and tnsnames.ora files, I didn't find any entry related to the newly created database.I tried to add it there but without success.
when I try to connect using :
sqlplus sys/password#new_orcl as sysdba
I'm getting :
ORA-12170: TNS:Connect timeout occurred
How can I connect to this new container database and its pluggable database?

Related

Impossible to connect to a PostgreSQL server after a new installation

I have installed postgresql on my new laptop (on Windows).
I see the service postgresql-x64-11 - PostgreSQL Server 11 is running and is automatic. Perfect.
I have installed "dbeaver" (21.21). I would like to create my first database via dbeaver. I always get this message:
Database postgres does not exist
Is it possible to create a database with dbeaver ? Or not ? Or must I do the creation with some command lines ?

PostgreSQL odbc_fdw (64bit) Connection to MS Access (64bit)

I'm trying to link existing MS Access 2013 tables into a PostgreSQL 12 Database, both 64bit version and installed on a small network using odbc_fdw. The databases are on different machines on a windows network. I have a system DSN installed and checked (using pyodbc).
In PostgreSQL I am able to create the extension; Foreign Data Wrappers; Foreign Server and Foreign Table, and to create the User Mappings, but when trying to run a query I get the "ERROR: Connecting to the driver". I tried numerous options following the little literature I found without any luck. I can use the ocdb_fwd to connect to a MySQL server straight forward but I could not figure out how to do it with MSAccess.
I would deeply appreciate it if somebody can help me figure out how to connect MSAccess to the fdw if possible.
These are my basic settings in PostgreSQL:
CREATE FOREIGN DATA WRAPPER odbc_data_wrapper
HANDLER public.odbc_fdw_handler
VALIDATOR public.odbc_fdw_validator;
CREATE SERVER odbc_msaccess
FOREIGN DATA WRAPPER odbc_data_wrapper
OPTIONS (dsn 'msaccess');
CREATE USER MAPPING FOR postgre SERVER odbc_msaccess
OPTIONS("ocdb_UID" 'Admin', "ocdb_pwd" '');
CREATE FOREIGN TABLE test(
id integer NOT NULL,
name character varying NOT NULL
)
SERVER odbc_msaccess
OPTIONS (layer 'test',
sql_query 'SELECT id, name FROM test);
DSN: msaccess working. Tested on pyodbc
odbc_data_wrapper: tested just fine connecting a MySql database
The databases are on different machines
Yeah, that's likely not going to work.
PostgreSQL needs direct access to the Microsoft Access Database, so it either has to be on the same machine, or on a network share. But if you're running it on a network share, you need to make sure that the user running PostgreSQL has access to the network share, the DSN is installed on the machine running PostgreSQL, and you're properly referring to the network path.

Creating a connection in SQLDeveloper

I am new to Oracle databases(I am using Oracle Database 11g Express Edition) and sqldeveloper. I have this doubt
When creating a new connection in sqldeveloper what is actually happening?
Creating a new database or connecting to an existing databasE?
If I create multiple connections are they pointing to a single database or different databases, if the later then how to choose a database name while creating a connection
You are establishing a connection to user (i.e. schema) which resides in an (Oracle) database. One database contains many users, so - create one connection per user.
Creating a connection does NOT create a new database; it is done differently. I don't think that 11gXE offers that option; you'd need a Standard or Enterprise Edition.
No problem if you use multiple databases (most of us do). I prefer keeping them in TNSNAMES.ORA file, in a directory used by the TNS_ADMIN environment variable. Currently, there are 94 databases I have access to, each of them having many users.
In your case, 11gXE is (probably) installed on your own computer, and you'll use one of its users (HR?), so - just connect to it. If it is locked, you'll have to unlock it first, though - in that case, create connection to SYS (don't forget to connect AS SYSDBA), then
ALTER USER hr ACCOUNT UNLOCK;
ALTER USER hr IDENTIFIED BY hr;
and then create connection to "hr" whose password is now set to "hr" (all lower case).

MobileFirst install - cannot connect to database appcntr after it was created

Trying to install MobileFirst 6.3 (Using DB2 v 10.5, Windows Server 2012 R2 std) - and during the creation of the DB2 APPCNTR database stage, I get the error:
Creating database APPCNTR (this may take 5 minutes) ...failed:
Cannot connect to database 'APPCNTR' with user 'db2admin' after it was created: com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-1035, SQLSTATE=57019, SQLERRMC=null, DRIVER=4.17.29
This is a clean installation of DB2, with no other programs using it (that I know of). The db2admin user is a member of my windows security group 'DB2ADMS' as well as 'DB2USERS' just in case
If I go back in the installer, then press next again, it says the database is already created (not sure if it's fully successful or partial)....
I believe that the database has been created successfully but for some reason, it is not possible to connect to the database via JDBC.
The explanation for the error message can be found here -- it can be many reasons: http://www-01.ibm.com/support/knowledgecenter/SSEPGG_9.5.0/com.ibm.db2.luw.messages.sql.doc/doc/msql01035n.html
When that happens to me the issue is often resolved by waiting a bit and retarting Installation Manager. Restarting the DB2 instance helps also. (If you don't restart Installation Manager, it believes it needs to create the database and fails because the database was created).
If the problem is not resolved by waiting a bit, you can also create the database manually prior running install Manager using that procedure (use a different database name than the one that is considered busy):
https://www-01.ibm.com/support/knowledgecenter/SSHS8R_6.3.0/com.ibm.worklight.installconfig.doc/admin/t_creating_the_db2_database_for_App_Center.html
Then use that database name when running Installation Manager,

xWiki 6.3. changing database (HSQL to PostgreSQL) and migrating data

I have an instance of xWiki 6.3 running on default database i.e. HSQL.
I need to move it to PostgreSQL database.
I have installed PostgreSQL and have followed following steps from documentation to point xWiki 6.3 to my new PostgreSQL database.
1 - Copied jdbc drivers at required path in xwiki
2 - In xwiki.cfg file, I have un-commented following two lines
xwiki.store.migration=1 (was already un-commented)
xwiki.store.migration.databases= all
3 - commented hsql related section in hibernate.cfg.xml and have un-commented and updated PostgreSQL related section with required information.
After that, once I start my xWiki 6.3 instance, it shows me a home page with Add Button. However none of the existing content is visible.
I can see that all the tables are moved to postgreSQL if I connect to Database.
Also, I am unable to login with the admin account that was working when the application was running on hsql.
Any idea if I am missing something ?
Regards,
I don't think your process will port any existing data (i.e. the rows, ather than the tables) from one database to the other, not least because your configuration will only know about one database at a time. I suggest you follow the guidelines to export your content as a XAR while configured for HSQL and then import it again once you've reconfigured for PostgreSQL.