Login or Sign Up to become a member!
LessThanDot Sit Logo

LessThanDot

Data Management

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot friendfeed Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Your profile

    Search

    XML Feeds

    Google Ads

    « SQL Server 2008 R2 SP1 CTP Available for downloadUse DDL Triggers To Track Table Changes »
    comments


    Yes, absolutely!  I strongly feel that all SQL Server Database Administrators and Developers should not only learn the basics and fundamental internals of Oracle, but should expand that to others such as DB2 and Sybase.  Why?  SQL Server is my mojo after all.  There shouldn’t be much reason to venture into Klingon territory and maybe start a database server uprising.  There actually is one major reason it should be a requirement to know more than SQL Server: Not everyone runs SQL Server. (Although they may want to)

    So today we are going to focus on some very basic Oracle setup steps and commands to get us started on merging SQL Server skills into Oracle skills.  By the end of this series, we should be better prepared when the word, “Oracle” comes up in meetings and project discussions.  We really can all get along in the SQL Server and Oracle world.

    Oracle for the SQL Server Pro wanting to learn

    Focusing on Oracle; many people that are working with SQL Server think they simply do not have the ability to get their hands on Oracle due to the HUGE (yes that was a HUGE) costs that come along with it.  SQL Server has Developer Edition for next to nothing at $40 or so dollars.  Then there is SQL Server Express which has just about all the internal engine functionality as all editions do.  That means we get the same internal speed of what SQL Server is capable of with something that is totally free.

    Ah, guess what?  If you didn’t already know, there is an Oracle Express.  Yes, it is free to download and use under the typical Oracle licensing agreements.  You also need to create an account that requires a little more information that most are willing to give up but I’ve never been hounded by anyone from Oracle after creating the account.

    I found out about Oracle Express many years ago.  I had the need to know more about Oracle so I went out and found the best, and cheapest, way I could accomplish that.  Once I had the basic abilities needed to interact with Oracle, the specific project was much less intimidating and was a success.

    For a SQL Server Professional, setting anything up in Oracle can be frustrating and confusing.  There is simply more to it than SQL Server.  Let’s face it; we’ve been spoiled with the installation process SQL Server comes with and the ease of configuration changes.  With that, let’s setup Oracle Express.  Then later, we’ll show a quick SQL Server Integration Services DTSX connection to that Oracle Express Instance and push some data into an Oracle database.

    Installing Oracle Express

    Some key notes that come with Oracle Express (much like SQL Express)

    Any use of the Oracle Database Express Edition is subject to the following limitations;

    1.  Express Edition is limited to a single instance on any server.
    2. Express Edition may be installed on a multiple CPU server, but may only be executed on one processor in any server.
    3. Express Edition may only be used to support up to 4GB of user data (not including Express Edition system data).
    4. Express Edition may use up to 1 GB RAM of available memory.

    Setting up Oracle Express

    If using Windows; there are two downloads you will need.  I picked the Oracle Universal and then, the pain we all know, the Oracle Client.  We’ll step over the basic setup process of Oracle Express Universal.  Essentially, you can click “Next” for every step with a basic Windows OS to get the install going.  Ensure that the port selections that Oracle installer wants to use are open on your machine.  You can alter them but it is far easier when learning this process to allow the ports and leave the defaults in the installer.

    After the installation is complete, launch the Home Page for your Oracle Express Instance to start working with Oracle. 

    Here is the first catch: you will be presented with a login screen requiring a user name and password.  During the installation you should have set the system administrator password.  Now, if you didn’t read that screen thoroughly or it was confusing about which password you were setting; the password was for SYS.  Use that login for this screen to get going.  So, username: SYS password: <one you created>

    Home Page

    The home page is straight forward.  The Administration area has with it the ability to set configurations for storage, memory down to managing database users.  The first thing to do is create a new user.  In my case, I created ONPNT.  Now when I log into the Home Page I don’t have to use SYS.

    Simple commands

    At this point Oracle Express is running and you can create tables and have all kinds of database fun.  Showing how we can interact with Oracle can be done from the SQL Commands page, which is located in the SQL area from the Home Page.   Let’s send a statement through the SQL Commands tool to show how it works.

    In the panel where you can add commands, enter “SELECT * FROM SYSTEM.HELP”.  This shows all the rows in the system help table. 

     

     

    Now create a table by running:

    CREATE TABLE imports

    (Col varchar2(500))

    The output is very similar to what you would see in SSMS.

     

     

    SQL*PLUS

    SQL*PLUS is a good way to get familiar with Oracle statements and commands.  It is very much like SQLCMD in the feel of the command prompt.  By default, SQL*PLUS was installed and is ready to use.  To open SQL*PLUS, go to All Programs and then into the Oracle Database 10g Express Edition folder.  In the list, select Run SQL Command Line. 

    By default, /nolog is set on the shortcut to SQL*PLUS.  This means that when opened, you will be forced to log into Oracle.  You can change this functionality but I highly recommend not leaving that hole in security and leaving /nolog in place.

    This is seen from the target of the shortcut:

    C:\oraclexe\app\oracle\product\10.2.0\server\BIN\sqlplus.exe /nolog

    Once SQL*PLUS is open, login with the account you created for yourself.  This is done by sending, “connect <username>” and then your password.  To show the definition of the table we created earlier, run the following command.

    DESCRIBE imports

     

     

    Installation and verification completed

    In this post we’ve installed Oracle Express and found out how we can connect and run commands.  So far we have done everything directly on Oracle though and to really utilize it, we need to set things up so SQL Server can connect to it.  This way we can learn how we may have to interact with Oracle as SQL Server Professionals.  The post that follows will go over setting up the Oracle Client and TNSNAMES.ora.  TNSNAMES is a SQL*NET configuration that will essentially be used to direct out communications to the Oracle Instance and database. 

     

    About the Author

    Ted Krueger is a SQL Server MVP and has been working in development and database administration for 13+ years. Specialties range from High Availability and Disaster / Recovery setup and testing methods down to custom assembly development for SQL Server Reporting Services. Ted blogs and is also one of the founders of LessThanDot.com technology community. Some of the articles focused on are Backup / Recovery, Security, SSIS and working on SQL Server and using all of the SQL Server features available to create stable and scalable database services. @onpnt
    Social SitingsTwitterLinkedInLTD RSS Feed
    1584 views
    Instapaper

    11 comments

    Comment from: hillbillyToad [Visitor] · http://www.thatjeffsmith.com
    hillbillyToad You can skip all this install stuff if you want, and simply download a pre-built image of 11gR2 with all the trim and dressings here for free:

    http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html
    04/21/11 @ 12:58
    Comment from: SQLDenis [Member] Email
    SQLDenis Jeff,

    Thanks for the link, I have been using Virtual Box for a long time and this will make messing around with Oracle much easier

    04/21/11 @ 13:12
    Comment from: SQLDenis [Member] Email
    SQLDenis Yes, SQL Server Pros should look at PostgreSQL, MySQL and even at the NoSQL solutions like MongoDB, RavenDB, Cassandra and others



    Me....I also have to deal with Sybase, Sybase IQ and their Replication Server...after working with Sybase tools I will never say anything bad about the SQL Server tooling
    04/21/11 @ 13:16
    Comment from: Ted Krueger (onpnt) [Member]
    Ted Krueger (onpnt) Don't forget FoxPro. I know you love you some FoxPro :-)

    Thanks, Jeff. I'm going to bring it down tonight at home. Probably going to change the direction of the next post to that. Seems much more useful!
    04/21/11 @ 13:18
    Comment from: Doug B [Visitor] Email · http://scalabilitydoug.blogspot.com
    Doug B The converse is true as well. Oracle/Sybase/MySQL (don't forget this freebie as well) professionals should "cross train" as well. I've been in multi-platform shops off and on since 2001. Another factor to consider is platform consolidation. In a multi-platform environment invariably some XO will decide that supporting them has a negative TCO and very well consider eliminating one of them.
    04/21/11 @ 13:24
    Comment from: Christiaan Baes (chrissie1) [Member]
    Christiaan Baes (chrissie1) How about Access and Excel?
    04/21/11 @ 14:16
    Comment from: SQLDenis [Member] Email
    SQLDenis
    How about Access and Excel?


    How about NOT!
    04/21/11 @ 14:19
    Comment from: SQLDenis [Member] Email
    SQLDenis You should strive to become a Polyglot, I remember reading in one of Ken Henderson's books that you should learn a new programming language every year. That is some good advice
    04/22/11 @ 07:00
    Comment from: Rob Farley [Visitor] · http://sqlblog.com/blogs/rob_farley
    Rob Farley Can't you just log in as scott tiger any more?
    04/22/11 @ 07:04
    Comment from: traingamer [Member] Email
    traingamer My first client server project was an Access (version 1.1) front end to a Sybase (version 4.9.x) back end.
    We had really primitive Sybase tools - we bought a tool called SQL Programmer (or SQL Miner or something - memory fails me) from a Canadian company to ease the pain of working with just a SQL command window.

    I learned Sybase coding (Triggers, Stored Procedures, etc) from a Belgian who had never previously taught the class in English. Those were the days.

    Each database server you learn makes you more valuable.
    04/22/11 @ 11:35
    Comment from: David Forck (thirster42) [Member]
    awesome post ted. maybe when i get a little bit more horsepower in this machine i'll check out the virtual box install.
    04/22/11 @ 15:16

    Leave a comment


    Your email address will not be revealed on this site.

    Your URL will be displayed.
    (Line breaks become <br />)
    (Name, email & website)
    (Allow users to contact you through a message form (your email will not be revealed.)