|
You might ask the oracle...
|
|
|
|
|
They should've called it Miracle instead.
It's a Miracle anyone can get work done with this crap
I'm sure it'll get better as I figure this out...
|
|
|
|
|
Sander Rossel wrote: Any "surviving Oracle for SQL Server devs" tips or guides?
Tips and guides[^]
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Been using oracle at work since the last 7 months, and I feel satisfied.
No idea about
Sander Rossel wrote: "surviving Oracle for SQL Server devs"
I developed the database of my final year project in SQL server, it was pretty good. But haven't used SQL server on professional level yet.
But yeah it's very difficult to search for the solution of oracle problems on internet, you rarely find anything except the hell lengthy and descriptive oracle documentation, which you just damn hate to read
|
|
|
|
|
I moved from SQL Server to Oracle for around 4 years and am back on SQL Server now.
There are differences although the differences are not that big nowadays as SQL Server has come closer to Oracle.
The hardest part for me was discovering that many Oracle developers tend to have a preference for non-ANSI joins.
Get yourself a book on PL/SQL clicketty[^] and you should be fine.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
Sander Rossel wrote: I think the PL in PL/SQL means Oracle outsourced the language to some cheap Polish labor... (no offence to Polish people)
aaaah! so thats what PL stands for!
#region(start signature)
Life's like a nose, you've got to get out of it whats in it!
#endregion
|
|
|
|
|
I actually prefer Oracle to SQL Server, hands down. I just wish Oracle was able to integrate with Visual Studio at the same level SQL Server does.
Anyhow, PL SQL is awesome stuff when done correctly, and used correctly.
BTW, you can use Entity Framework with Oracle, you just need to install the Visual Studio tools for Oracle.
|
|
|
|
|
For years I used Oracle and SQL Server interchangeably, there are slight differences in certain things (like wildcard character), but otherwise, I really like Oracle.
I strongly recommend Toad[^] for a decent tool to work with Oracle.
Marc
|
|
|
|
|
+1 for Toad - invaluable !
PooperPig - Coming Soon
|
|
|
|
|
Yeah, I looked at Toad, but it's not cheap...
My company has their own in-house editor of which they're very proud, so there's no way they're going to buy some external editor.
I didn't like the in-house one though, so I downloaded the free Oracle SQL Developer[^] which is a step in the right direction
|
|
|
|
|
Or, you may want to have a look at PL/SQL Developer by dutch AllRound Automation. I have been using it for years and I am very pleased with it. Doesn't have as many features as Toad, but then it is generally faster to use.
http://allroundautomations.com/[^]
|
|
|
|
|
|
I'm not doing anything Unix and I try to avoid command lines as much as possible on any OS
|
|
|
|
|
Congratulations!
You are talking job security well into your 80's!
|
|
|
|
|
Vivic wrote: job security well into your 80's Might as well do some COBOL then
|
|
|
|
|
But then you will not be stark raving mad!
|
|
|
|
|
Sorry, I have no advice but have read some of your articles. I have no doubt you'll pick it up quickly! Great opportunity to broaden your skillset. Have fun!
"Go forth into the source" - Neal Morse
|
|
|
|
|
|
It's strange you worry about T-SQL/PL-SQL at all! It's atavism from 70-th. Nowadays application server does it much better, so on database side you leave just tables and SQL requests - they are "almost compatible" across all databases.
|
|
|
|
|
Yeah, but how to make the tables, procedures, etc. It's quite a difference.
Oracle has procedures which can't return a result, only output parameters, while in SQL Server a procedure is like Oracle's procedure and function in one and SQL Servers function is quite different from the Oracle function... etc. etc.
And I just found out Oracle doesn't know the bit/boolean type...
And while an application server might do it better a database will generally do it faster
|
|
|
|
|
and once you have learned Oracle PL/SQL it will be easy for you to code Postgres plpgsql - almost identical .
|
|
|
|
|
Ask for a pay raise/rise. If your organization/organisation can afford Oracle, they are obviously swimming in cash. My organization could save money by moving in the other direction to PostgreSQL, but fat chance of that.
|
|
|
|
|
As a supplier of Oracle it costs us nothing.
It's our customers who can afford it
|
|
|
|
|
Sander,
It is much harder to go the other way for me.
Utter shock when my coworker hit a breakpoint, and the SQL Server locked up until he continued.
I can HONESTLY SAY I have never seen Oracle do that. Report blocks because user is editing a record. Ouch.
Okay, so after MANY MANY years of doing Oracle. Get a decent tool to work with Oracle.
I use Toad, SQL Navigator (both too expensive), and recently: DevArt dbForge Studio for Oracle.
Straight up, SQL Server is easier to backup/restore since it is built into the tool.
Integration to VS is not as nice.
But with dbForge, you should be able to navigate the DB and write the code you want.
They have a free version! Play with it. The paid version is well worth it (I Pay).
I put the free version out on servers I maintain for quick access.
Oracle suffers because it is NOT a user-driven environment. It was designed for SysAdmins,
and DBAs who had been trained to use it properly.
PL/SQL does not have many limitations. And the best part. I have ported the entire DB from Windows 32 bit to a Linux 64 Bit, without changing a single line of PL/SQL. For many years, PL/SQL was so stable that testing our apps in new versions requires ZERO changes. Just import the DB. Done. (BTW, I feel that importing an OLD DB into a new version of Oracle is much more transparent/easier than learning how to do it in MSSQL Server)
BTW, you lose #TempTables. this sucks, but Oracle supports nested SQL in ways that I never really needed the #TempTables:
Select A., B. from (SELECT something from XXX) A, (SELECT other from ZZZ) B where A.X=B.X;
I have nested them about 7 deep, never had an issue.
Read: AskTom.Oracle.Com
Just about Every question asked is answered in a strict Engineering Approach.
Also, you will learn how to see the internals of what the query does, how, why, and where it is slow.
Google most of your answers with Oracle as the first string: "Oracle create table as"
And you will find a ton of references. CTAS is one of the differences between oracle and T-SQL.
I prefer: Create Table XYZ as Select * from ...;
You must select from a table. There is no "Select 'Hello'" in Oracle.
you do "Select 'Hello' from Dual' (Dual is a simple table with a dummy column and only one row).
You will have more powerful functions and procedures than you get inside of T-SQL (IMO).
Functions can cache results for speed. be tied to table, so updates on a table clear the cache!!!
In general, I feel the difference is:
- Oracle was Designed for Large Databases, with DBAs (sometimes multiple), with an eye on SPEED,
and GUARANTEEING no key violations, and supporting thousands of users with low impact on each other
- SQL Server was gradually upgraded to add features, and is MUCH easier to manage, but behaves more like a desktop DB. I have seen serious issues with scaling, and witnessed duplicate primary keys!
We have single Oracle Boxes that search C1 LIKE 'XXX%' or C2 LIKE 'XXX%'...
Across 60 million rows of data, and average about 8-10ms with 5ms - 20ms response.
WHILE users are deleting 200,000 rows and inserting 200,000 rows at the same time!!!
(20-30% of the DB is completed deleted, re-inserted (ie, updated) every day while being used)
With FULLY CONSISTENT Queries (no dirty reads).
I have NEVER been able to get that kind of performance out of MSSQL. In fact, this started as an MSSQL DB many years ago, and it could not keep up. Had to use dirty reads, which gave "funky" results, and still could not keep up.
Finally, this is REALLY important to understand:
oracle uses UNDO and REDO to give you a CONSISTENT View @ a specific time (the time you ran your query). NOTHING that happens to the DB after you open a query impacts your query. Even dropping the table!
Select * from t; -- Session 1, returns 10 rows
truncate table t; -- Session 2: has no affect on the query, it still has 10 rows to loop over!
drop table t; -- Session 3; has no affect on the query, it still has 10 rows to loop over!
Oracle uses the UNDO/REDO data to make YOUR SESSION (ie, every session) see only committed data that was visible at the time the query was open. This is REALLY AWESOME.
The tools for debugging Oracle exist. Spend some time, play with the tools. Tom Kyte has a couple of books, check them out on Amazon. I think one or more of them may be available as a PDF.
If you ask SPECIFIC questions, I will be willing to share what I know. TOAD is the most popular tool among the professionals, but I find it WAY over priced (I consult, I paid $1,500 for SQL Navigator many years ago, and I loved it, but I felt crippled without it. The choice to go to DevArt was based on having a Free Version that worked the same with fewer features that could be on the Servers I have to support).
I believe Oracle is "harder" to work with, but more accurately reflects how things should be done. AutoIncrement keys are great in a single user DB. Oracles Sequences make a LOT more sense. especially when you have to scale to massive levels.
HTH
|
|
|
|
|
Wow, thanks for the really long answer and all the recommendations.
I use SQL Developer as my main tool now. It makes so much more sense than the internal tool I've been using!
I'll just be creating some small tables and procedures for now, so no query analyzing, handling massive real-time data and other hard stuff.
I did run into the mandatory FROM TABLE stuff, didn't really need it though so I didn't bother with it. Good to know it's FROM DUAL
Also found out Oracle doesn't know the bit/boolean data type (although PL/SQL does)
I've noticed Oracle has A LOT of features I don't know yet. Seems I'll need to read some Oracle book if I get to do more with it
|
|
|
|
|