Oracle passwords - changing, expiring and locking usersOracle Tips by Steve Karam, OCM |
See these important notes on how to un-lock a database and make_a password_not_expire.
|
Oracle passwords - changing, expiring and locking usersOracle Tips by Steve Karam, OCM |
See these important notes on how to un-lock a database and make_a password_not_expire.
|
2
|
Is there a way to configure the directory SQL Developer uses to save SQL scripts?
When I do ...
File, New, SQL File ... the directory is always set to the \AppData\Roaming\ for my user.
I'd like to set the default to a directory in my dev source code tree.
| |||
When you go to save your sql file you can change where the save defaults to. Change it in Tools>Preferences>Database>Worksheet Parameters. You can browse to a new location under "Select default path to look for scripts"
Can also change the Export Data so that it defaults to somewhere else. Go to Tools>Preferences>Database>Export and Browse to the location you want to export to for "Directory"
This used to annoy me bad before I changed it. Now all my saves and exports default to a folder I actually use.
| ||||
Found it ...
In the
Choose Directory dialog, the left hand side has a number of commonly used short cuts, e.g. Desktop, Documents, but you can also have your own directories in there | |||
There is a post about this in OTN, and AlexAnd's solution opens the specified folder when I do File => Open.
The post is @
AlexAnd is saying that locate "\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf" and simply add "AddVMOption -Dide.user.dir=" (where " is the full folder path that you like to use) to that file.
The disadvantage of this solution is that it will also move your settings folders to the specified folder (for me it was about 34MB), I use drop box to keep my queries so that is a wasted space.
|
$ cd $ORACLE_HOME/sysman/emd (where $ORACLE_HOME is the Agent's home)2. Once you have created the targets.xml file, view the Agent's
$ touch targets.xml.
$ORACLE_HOME/sysman/config/emd.properties file.Copy the values for:
agentSeed=12345 EMD_URL=http://hostname.oracle.com:9876/emd/main3. Manually update the new targets.xml and add the following entries to the file following
<targets agent_seed="agentseed from emd.properties">For example:
<target name="hostname and port from emd.properrties EMD_URL" type="oracle_emd">
<target name="hostname as it appears in the emd_url" type="host">
</targets>
<targets agent_seed="agentseed from emd.properties">
<target type="oracle_emd" name="hostname and port from emd.properties EMD_URL">
<target type="host" name="hostname as it appears in the emd_url">
</targets>
<targets agent_seed="12345">
<target type="oracle_emd" name="hostname.domain.com:port">
<target type="host" name="hostname.domain.com">
</targets>
<targets agent_seed="12345">
<target name="hostname.domain.com:port" type="oracle_emd">
<target name="hostname.domain.com" type="host">
</targets>
$ORACLE_HOME set$ORACLE_HOME/bin in $PATHb. The agentca utility is expecting the oraInst.loc to be located in the root of the Agent's $ORACLE_HOME
agentca -d
SQL Error: ORA-01578: ORACLE data block corrupted (file # 8, block # 61663)ORA-01110: data file 8: '/home/oracle/app/oracle/oradata/orcl/HYP_DM_TBL_3.DBF'
select owner, segment_type, segment_namefrom dba_extentswhere file_id=8 and 61663 between block_id and block_id+blocks-1;Located the ROWS that were good with this command:
Anything more would error with this:
select * from entity_Hour_fact where ROWNUM <2127000 order by 2;
SQL Error: ORA-01578: ORACLE data block corrupted (file # 8, block # 61663)ORA-01110: data file 8: '/home/oracle/app/oracle/oradata/orcl/HYP_DM_TBL_3.DBF'01578. 00000 - "ORACLE data block corrupted (file # %s, block # %s)" *Cause: The data block indicated was corrupt. This was a physical corruption, also called a media corruption. The cause is unknown but is most likely external to the database. If ORA-26040 is also signaled, the corruption is due to NOLOGGING or UNRECOVERABLE operations.Will copy the old file to a new filename:
### The error may exist in com/hyperformix/pb/server/mapper/IAnalyzeMapper.java (best guess)
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: call DATAMART_LIB.Analyze_pb_objects()
### Cause: java.sql.SQLException:
ORA-01578: ORACLE data block corrupted (file # 2, block # 35170)
ORA-01110: data file 2: '/home/oracle/app/oracle/oradata/orcl/sysaux01.dbf'----
ORA-06512: at "SYS.DBMS_STATS", line 20337
ORA-06512: at "SYS.DBMS_STATS", line 20360
ORA-06512: at "HYP_CCC9.DATAMART_LIB", line 2472
select owner, segment_type, segment_nameThis returns:
from dba_extents
where file_id=2 and 35170 between block_id and block_id+blocks-1;
Using this I found that it was in the SYSAUX tablespace.OWNER SEGMENT_TYPE SEGMENT_NAME
------------------------------ ------------------ -------------------------------------------------------
SYS TABLE WRI$_OPTSTAT_HISTGRM_HSTRY_BAD
select * from SYS.WRI$_OPTSTAT_HISTGRM_HISTORY_ where rownum < 410000 order by 3;
CREATE TABLE SYS.WRI$_OPTSTAT_HISTGRM_HISTORY TABLESPACE SYSAUX1 STORAGE ( INITIAL 500m NEXT 50m maxextents unlimited ) parallel ( degree 4 ) ASSELECT * FROM SYS.WRI$_OPTSTAT_HISTGRM_HISTORY_ WHERE rownum < 410000 ORDER BY 3;These are the indexes:
CREATE INDEX "SYS"."I_WRI$_OPTSTAT_H_OBJ#_ICOL#_ST" ON "SYS"."WRI$_OPTSTAT_HISTGRM_HISTORY" ("OBJ#", "INTCOL#", SYS_EXTRACT_UTC("SAVTIME"), "COLNAME") PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "SYSAUX1" ;I did NOT delete the original table space I just kept it and renamed it to:
CREATE INDEX "SYS"."I_WRI$_OPTSTAT_H_ST" ON "SYS"."WRI$_OPTSTAT_HISTGRM_HISTORY" (SYS_EXTRACT_UTC("SAVTIME")) PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "SYSAUX1" ;
alter table "SYS"."WRI$_OPTSTAT_HISTGRM_HISTORY_" rename to WRI$_OPTSTAT_HISTGRM_HSTRY_BAD;
Appdata\roaming. – surfasb Mar 6 '12 at 14:57