Tag Archive for 'Oracle'

Is the Read-Only attribute on OS Oracle data file a bug for Oracle 10g?

In today’s Oracle 10g training, we were asked to do a exercise on tablespace. I needed to make a tablespace Read Only and Read Write. The syntax was simple, just “ALTER TABLESPACE tbs READ ONLY (READ WRITE”. But while I was playing around, I thought what would happen on the data file after I turned on the Read Only with the tablespace. So I checked the data file (like c:\oracle\oradata\something.dbf) and found out it did not have Read-only attribute even after I altered the tablespace as Read Only. Interesting, it seems the Oracle did not look up the OS level when it deals with the tablespace read-only attributes.

To make things more interesting, I turned on the Read-Only attribute for this tablespace’s data file (Right Click, and check the Read-Only in the proprieties window). Then I went ahead to make more alterations on the tablespace, like increasing the extents size etc. The funny thing was I could see these system changes in Oracle through some dba_ views, but actually they did not take effective. Since I could not insert any new record to a full tablespace even I “successfully” increase the size in Oracle.

Not sure Oracle already aware this situation or not.

Related posts

How to display 0 in conditional [group by] report in Count() SQL Query

sql-injection-database Challenge:
Let me assume this: we have two tables, one is Regions table with all region information (East, West, etc. ) and we have another table with Sales information. Now, we need to display a report with region information and how many sales conducted in each region with greater than $1000 value in each sale. It sounds simple at the beginning since a Count(*) with Group By can do this trick.

But what if I need to still show the region which does not have any sales greater than $1000 on the report? Using Count(*) itself in the query, the region without any sales greater than $1000 will not show in the query result, period.

Continue reading ‘How to display 0 in conditional [group by] report in Count() SQL Query’

Related posts

How easily to move Oracle data from one machine to another

Oracle LogoOk, finished the installation of Oracle 9i on the new machine. It is time for me to move all existing data from my old machine to this new server. I do not want to create all stuffs from the scratch, and do not want to use exp/imp utility either. I thought there should be a easy way to do so. Since I am a web designer, I will give such question to the DBA in my team.

It turns out there is an easy way, yeah!

Here are some steps I did to move all data from the old machine to new machine with the help of my DBA co-worker. Continue reading ‘How easily to move Oracle data from one machine to another’

Related posts

“Windows cannot open this program since it has been disabled” error message when I try to install the Oracle9i Release 2 on my Windows Server 2003, Web Edition-based computer

Today I tried to install Oracle 9i on my Windows 2003 Web Edition server with 3 installation CDs. First I did not get the auto-run working when the disc 1 inserted. So I browsed to the CD driver and clicked the autorun.exe file under the autorun folder manually. But I got an error message window indicating that “Windows cannot open this program since it has been disabled“.

This is weird. I thought it might be my CD-ROM problem, so I move these files to my hard-disk. Re-clicked again, the same error. I tried the setup.exe too, and got the same error. Tried the same CD on the Windows XP pro machine, ran without any problem.

Continue reading ‘“Windows cannot open this program since it has been disabled” error message when I try to install the Oracle9i Release 2 on my Windows Server 2003, Web Edition-based computer’

Related posts