Search This Blog

Thursday, August 29, 2013

Proxy for using internet

go to IE->tools->Internet options->connections->LAN settings->tick automatic configuration script->type in the address as http://autoproxy.xxxxxxxxxxxxxx.com/->ok->ok

Saturday, June 15, 2013

PARALLEL parameter in datapump

Set parallel parameter 2 times the cpu
eg if cpu=2, set parallel=4 for maximum performance

expdp system/pass schemas=scott dumpfile=scott%u.dmp parallel=4

impdp system/pass schemas=scott dumpfile=scott%u.dmp parallel=4





Thursday, May 30, 2013

Find temporary tablespace usage/size

SELECT   A.tablespace_name tablespace, D.mb_total,
         SUM (A.used_blocks * D.block_size) / 1024 / 1024 mb_used,
         D.mb_total - SUM (A.used_blocks * D.block_size) / 1024 / 1024 mb_free
FROM     v$sort_segment A,
         (
         SELECT   B.name, C.block_size, SUM (C.bytes) / 1024 / 1024 mb_total
         FROM     v$tablespace B, v$tempfile C
         WHERE    B.ts#= C.ts#
         GROUP BY B.name, C.block_size
         ) D
WHERE    A.tablespace_name = D.name
GROUP by A.tablespace_name, D.mb_total;

Tuesday, May 7, 2013

Register the database connection in dbartisan 9.1.1 (XE3)

click on oracle servers
register
choose oracle
click next
enter host, port, service_name, instance_name, datasource_name
click on next
enter login id and password
test connection
no need to have local tnsnames.ora file in the OS level

Monday, April 15, 2013

Add a new printer in windows 7

start
control panel
devices and printers
add a printer
add a network, wireless or bluetooth printer
select the printer name
finish

Monday, February 25, 2013

Export/Import table using database link

Source db - db1 from where you want to pull the data
Destination db - db2 to where you want to store the data

In db2,

SQL> create public database link DBLINK connect to BIREPORTING identified by pass$word using 'PROD_DB';

Database link created.

where

DBLINK is the anonymous name you would be giving to the database link
BIREPORTING is the username in db1
pass$word is the password for the username in db1
PROD_DB is the net service name available in db1



SQL> CREATE TABLE BIREPORTING.CHANNEL AS SELECT * FROM REPOSITORY.CHANNEL@DBLINK;

Table created.

SQL> COMMIT;

Commit complete.

Export/Import rows using database link

Source db - db1 from where you want to pull the data
Destination db - db2 to where you want to store the data

In db2,

SQL> create public database link DBLINK connect to BIREPORTING identified by pass$word using 'PROD_DB';

Database link created.

where

DBLINK is the anonymous name you would be giving to the database link
BIREPORTING is the username in db1
pass$word is the password for the username in db1
PROD_DB is the net service name available in db1



SQL> INSERT INTO BIREPORTING.CHANNEL SELECT * FROM REPOSITORY.CHANNEL@DBLINK;

99 rows created.

SQL> COMMIT;

Commit complete.

where

BIREPORTING.CHANNEL belongs to db2
REPOSITORY.CHANNEL belongs to db1


Friday, February 22, 2013

Does the user has the privilege to export/import?


To export full database using data pump user must have EXP_FULL_DATABASE role or dba role and to import full database using data pump user must have IMP_FULL_DATABASE or dba role.
In order to see whether user has these privilege or not you can query,

SQL>SET lines 100 
COL privilege FOR a50 
SELECT grantee, granted_role, default_role 
FROM dba_role_privs 
WHERE granted_role IN ('DBA', 'EXP_FULL_DATABASE', 'IMP_FULL_DATABASE') 
ORDER BY 1,2; 

Sunday, February 17, 2013