Systems and Sys are users which almost belong to the same family. Those users are automatically created when you create Oracle database. Since SYS own the data dictionary he is more powerful than the SYSTEM. Also SYS do have sysdba privileges which system doesn’t have. Above reasons are make it possible to SYS become more powerful than SYSTEM (You will see this in practical at the end of this article and by doing practical). If you tried to shutdown the database from ordinary user you may ended up with insufficient privileges error. But if you connect as sysdba this shutdown is possible. But need to remember that SYSDBA is not a role. It is a system privilege
There are some cases that we need to export data table or specific query result to files. In that case I have seen most of developers using 3rd party language to create UI and text files. But if you really analyze the process you will see that it will kill your network and computer resources in significant amount.
But in oracle data base provide number of ways to export data to physical files. Nothing to wonder… yes oracle can access your local file system to create or modify the files. In this article we are going to discuss about UTL_FILE concept.
With the UTL_FILE package, PL/SQL programs can read and write operating system text files. UTL_FILE provides a restricted version of operating system stream file I/O. it is very useful when you need to create log files in database level.
Let’s see the example
First you need to create a directory in your server. To that you need to have create directory permit ion. If you don’t have permit ion then you need to logging as system and execute following command. Assume your user name is orex
grant create any directory to orex
and now login as orex and execute following command
create directory testdir as 'd:\oraclefiles'
now you need yo again login as system and grant read write permition
grant read,write on directory testdir to orex;
basic operations are finished. Now we are ready to generate file
you can use following script. however you need to customize it to your enviorment.
Remote / bulk installation is not an issue since we are using redhat or its flavors such as centOS. But in ubuntu there is no direct way to install ubuntu via network since most of us use live CDs to install ubuntu. Do you know the network installation is also not much of a painful task?
What we going to do.
To setup the remote installation server you need to setup boot server / DHCP to serve the boot request of client. If you already have DHCP server you just want to setup boot server.
How it works
When client try to boot via the network, it will send the boot request.
The DHCP server will serve that request and setup the IP configurations for the clients PC according to the DHCP server configurations.
The boot file (PXE) location for the client is determined by the “filename” of the DHCP server configuration.
From the client, it will direct to that boot server path and will be booted accordingly.
In this tutorial I used tftpd as a boot server. During the installation it will ask mirror. We are going to install apache and keep the installation files (CD) in the http://localhost. First we have to download ubuntu cd from http://releases.ubuntu.com/9.04/ubuntu-9.04-alternate-i386.iso ,since we are using ubuntu 9.04
ජීවිතය කියන්නෙ සුන්දර දෙයක් කියන එක හැමෝම කියන කථාවක්. ඒත් ජීවත් වෙනව කියන්නෙ සතුටයි දුකයි අතරෙ දෝලනය වන දෙයක්. අපේ ජීවිත ගත වෙන්නෙ මේ හැඟීම් දෙක අතරෙ. සතුට ගැන අපට ගැටළුවක් නෑ. ඒත් අපට ප්රශ්නෙ තියෙන්නෙ අපට දුක හිතෙන එක. මිනිස්සුන්ට දුක හිතෙන්නෙ ඇයි....? මේක කාලයක් තිස්සෙ උත්තර හොයන ප්රශ්නයක්. 2යි 3යි එකතු කරාම උත්තරය කීයද කියල ඇහුවොත් දෙන්න තියෙන්නෙ එක උත්තරයයි. ඒත් අපේ ප්රශ්නයට දෙන්න එහෙම හරිම උත්තරයක් නෑ. මොකද දුක හිතීම විවිධ හේතූන් නිසා වෙන්න පුළුවන් හින්ද. අපි සරලවම කාටත් තේරෙන්න කිවුවොත් මිනිස්සුන්ට දුක හිතෙන්නෙ තමන් බලාපොරොත්තු වෙච්ච දෙයක් සිදු නොවුනම. නැත්නම් බලාපොරොත්තු නොවුන දෙයක් සිදුවුනාම. හැබැයි බලාපොරොත්තු නොවුන දෙයක් සිදුවුණා කියන එක ඇතුලෙ සතුට තියෙන්නත් පුළුවන්. ඒත් ප්රාර්ථනා කර දෙයක් සිද්ධ නොවෙන හැම මොහොතකම වගේ අපිට දැනෙන්නෙ දුකක්. මෙතනදී අමතක කරන්න බෑ මේක සාමාන්ය අර්ථ දැක්වීමක් විතරයි කියන එක. මොකද මානසික අවපීඩනය (depression) වගේ රෝගී තත්වයන්ගෙන් පීඩා විදින අය අහේතුකවම දුක කියන හැගීමෙන් පෙළෙනව. ඒත් ඒක රෝගී තත්වයක් නිසා මෙතනදී ඒක අමතක කරන්න පුළුවන්.