1. Create a user, assign the Create permission to the user, and allocate the table space:
Create user Scott identified by Tiger;
Grant create session to Scott;
Grant CREATE table to Scott;
Alter user Scott default tablespace users;
Alter user Scott quota 512M on users;
2. Find all table names for which the user specified by the Where condition is owner:
Select owner, table_name from Dba_tables where owner= ' SCOTT ';
3. Create an index of the specified parameters on a specified table.
CREATE INDEX ind_test on test (x) tablespace users Storage
(Initial 2K
Next 2K
Minextents 1
Maxextents 100
Pctincrease 0);
4. View the name of the index for the specified user owner:
Select Index_name, table_owner from dba_indexes where owner= ' SCOTT ';
5. View all index information on the specified table:
Select Index_owner, Index_name, column_name from Dba_ind_columns where table_name= ' SCOTT ';
6. Create a sequence:
Create S
Incremen
Start WI
MaxValue
Cycle;
7. Use sequence:
INSERT INTO Scott.test
VALUES (Staff_id.nextval,
' Test ');
8. View table Space information:
SELECT * from Dba_tablespaces;
9. View current Online users:
Select username from v$session;
How can I compile and link my application?
Answer:
Compiling and linking are very platform specific. Your system-specific Oracle
Documentation has instructions on I to link a pro*c/c++ application. On UNIX
Systems, there is a makefile called Proc.mk in the demo directory. To link, say, the
Demo program sample1.pc, your would enter the command line
Make-f proc.mk Sample1
If you need the special Precompiler options, you can run pro*c/c++ separately,
Then do the make. Or, you can create your own custom makefile. For example, if
Your program contains embedded Pl/sql code, can enter
Proc Cv_demo Userid=scott/tiger Sqlcheck=semantics
Make-f proc.mk Cv_demo
On the VMS systems, there is a script called Lnproc the use to link your
pro*c/c++ applications.