I am using Oracle SQL Developer 4.1.3 and I have connected to MySQL database.
I want to select a different schema in Oracle SQL Developer but it is giving an error.
Here is my syntax:
ALTER SESSION SET CURRENT_SCHEMA = classicmodels;
I found this syntax on Docs.Oracle but still wondering why it is not working!
Thanks in advance!
Related
I made a relational model in Oracle SQL Developer and I want to make tables in MySQL Workbench. I generated the DDL script in SQL Developer and copied it in MySQL Workbench. I found out that the copied queries are not in correct syntax. I tried different options in SQL Developer to generate script and none of them were in MySQL syntax.
Is there a way to generate DDL script from a model, which is made in SQL Developer, for MySQL?
There is no straight query generation for MySQL in oracle SQL developer. You should use such a sites for your purpose to convert them into MySQL syntax or use tools for automatic converting.
I'm making a project with SQL Server but I just can get data from Oracle database in my customer's PC. Because they want to manage data before i can do with it. I have used Linked Server of Microsoft and Microsoft SQL Server Migration Assistant for Oracle to get data from Oracle database. But I have a problem I dont know when my customer INSERT, DELETE, UPDATE Oracle records. Is there anyway to migrate data from Oracle automatically to my SQL Server?
Really need a help. I have to manual do it everytime I want to update SQL Server database to get new records from Oracle.
Thanks in advance!
How can I use in query SQL file from Oracle SQL Developer, syntax like as MSSQL "USE DATABSE GO" for direct connect to an Oracle database.
Thanks!
Oracle introduced the multitenant Database in version 12c. It's structured similar to a MSSQL instance. If you are in that version, you can switch between pluggable databases with the following:
ALTER SESSION SET container = pdb1;
If you are on 11g or previous or on a non-cbo 12c Database, I don't see the way to switch to another instance.
Let's say I have a production database and a development database.
The CUSTOMER_PERMISSIONS table is created and populated in the development database.
What is the best way to create and copy the CUSTOMER_PERMISSIONS table to the production database?
INSERT INTO CUSTOMER_MARKET_PERMS
SELECT * FROM indeiso.dbo.CUSTOMER_MARKET_PERMS
returns
INSERT INTO CUSTOMER_MARKET_PERMS
SELECT * FROM inukiso.dbo.CUSTOMER_MARKET_PERMS
Error at Command Line:668 Column:25
Error report:
SQL Error: ORA-00933: SQL command not properly ended
00933. 00000 - "SQL command not properly ended"
*Cause:
*Action:
I am using Oracle 12 database system, and i am not sure why it is throwing this error
on the prod server you can do a query like this:
INSERT INTO CUSTOMER_PERMISSIONS
SELECT * FROM [devserver].dbo.CUSTOMER_PERMISSIONS
If you're okay with not using a query, and in case you happen to be using MSSQL Server, why not use the import/export wizard?
Right-click the database you want to export from, then select TASKS -> Export Data. From there, follow the wizard.
Are you sure that you have two different Oracle databases? If so then you need to setup a database link between the two databases. If I were you I should first make sure that you from the production database can select the data in the development database. If you can that and the two tables are identical then I can't see way your statement is not working.
I never seen this, but is it possible to have one SQL call join data from Oracle and SQl Server?
Yes, Oracle and SQL Server both have functionality that allows to connect to other databases, including different vendors. In Oracle terminology, it's a database link instance while on SQL Server it's called a Linked Server instance.
The syntax to reference the instance is different between Oracle and SQL Server though. IE:
Oracle:
SELECT t.*
FROM table_name#database_link_instance t
SQL Server:
SELECT t.*
FROM linked_server_instance_name.database_name.schema_name.table_name t
does MySQL support the linked server concept?
No, the closest MySQL has is the FEDERATED engine, which is only for connecting to remote MySQL instances.
PostgreSQL?
PostgreSQL has dblink. Last time I looked at dblink (pre-v9 release), it only could connect to other PostgreSQL instances.
Yes- both Oracle and SQL Server support the linked server concept. That allows you to reference the other server using a 4 part name. For example:
select *
from LocalDb.Schema.Table
cross join
OracleLinkedServer.RemoteDb.RemoteSchema.RemoteTable