Pl/sql using enterprise manager or toad
A basic question : When it comes to writing PL/SQL code, testing, debugging and performance tuning(the pl/sql code itself), which of the tools are better (The OEM or would it be toad). I am looking for advantages that either or both of them have. Any documentation or tip on this would be great...
Note: I am not looking forward in just monitoring and tuning the sql statements that the pl/sql code has(which I would, anyways), but wanted to explore a possibility if either of the above tools can tell me something at a pl/sql level... like... this pl/sql code performs well, whereas the other one doesn't... This is the idea I have...
Thanks
The best tool for writing PL/SQL is that gray stuff between your ears.
A s/w tool can not take poorly designed and written PL/SQL code and make it "better".
As for determining how well the code performs - that also need gray matter and using tools like DBMS_PROFILE, execution plans, SQL Trace/TKProf.
I write lot of code. In Linux Vi (aka vim). Using SQL*Plus. This code, as code, is no worse (or better) than code written in TOAD, SQL*Developer, or whatever else.
It is not about the tool. It is how about one uses that tool. It was Van Gogh that created master pieces. Not his paint and brushes.
Similar Messages
-
How to delete/drop all the tables from SQL Server Database without using Enterprise Manager?
I tried using DROP Tables, Truncate Database, Delete and many more but it is not working. I want to delete all tables using Query Analyzer, i.e. through SQL Query.
Please help me out in this concern.
Nishith ShahInformative thread indeed. Wish I saw it early enough. Managed to come up with the code below before I saw this thread.
declare @TTName Table
(TableSchemaTableName
varchar
(500),
[status] int
default 0);
with AvailableTables
(TableSchemaTableName)
as
(select
QUOTENAME(TABLE_SCHEMA)
+
+
QUOTENAME(TABLE_NAME)
from
INFORMATION_SCHEMA.TABLES)
insert into @TTName
(TableSchemaTableName)
select *
from AvailableTables
declare @TableSchemaTableName varchar
(500)
declare @sqlstatement nvarchar
(1000)
while 1=1
begin
set @sqlstatement
=
'DROP TABLE '
+ @TableSchemaTableName
exec
sp_executeSQL
@sqlstatement
print
'Dropped Table : '
+ @TableSchemaTableName
update @TTName
set [status]
= 1
where TableSchemaTableName
= @TableSchemaTableName
if
(select
count([Status])
from @TTName
where [Status]
= 0)
= 0
break
end -
How to Connect SQL Server enterprises Manager Version 8.0 with Form 6i
Dear experts
I want to know that How can I connect SQL server Enterprise Manager Version 8.0 with Forms/reprots 6i.
currently I have oracle 9i database at server windows 2003 and I also connected with client (my PC) I work on server.
I also have SQL server in that server 2003 machine and this SQL Server also work with other clients that have VB program.
I want to know that can I connect with this SQL server with Form 6i?You can't. The closest thing would be to create links in an oracle database to the SQL Server database using Heteregeneous Services and connect forms to the that.
This forum is for the SQLDeveloper tool. You will get more complete answers in the "Database General", or "Heterogeneous Services" forums -
Ours is a SQL Server Express Edition 2008-R2 - Windows Forms based application. We have a backup/restore utility provided with our software which performs some logical checks before restoring a backup to ensure that the backup is functionally valid.
However, our clients often use the SQL Server Enterprise Manager utility to 1) Restore backups or 2) Attach data files (kept aside before formatting) directly. This type of action bypasses all our functional checks and allows the user to restore an invalid
backup.
We want to detect that a database was restored/attached and may be we will stop the software from loading if such a thing happened. We think that this information (attach/restore) should be available within some table of SQL Server itself but don't know the
right location/query.
If any change is required in our software to achieve the above, we are ready to do the same too, e.g. may be we need to store some data at some point of time to make the detection happen, please advise.
So, how can we detect that
A database backup was restored using SQL Server Management Utility
(Note: MSDB.Restorehistory may not be a good option as we have often found this table blank for unknown reasons even after backup was restored and just in case user restores the MSDB from MSDB backup or MSDB template due to a data corruption, may be due to
abnormal shutdown of system, then the RestoreHistory table data is gone)
A database was created by attaching a data/log file using SQL Server Management Utility
Any help in this regard is highly appreciated.
Rajarshi
ProjectServer 2007 BeginnerHi,
For Enterprise edition, we can enable Auditing to audit BACKUP_RESTORE_GROUP in a server audit specification. However, SQL Server audit (fine-grained auditing) feature is not available for the SQL Server Express.
Features Supported by the Editions of SQL Server 2008 R2
http://msdn.microsoft.com/en-us/library/cc645993(v=sql.105).aspx
When a database is attached, SQL Server ERRORLOG will record “Starting up database 'DBNAME'.”
Using ALTER DATABASE OFFLINE and ONLINE will re-open the database files under the SQL Server, the SQL Server error log also contains the following informational message: “Setting database option ONLINE to ON for database 'DBNAME'.”
Additional information:
SQL Server Audit (Database Engine)
http://msdn.microsoft.com/en-us/library/cc280386.aspx
Tracy Cai
TechNet Community Support -
Unable to connect to the database instance using Enterprise Manager.
I just install Oracle 10gr2 in my computer and after successful installation created a database instance which also install successfully. I then configure the listener using Net Manager and then start the database instance, the listener and dbconsole, everything seems to work fine and checking the status of this services from the command prompt indicates everything started successfully. But when I try to use Enterprise Manager I was directed to the Database Down Page with a message unable to connect to database instance. I try to use startup and perform recovery but every time I log-in to the database an error message comes out:
SQLEXCEPTION
ORA-00604: error occurred at recursive SQL level 1
ORA-12705: Cannot access NLS data files or invalid environment specified.
It seems for Enterprise Manager to connect to the database it needs to access this NLS(National Language Support) data files or specify an environment variable to point to this data files. I am just new to Oracle and I am having difficulty solving this particular problem. Where is this data files located and how do I configure Enterprise Manager to access this NLS data Files?
Any help however small will be highly appreciated.Are you able to connect to the database via SQLPlus?
What Operating System are you using?
Assuming Windows, can you RUN regedit to open Windows Registry and check the value or NLS_LANG when you select
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_<your_oracle_home>
Examples of vaules you may find:
1. ENGLISH_UNITED KINGDOM.WE8MSWIN1252
2. AMERICAN_AMERICA.US7ASCII
3. AMERICAN_AMERICA.WE8MSWIN1252
4. FRENCH_FRANCE.WE8MSWIN1252
5. GERMAN_GERMANY.WE8MSWIN1252
If you are not able to connect to SQLPlus, from the command prompt try setting one of the above:
e.g.
D:\>set NLS_LANG=AMERICAN_AMERICA.WE8MSWIN1252
D:\>sqlplus /nolog
SQL>connect sysman/password -
Unable to connect using Enterprise Manager
I have Oracle 9.2 installed on w2000 server and it was working fine when I use isqlplus and sqlplus. However, after I type in the userID:SYS and password to expand the tree of the database when I use Enterprise Manager , it gives me the error ORA-12520. I got the same error when trying to create DSN in ODBC driver configuration.
Solution:
I ran into the same problem. You have to first create a password file. Run
orapwd file=<fname> password=<password> entries=<users>
The file will usually be in the dbs by default. You may have to play with the file name. I had to make it orapwd in dbs to make it recognize correctly.
Next you need to modify your startup parameter for your instance to use the remote_login_passwordfile='shared' or 'exclusive'
Set it to exclusive if you have only one instance or shared if you have multiple instances. I had to use the pfile and start the instance with that. Just rename your spfile and type 'sql>create pfile from spfile' and then edit it. Set your parameter and restart your instance. The do 'sql>create spfile from pfile' to make your spfile again. Now you should be able to connect as sys remotely from sql or OEM!!!
Doc:
Setting REMOTE_LOGIN_ PASSWORDFILE
In addition to creating the password file, you must also set the initialization parameter REMOTE_LOGIN_PASSWORDFILE to the appropriate value. The values recognized are described as follows:
Value Description
NONE
Setting this parameter to NONE causes Oracle to behave as if the password file does not exist. That is, no privileged connections are allowed over non-secure connections. NONE is the default value for this parameter.
EXCLUSIVE
An EXCLUSIVE password file can be used with only one database. Only an EXCLUSIVE file can contain the names of users other than SYS. Using an EXCLUSIVE password file allows you to grant SYSDBA and SYSOPER system privileges to individual users and have them connect as themselves.
SHARED
A SHARED password file can be used by multiple databases. However, the only user recognized by a SHARED password file is SYS. You cannot add users to a SHARED password file. All users needing SYSDBA or SYSOPER system privileges must connect using the same name, SYS, and password. This option is useful if you have a single DBA administering multiple databases. -
Cannot Connect using Enterprise Manager
The details of the Oracle 9i Server 9.2.0.1.0 are as follows:
IP: 172.25.22.78
SID: MSPD
Port 1521
I am trying to connect to this server using enterprise manager but i get the "ORA-12543: TNS:destination host unreachable" Error.
However I am able to ping the server successfully.
When I try the command telnet 172.25.22.78 1521 I get an error "Could not open connection to Host, on port 1521; connect failed."
What could be the reason?
Following is the entry in TNSNAMES.ORA
# TNSNAMES.ORA Network Configuration File: C:\oracle\ora92\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.
MSPD_172.25.22.78 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.25.22.78)(PORT = 1521))
(CONNECT_DATA =
(SID = mspd)
(SERVER = DEDICATED)
Thanks and Regards,
AshwinHello everyone,
Thanks for all your answers so far. I appreciate your assistance very much.
Does tnsping work?
No TNSPING 172.25.22.78 1521 did not work
Can you connect via sqlplus?
No. The net service mspd_172.25.22.78 is configured in the Net Manager.
It fails when I test it from Net manager as well as SQL Plus
The server is in Boston.
This problem is only occuring when we are accessing the server from Mumbai.
My team from Cincinatti is able to connect to the server.
ping, tnsping, sqlplus, telnet are all successful for them.
When i contacted the Network team in mumbai they had a look at the Trace route of the IP and declared that there is no firewall from our side that is blocking the communication. They asked me to contact the client to see if the server port they provided is correct and is open for access.
Could it be that the client put up a firewall that allows access from cincinatti office but not mumbai? (all tests from cinci - pass, all tests from mumbai except ping fail).
Is it possible that Cinci team can access port 1521 but from mmumbai we have to give another port which is reverse mapped to port 1521?
Thanks and Regards,
Ashwin -
Shrink database is not active in SQL SERVER Enterpriser manager
Dear guru
Shrink database is not active in SQL SERVER Enterpriser manager what to do
Rupesh
SAP BASIS ConsultantHi,
>Thank you very much for not supporting i have solved the problem by reading some other documents
That's exactly what I wanted you to do : With a little personal work, you can actually learn to do your own work ! "Don't give fish to hungry people. Teach them how to go fishing !"
Regards,
Olivier -
Error while deploying application using enterprise manager website and dcmctl
Hi,
I am trying to deploy a huge ear file using enterprise manager website of Oracle 9iAs Rel 2.
The deployment fails with the following error.
Deployment failed: Nested exception Root Cause: null; nested exception is: java.lang.OutOfMemoryError. null; nested exception is: java.lang.OutOfMemoryError
We are able to deploy the same ear file using stand-alone container. We are planning for deployment in few days to go it live. Pls suggest what could be the problem.
Hardware Used:-
DellServer Intel P3 dual processor 1.2GHz
1GB RAM
2GB virtual memory,
40GB free hard-drive.
Apart from 9ias enterprise edition, this system has Oracle database also on it. But the database is not being used at all by anyone.
No other software is installed on the system
Software:-
Windows 2000 Server sp2
Oracle 9ias Release 2 Enterprise Edition (Installed J2EE and Webcache)
Oracle 8i Database 8.1.6.0.0
Size of application:-
130 EJBs (107 CMP + remaining Session Beans)
1700 JSPs
3 servlets
Packaged properly into jar,war,ear structure.
the size of ear file is about 13MB.
I tried using dcmctl but still got the following error.
Oracle 8i database is running but noone is using it except that this application uses it.
Pls help
D:\oraJ2EE\dcm\bin>dcmctl deployapplication -f d:\oraJ2ee\j2ee\elink\applications\advecto.ear -
a myapp
ADMN-300075
D:\oraJ2EE\dcm\bin>dcmctl getError -v -d
ADMN-300075
Nested exception
Base Exception:
java.rmi.RemoteException:null; nested exception is:
java.lang.OutOfMemoryError
Nested exception
Root Cause: null; nested exception is:
java.lang.OutOfMemoryError
java.rmi.RemoteException: null; nested exception is:
java.lang.OutOfMemoryError
java.lang.OutOfMemoryError
<<no stack trace available>>
Are there any mandatory patches to be applied after installing 9ias Rel2?
Thanks
SrinathTry to fragment the 'ear' in less than 64k blocks or don't transmit as long raw.
Please let me know if this works. -
I have installed oracle 10g in my winxp machine. i am using enterprise manager. i am not able to shutdown the system as it asks for os username and password. i have provided my os username and password but eerror persiste. somebody pls help me to get rid of this.
Here I am using Java Type IV for database
connection.
So,there was no necessity of creating DNS.How your app communicates with db shouldn't matter for the end user. Still, you may want to use a functional network name also for the thin client driver connection string.
So,is there any other way to solve this problem.What is the problem really? Do you not use dns for network naming? Maybe you have to manage the hosts file on every client then. -
Error while trying to deploy the application using Enterprise manager website
Hi,
I am trying to deploy a huge ear file using enterprise manager website of Oracle 9iAs Rel 2.
The deployment fails with the following error.
Deployment failed: Nested exception Root Cause: null; nested exception is: java.lang.OutOfMemoryError. null; nested exception is: java.lang.OutOfMemoryError
We are able to deploy the same ear file using stand-alone container.
We are planning for deployment in few days to go it live.
Pls suggest what could be the problem.
Hardware Used:-
DellServer Intel P3 dual processor 1.2GHz
1GB RAM
2GB virtual memory,
40GB free hard-drive.
Apart from 9ias enterprise edition, this system has Oracle database also on it. But the database is not being used at all by anyone.
No other software is installed on the system
Software:-
Windows 2000 Server sp2
Oracle 9ias Release 2 Enterprise Edition (Installed J2EE and Webcache)
Oracle 8i Database 8.1.6.0.0
Size of application:-
130 EJBs (107 CMP + remaining Session Beans)
1700 JSPs
3 servlets
Packaged properly into jar,war,ear structure.
the size of ear file is about 13MB.
Thanks
SrinathHi,
I tried using dcmctl but still got the following error.
Oracle 8i database is running but noone is using it except that this application uses it.
Pls help
D:\oraJ2EE\dcm\bin>dcmctl deployapplication -f d:\oraJ2ee\j2ee\elink\applications\advecto.ear -
a myapp
ADMN-300075
D:\oraJ2EE\dcm\bin>dcmctl getError -v -d
ADMN-300075
Nested exception
Base Exception:
java.rmi.RemoteException:null; nested exception is:
java.lang.OutOfMemoryError
Nested exception
Root Cause: null; nested exception is:
java.lang.OutOfMemoryError
java.rmi.RemoteException: null; nested exception is:
java.lang.OutOfMemoryError
java.lang.OutOfMemoryError
<<no stack trace available>>
Thanks
Srinath -
Import database using enterprise manager
Hello,
I am trying to import a database using enterprise manager. I've finished the installation of 10g and i need to import a database that is in a different server.
The Oracle Enterprise Manager window, has a tab 'maintenance' that allows me to import from another database.
The problem is that at some point the wizard ask's me for the user credentials (user and password), and i don't no who is the user, is it refering to the others server's credentials or is it referring to the database credentials?
Can You help me, please?
Is there some tutorial for this?
Thank you,
Sara.I don't know of a tutorial, sorry. This forum is about Globalization Support (e.g. national language support features) so it is really the wrong place for EM Grid/Database Control questions. I suggest your try here instead:
Enterprise Manager -
Problem using Enterprise Manager 11g Database Control in Firefox 3.6.6
Hello all,
I just intalled Oracle 11g and trying to familiarize myself with Enterprise Manager 11g Dataabse Control using Firefox 3.6.6 in Windows XP.
I'm able to login to Enterprise manager successfully.
However, when I click on on "Performance Tab", the "SYSTEM_MOVING_WINDOW" is empty, and there's a prompt "Click Here to Download Plugin."
When I do click on it, I get message:
No suitable plugins were found.
Unknown plugin (application/octet-stream) [Manual Install].
I'm not sure what plugin I need so I can use Enterprise Manager properly.
Please help!
Thanks
GiovanniI use the Opera browser so I can split the screen to monitor multiple instances at the same time on my 2nd monitor. I am not having issues with the 10g OEM but having the same problem listed in this thread with the 11g OEM ( we have both running during our migration to 11g). The posts here didn't help me with the 11g OEM as there must be some difference from 10g OEM. I will hate it if I can't do the split screen to monitor multiple instances at the same time. And if you are connecting via solaris or lunix browser then IE is not an option ( W3C standards please ).
-
Why using Enterprise Manager..
I can connect to both DB on my machine and instead using SQPLPlus from command line I cannot connect with none ?
S.O. Windows XP Pro
On my machine I have Oracle 9i with 2 DB of test. If I try to connect to them using SQLPlus I cannot connect ( I have Error ORA-12560 ) and instead if I try to connect using Enterprise Manager I can.
I have these services on :
1) OracleOraHom92HTTPServer
2) OracleOraHom92TNSListener
3) OracleServiceMyDB
Tx for any suggest
Diegothe tns protocal adaptor error can mean many things.
check the following:
1) check the windows service is running for the database.
2) run a tnsping command to check if all is okay.
3) are you running sqlplus from the correct ORACLE_HOME -
Cannot send email using PL/SQL through Enterprise Manager 10g
Hi
I need to schedule a job that sends email periodically. I am using the scheduler in Oracle Enterprise Manager 10g for this. For sending the email, I am creating a PL/SQL job. The code is as follows:
PROCEDURE send_test_message
IS
mailhost := 'iwblrcormsg001.sci.local';
sender := '[email protected]';
recipient := '[email protected]';
mail_conn utl_smtp.connection;
BEGIN
mail_conn := utl_smtp.open_connection(mailhost, 25);
utl_smtp.helo(mail_conn, mailhost);
utl_smtp.mail(mail_conn, sender);
utl_smtp.rcpt(mail_conn, recipient);
utl_smtp.open_data(mail_conn);
utl_smtp.write_data(mail_conn, 'This is a test message.' || chr(13));
utl_smtp.write_data(mail_conn, 'This is line 2.' || chr(13));
utl_smtp.close_data(mail_conn);
utl_smtp.quit(mail_conn);
END;
I have setup the smtp server and received a test email from the EM notifying me of successful configuration. When the above job is run, the scheduler shows status as successful. If I go to the command step, it displays the following output:
Output Log
SQL*Plus: Release 10.1.0.2.0 - Production on Thu Feb 19 19:04:29 2009
Copyright (c) 1982, 2004, Oracle. All rights reserved.
SQL> SQL> SQL> SQL> Connected.
SQL> SQL> 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 Disconnected from Personal Oracle Database 10g Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
Now, the only issue is that I do not receive any email at the address specified! I would be very grateful if someone could point out the error here.I would use APEX4.0 for this.
Create an interactive report based on your data. Add a chart to that report and use the NOTIFY feature to send you the email.
Maybe you are looking for
-
Hi Guys I have basic Qs on the creation of the Chart of Depreciation ... If a multinational company having different local currencies and want their Depreciation Calculation, both for Book and Tax to be that of the local currency, it makes the most
-
Runtime error in a passed check formula
Hi all, I have a formula passed the check in the formula editor, but in runtime I am told the following error: Error in formula<myformula> 'if {MyDatatable.IsFrench}= 0 then' a boolean is needed here. IsFrench field is system.int32 type in dataset
-
How to view source of e-mail without opening so I don't get a virus
I want to be able to look at my e-mail, see who it is from, and delete if from an unwanted source. Can this be done? Thanks
-
Mac Mini 2,1 (August 2007)
On the Mac Mini 2,1 (August 2007), are the usb ports 2.0, and are they high or low power?
-
May I know how to round a double number to 2 decimal points?
if I have a double number 135.25689951591, how can I round this number to make it output as 135.26?