Does ORACLE have any construct like Sql Server's schema? - sql-server

I am generally a Sql Server coder, but we have a client who wants to move a system from Sql to ORACLE due to the new licensing model of Sql Server.
I know historically, ORACLE has no logical grouping of objects within a db/schema, along the lines of a Sql Server schema. It's been a while since I've done any real ORACLE work though, so I'm just wondering if somewhere along the line, they may have added such a construct?
The version of ORACLE we are porting the Sql Server database into is ORACLE 11g (11.2).
Traditionally, I've seen oracle developers do this using just a prefix on table/view/object names. So for example a Sql Server object users.OPTIONS might become USR_OPTIONS in ORACLE. This works to be sure, but it just feels really kludgey to me, as it's not so much an actual hierarchy, but is sort of "forcing" one in by simply using contorted names.

Oracle has schema support in Oracle 11gR2. Oracle schemas are tied to a user. You'll have to (somewhat confusingly) create a user for each schema that you're creating. This isn't a big deal, but some people find it distasteful.
Oracle 12c Enterprise Edition has a feature called Multitenant that allows for multiple databases on the same Oracle server in much the same way that SQL Server allows out of the box.

Related

best way to transfer tables from SQL Server to Azure SQL?

I recently moved a SQL Server 2012 database from an old web server to Azure SQL. I also keep a copy of the database on my personal machine which is now running SQL Server 2019. During development, I frequently make changes to tables on my local machine and then need to transfer those tables to the server. I used to do this using a Visual Studio SSIS package. It was very easy. I used the "Transfer SQL Server Objects" task to select one or more tables, specify whether the existing tables should be dropped first, and replaced the tables on the server. The "Transfer SQL Server Objects" task does not work when trying to transfer objects to Azure SQL because it uses the "USE" statement. There must be an easy way to transfer tables to an Azure SQL database. I've used the "Microsoft Data Migration Assistant" and it works great for the initial migration, but does not allow you to replace tables. I feel like I am missing something very obvious because transferring tables is a routine task and there must be an easy way to do this with Azure SQL.
Manually managing and synchronizing different database versions can be time-consuming. The Schema Compare addon facilitates database comparison and provides you complete control when syncing them — you may filter particular differences and categories of differences before making modifications. The Schema Compare addon is a trustworthy tool that will save you time and code.
Hence, the Schema Compare extension provides an easy-to-use experience
to compare two database definitions and apply the differences from the
source to the target. MSFT Ddocument which could be usefull : Schema
Compare extension- here and How to: Use Schema Compare to Compare
Different Database Definitions - Here.

Install SQL Server (Express, compact, other?) in standalone pc

Help needed here. I'm a bit lost checking all possible editions and configurations of SQL Server.
What I'd like seems straight forward: a version of SQL Server (ideally 2008, or higher), on a single PC (client+server), with a small footprint. I just want to self train in ddbb's basic administration (user creation, schemas, scripts, copying ddbbs, stored procedures).
These ddbb's won't be used with webs, other users, etc. Just myself, at most with an Access front-end linked to the SQL Server DB.
My doubts are:
Is is better SQL Server Express 2008, Compact Edition (CE), SQL
Lite, something else ??
I would prefer using SQL Lite (seems the
simplest), but my concern is how 'similar' (for things like schemas,
permissions, scripts management, files names, no worries about multiple servers, though) is SQL lite to
a full SQL Server ?
I'd just like to familiarize with the basics in my pc so that when confronted to a real SSIS I can learn it quickly.
Thanks in advance, p.
I'd go with SQL Express if you're planning to learn SQL Server. Although SQLite has a small footprint it is completely different from SQL Server. Queries to get and manipulate data are similar (but not identical in every manner), but everything related to metadata (schemas etc.) is completely different.

Converting SQL Server 2012 schema to PostgreSQL 9.1

