Max_enabled_roles parameter is deprecated on Oracle10g. This parameter is included only for backward compatibility.
This parameter is specified in Init.ora file to limit the maximum number of roles a user can have enabled.
Share the Knowledge even if it is one verse - You earn the rewards as long as the knowledge from which the people benefit.
Wednesday, 30 September 2009
Friday, 25 September 2009
ftp files using shell script or windows batch file
How to ftp files using shell script or windows batch file?
The below script helps to ftp file from remote server to the local machine. You can ftp using the below script on unix and windows.
To ftp from windows
Save the below code to a file ftpfile.bat and execute the batch script. Change the directory path of the file, username, password and remote server name on the script.
@echo off
echo user oracle> ftpftp.dat
echo password>> ftpftp.dat
echo bin>> ftpftp.dat
echo cd /u01/oradata>>ftpftp.dat
echo lc I:\data>>ftpftp.dat
echo get fileabc.dmp>> ftpftp.dat
echo bye>> ftpftp.dat
ftp -n -s:ftpftp.dat
To ftp from Unix
Save the above code to a file ftpfile.sh and execute the script. Change the directory path of the file, username, password and remote server name on the script.
The below script helps to ftp file from remote server to the local machine. You can ftp using the below script on unix and windows.
To ftp from windows
Save the below code to a file ftpfile.bat and execute the batch script. Change the directory path of the file, username, password and remote server name on the script.
@echo off
echo user oracle> ftpftp.dat
echo password>> ftpftp.dat
echo bin>> ftpftp.dat
echo cd /u01/oradata>>ftpftp.dat
echo lc I:\data>>ftpftp.dat
echo get fileabc.dmp>> ftpftp.dat
echo bye>> ftpftp.dat
ftp -n -s:ftpftp.dat
To ftp from Unix
Save the above code to a file ftpfile.sh and execute the script. Change the directory path of the file, username, password and remote server name on the script.
delete or drop a database
How to delete / drop a database?
To drop a database from batch file
echo connect / as sysdba >xyz.tmp
echo shutdown abort; >>xyz.tmp
echo startup mount exclusive restrict; >>xyz.tmp
echo drop database; >>xyz.tmp
echo exit; >>xyz.tmp;
sqlplus.exe /nolog @xyz.tmp
del xyz.tmp
To drop a database from shell script
echo connect / as sysdba >xyz.tmp
echo shutdown abort; >>xyz.tmp
echo startup mount exclusive restrict; >>xyz.tmp
echo drop database; >>xyz.tmp
echo exit; >>xyz.tmp;
sqlplus.exe /nolog @xyz.tmp
rm xyz.tmp
To drop a database from batch file
echo connect / as sysdba >xyz.tmp
echo shutdown abort; >>xyz.tmp
echo startup mount exclusive restrict; >>xyz.tmp
echo drop database; >>xyz.tmp
echo exit; >>xyz.tmp;
sqlplus.exe /nolog @xyz.tmp
del xyz.tmp
To drop a database from shell script
echo connect / as sysdba >xyz.tmp
echo shutdown abort; >>xyz.tmp
echo startup mount exclusive restrict; >>xyz.tmp
echo drop database; >>xyz.tmp
echo exit; >>xyz.tmp;
sqlplus.exe /nolog @xyz.tmp
rm xyz.tmp
consistent database export using datapump
How to take consistent database export using datapump?
expdp system/xxxx@TESTDB directory=TEST_DIR DUMPFILE=TEST_expfull.dmp LOGFILE=expfull.log FLASHBACK_TIME=\"TO_TIMESTAMP\(to_char\(sysdate,\'DD-MM-YYYY HH24:MI:SS\'\),\'DD-MM-YYYY HH24:MI:SS\'\)\"
expdp system/xxxx@TESTDB directory=TEST_DIR DUMPFILE=TEST_expfull.dmp LOGFILE=expfull.log FLASHBACK_TIME=\"TO_TIMESTAMP\(to_char\(sysdate,\'DD-MM-YYYY HH24:MI:SS\'\),\'DD-MM-YYYY HH24:MI:SS\'\)\"
FRM-92050: Failed to connect to the server
FRM-92050: Failed to connect to the server:/forms/lservlet-1 java.io.IOException:Server returned HTTP response code 500 for URL
or 500 Internal server error "Too many open files"
Many users received this FRM-92050: Failed to connect to the server:/forms/lservlet-1 error from yesterday. The error appeared on and off.
This error seems to be a bug.
The cause of the error is as given below
The form runtime does not release the configuration files like environment files. The config files are locked and the new connections are trying to open these files at the same time. This causes the error "Too many open files"
Solution:
Oracle suggests to set a hidden parameter(undocumented parameter) for this bug.
"Waittime" parameter sets the time in milliseconds for the Forms applet to wait before retrying with the request. The default value (500 mS) should suit most deployments. How ever if your windows server cannot cope with the load then increase the value of this parameter. eg: 5000 milliseconds(5 seconds).
Metalink reference - Doc ID: 390176.1
To set the parameter on the OAS,
1.Go to $ORACLE_HOME\j2ee\OC4J_BI_Forms\applications\formsapp\formsweb\WEB-INF\ directory and open web.xml file in notepad and add the parameter.
2. Save the file and open the formsweb.cfg file and add WaitTime=5000
3. Save and restart the OC4J_BI_FORMS on the Oracle Application Server.
or 500 Internal server error "Too many open files"
Many users received this FRM-92050: Failed to connect to the server:/forms/lservlet-1 error from yesterday. The error appeared on and off.
This error seems to be a bug.
The cause of the error is as given below
The form runtime does not release the configuration files like environment files. The config files are locked and the new connections are trying to open these files at the same time. This causes the error "Too many open files"
Solution:
Oracle suggests to set a hidden parameter(undocumented parameter) for this bug.
"Waittime" parameter sets the time in milliseconds for the Forms applet to wait before retrying with the request. The default value (500 mS) should suit most deployments. How ever if your windows server cannot cope with the load then increase the value of this parameter. eg: 5000 milliseconds(5 seconds).
Metalink reference - Doc ID: 390176.1
To set the parameter on the OAS,
1.Go to $ORACLE_HOME\j2ee\OC4J_BI_Forms\applications\formsapp\formsweb\WEB-INF\ directory and open web.xml file in notepad and add the parameter.
2. Save the file and open the formsweb.cfg file and add WaitTime=5000
3. Save and restart the OC4J_BI_FORMS on the Oracle Application Server.
Gather schema stats
Gather schema stats
exec dbms_stats.gather_schema_stats (ownname => 'SCOTT', cascade =>true, estimate_percent => dbms_stats.auto_sample_size);
where ownname is the schema name and cascade +> true will include indexes.
Gather table stats
exec dbms_stats.gather_table_stats( -
ownname => 'SCOTT', -
tabname => 'EMP', -
estimate_percent => 100, -
method_opt => 'for all columns size skewonly', -
cascade => true -
);
exec dbms_stats.gather_schema_stats (ownname => 'SCOTT', cascade =>true, estimate_percent => dbms_stats.auto_sample_size);
where ownname is the schema name and cascade +> true will include indexes.
Gather table stats
exec dbms_stats.gather_table_stats( -
ownname => 'SCOTT', -
tabname => 'EMP', -
estimate_percent => 100, -
method_opt => 'for all columns size skewonly', -
cascade => true -
);
FRM-41213: Unable to connect to the Report server
FRM-41213: Unable to connect to the Report server
If the form received the FRM-41213 error, then check the report server
http://oasserver:7778/reports/rwservlet/showjobs?server=reportservername
If the report showed the REP_56055: Exceed max connections allowed: 20 error message then
Increase the maxconnect parameter value appropriately on the console, report server -> edit configuration
If the form received the FRM-41213 error, then check the report server
http://oasserver:7778/reports/rwservlet/showjobs?server=reportservername
If the report showed the REP_56055: Exceed max connections allowed: 20 error message then
Increase the maxconnect parameter value appropriately on the console, report server -> edit configuration
Subscribe to:
Posts (Atom)