For a new project we have to export data from a SQL Server 2012 database to a PostgreSQL database. We have the SQL Server schema but have to create one for PostgreSQL. As far as possible we would like the schemas to match. Can anyone give any advice on the best way of converting a SQL Server schema to a PostgreSQL one? Are there any tools or scripts which will help? I have seen a PostgreSQL function but to be honest I have no PostgreSQL experience and our remit stops at the data being imported into PostgreSQL so I would like to do everything from the SQL Server side (planning to use SSIS with the 64-bit ODBC driver for PostgreSQL to export the data once we have the schema created)
Although not free, I've used Toad Data Modeler for this in the past. We never used it on any particularly complex schemas, but it did do a good job of keeping schemas in sync between various DB platforms.
Your mileage may vary, but it's worth a look.
I don't know a direct schema converter but most data modeling tools offer such conversion functionality. We use Dezign for Databases. This tool has got a function "switch target dbms". This a data modeling tool just like Toad Data Modeler mentioned here before. With the database independent modeling functionality you can keep schemas on different db platforms in sync. For data synchronization (data pump) between different database platforms you can use DataDiff CrossDB.

Replication across heterogenous databases

Is it possible using SQL Server Replication to replicate data to AND from (bi-directional) Oracle and SQL Server? The schemas are completely different. In real-time would be a bonus.
Have already investigated Oracle Golden Gate, which seemed to do the job, although the licence cost is not insignificant!
I wondered if anyone has had any experience in replicating data across different schemas, and what other tools they employed? I realise this is a bit of an open-ended question but any advice and previous experiences would be most useful.
Thanks
Duncan
I recently had to create a solution to import periodically lots of data from different databases (most of the time from Oracle databases) to a SQL Server database (a data warehouse). To do so, I used SQL Server Integration Service to create a package able to import, transform and insert the data as I wanted (since it was from heterogeneous sources too). This software comes with SQL Server and the version 2005 and superior is really easy to use (graphical programming). In your case, you could trigger your created services when needed. I am not sure it is the best solution since you would need to create a SSIS service for each direction (from Oracle to SQL Server and from SQL Server to Oracle).

How to automatically store data from Oracle in SQL Server (according to a schedule)

Hello,
I'm new here, so sorry, if my question is too basic. However, maybe you have some advice, example, links, which could help me... I'm trying to find something helpfull for few days, but no results as for now.
I'm working in a distributed environment. I have a Oracle server hundreds of miles away and a MS SQL server close to me. I'm writing a application using Visual Web Developer 2008 Express. I need some data from Oracle. It's not worth to query the Oracle server every time i need some data from it. I'd prefer to run some Oracle queries once each night and store results in some local (SQL Server) tables. I assume, I should run queries through standard windows scheduler (Windows Server 2008). I have the basic connectivity - I can open Oracle Database from local Visual Studio.
The questions are:
How to write a query/procedure/function that would get data from Oracle and put them into a SQL Server table (possibly recreated before each query run)?
How can I run such a query from command line (or in other way run from scheduler)
What naming conventions are applicable? In VS I use something like //IP.IP.IP.IP/Name and a user with password.
Thanks for any help or advice.
Regards,
Matteo
I suggest you speak to the DBA's of the Oracle and SQL Server databases, as there may be other considerations you need to bear in mind. (Data Integrity, Security, ownership etc.)
One route you could follow would be to implement DTS (For older databases) or SSIS (for new versions of SQL Server) processes to copy the data across on the schedule you want. (This is pretty much what they were built for.)
How much data are we talking about?
If there is a small quantity that you need to transfer every day, you can write a stupid fetch and insert script in language of your choice.
You only need to search for better solutions if "sync" would take too much resources.
Thanks...
I'm the DBA for the SQL Server, which will serve only for my application. For Oracle I just want to read data and I have enough privileges and agreement with DBA's. Security, ownership and integrity are not an issue for now. I just need some technical advise how to get data from Oracle to MSSQL tables on a schedule.
I use MS SQL Server 2008 Express SP1. I'm very close to solve my problem - I have established connections and everything installed and working. I just don't know, how to run a query, which would get data from Oracle and put into MSSQL, on regular basis, without manual interaction.
I've some experience in programming, but not much in databases (except creating complex SQl queries). Therefore some example or links to detailed description would be helpful. I'm not sure about naming conventions, differences between procedures, functions and queries, command line options to run db automation procedures and so on. I'm also not sure, about which mechanisms or technologies are available in MS SQL Server 2008 Express edition.

Resources