SQL%FOUND and SQL%NOTFOUND
Hi,
My friend asked me this question.
Why we hav these two attributes?SQL%FOUND and SQL%NOTFOUND
One will always be the opposite of the other.So one will suffice our need, no?
Thanks..
declare
print varchar2(32);
begin
delete
from scott.emp
where empno = 1000;
if ( SQL%FOUND ) then
print := 'found';
else
print := 'not_found';
end if;
if ( SQL%NOTFOUND ) then
print := print||' and not_found';
else
print := print||' and found';
end if;
dbms_output.put_line(print);
delete
from scott.emp;
if ( SQL%FOUND ) then
print := 'found';
else
print := 'not_found';
end if;
if ( SQL%NOTFOUND ) then
print := print||' and not_found';
else
print := print||' and found';
end if;
dbms_output.put_line(print);
delete
from scott.emp;
if ( SQL%FOUND ) then
print := 'found';
else
print := 'not_found';
end if;
if ( SQL%NOTFOUND ) then
print := print||' and not_found';
else
print := print||' and found';
end if;
dbms_output.put_line(print);
rollback;
end;
not_found and not_found
found and found
not_found and not_foundIt seesm that one is allways the opposite of the ather one. There are no exception.
Bye Alessandro
Similar Messages
-
Hi
-when i install default instance MSSQLSERVER i added a domain account as a service account,
- when i change port for TCPIP PORT , and after sql service and sql agent service did not started again.
it thrown error
The SQL Server (MSSQLSERVER) service failed to start due to the following error:
The service did not start due to a logon failure.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Service Control Manager" Guid="{555908d1-a6d7-4695-8e1e-26931d2012f4}" EventSourceName="Service Control Manager" />
<EventID Qualifiers="49152">7000</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>0</Task>
<Opcode>0</Opcode>
but when i add domain\sqservice account in administrators group these services started,
1) here why this change behavior happened
2i changed the port 1500
adilHI
the sql instance service is running with domain/sqlservice account ,
- i stopped the sql service service
- when i start it not started again and i found below error message
Domain and account: MOJPORTAL\spsqlservice
This service account does not have the required user right "Log on as a service."
User Action
Assign "Log on as a service" to the service account on this computer. You can use Local Security Settings (Secpol.msc) to do this.
If this computer is a node in a cluster, check that this user right is assigned to the Cluster service account on all nodes in the cluster.
If you have already assigned this user right to the service account, and the user right appears to be removed,
check with your domain administrator to find out if a Group Policy object associated with this node might be removing the right.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Service Control Manager" Guid="{555908d1-a6d7-4695-8e1e-26931d2012f4}" EventSourceName="Service Control Manager" />
<EventID Qualifiers="49152">7041</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x8080000000000000</Keywords>
<TimeCreated SystemTime="2015-04-24T17:12:58.326973300Z" />
<EventRecordID>2177</EventRecordID>
<Correlation />
<Execution ProcessID="520" ThreadID="4044" />
<Channel>System</Channel>
<Computer>PORTALSQL1.mojportal.com</Computer>
<Security />
</System>
<EventData>
<Data Name="param1">MSSQL$xSQL</Data>
<Data Name="param2">xxxL\spsqlservice</Data>
</EventData>
</Event>
adil -
SQL Report not showing data - available in SQL Workshop and SQL Developer
I am having an issue with developing a SQL Report in APEX 3.2.1. I run the code in both SQL developer and SQL Workshop and I get data pulled back (both against my development environment). When I run the same code in a SQL Report region, it returns no data available. Does anyone have any idea what would be causing this? Other regions on the page accessing different tables in the same schema return data without issue. Any help would be appreciated.
Thanks
FreddieCould you explain the last comment a bit more. Here is a bit more info just in case I touch on the info with it. The db schema is BPAMGR, the Workspace is BPAMGR. We use the same schema for all of our reporting. All of our tables are in the same schema. We don't use any tables outside of this schema. Our APEX workspace has been associated to only this schema. The tables are able to be queried by SQL Workshop in the same APEX instance that the report application is under.
Freddie -
Can SQL 2000 and SQL 2005 drivers co-exist in PI?
Hi,
Currently in our PI environment, we have JDBC Adapter connections to SQL 2000 database servers for which the Driver has already been installed.
For connecting to new SQL 2005 database servers, I understand that we have to install the SQL 2005 drivers. I also came to know that SQL 2005 Driver is backward compatible and supports JDBC connection to SQL 2000 server.
But the question I have is whether both the SQL 2000 and SQL 2005 drivers can be installed together in a way that connection to SQL 2000 use the 2000 driver and the connection to 2005 uses 2005 Driver.
(They have different connection strings)
Many thanks in advance,
Regards,
Rosie SasidharanThe SQL Server 2005 JDBC driver is far better than the SQL Server 2000 JDBC driver. The 2005 JDBC driver primarily consists for one file, sqljdbc.jar. ( if you want to use windows authentication there is another file you would need based on your platform x64 vs x86 called sqljdbc_auth.dll. If in the connect string you list ;integratedSecurity=true which means integrated security would be used and this second file would be required. The 2000 driver did not support integrated security.
The SQL 2000 JDBC driver was made up of the 3 jar files:
msbase.jar,mssqlserver.jar and msutil.jar.
If you want to use a Microsoft JDBC driver to connect to SQL Server 2005, than you should use the 2005 driver, sqljdbc.jar.
Follow the instructions in point 1 of the note #831162 - FAQ: XI 3.0 / PI 7.0 / PI 7.1 JDBC Adapter questions 1 and 13.
Since the jar are different I assume you can use the both drivers, but it doesnt make sense. -
Modify SQL#4 and SQL#5 DDL Model Defaults
Hi,
on FSCM 9.1 , tools 52.0 on Win 2008 server;
to force statistics gathering in AE we should do :
6. Modify SQL#4 and SQL#5 DDL Model Defaults for Oracle Platform to enable option force when updating
Recommended in :
RED_PAPER_-_PeopleSoft_Enterprise_Performance_on_Oracle_11g_Database.pdf
Can you be kind and tell us how to find them (SQL#4) ?
Thank you.The DDL models are under
PeopleTools > Utilities > Administration > DDL Model Defaults
Select the Oracle platform from the search, and you should get a scroll with 5 rows. Rows 4 and 5 should begin with DBMS_STATS.GATHER_TABLE_STATS
You can also consider downloading the following tool from Oracle Support:
pscbo_stats - Improving Statistics in Oracle RDBMS for PeopleSoft Enterprise [ID 1322888.1]
See PeopleSoft Database Update Statistics for more information.
Regards,
Bob -
Oracle SQL Developper and SQL Server Connection
Hello
I try to connect to a SQL Server 2005 Database under Oracle SQl Developper but I always obtain this error :
oracle.jdeveloper.cm.CMException: Unable to find driver: net.sourceforge.jtds.jdbc.Driver
at oracle.dbtools.raptor.conntypes.RaptorConnectionWrapper.createConnection(RaptorConnectionWrapper.java:164)
at oracle.dbtools.raptor.conntypes.RaptorConnectionWrapper.getJdbcConnection(RaptorConnectionWrapper.java:191)
at oracle.dbtools.raptor.conntypes.RaptorConnectionWrapper.getPresentation(RaptorConnectionWrapper.java:66)
at oracle.dbtools.raptor.utils.Connections$ConnectionInfo.createConnection(Connections.java:781)
at oracle.dbtools.raptor.utils.Connections$ConnectionInfo$ConnectRunnable.doWork(Connections.java:654)
at oracle.ide.dialogs.ProgressRunnable.run(ProgressRunnable.java:159)
at oracle.ide.dialogs.ProgressBar.run(ProgressBar.java:553)
at java.lang.Thread.run(Thread.java:595)
I download the jtds driver. Where should I extract it on SQL Developper Folder.
Thanks a lot
Best regards
StéphaneHello!
Download jTDS - SQL Server and Sybase JDBC driver from http://sourceforge.net/project/showfiles.php?group_id=33291
In Oracle SQL Developer open Tools -> Preferences
Database -> Third Party JDBC Drivers
Add Entry
Browse the unzipped driver and add the jtds-1.2.jar file
emeriqus -
How to insert BLOB datatype image using PL/SQL Procedure and SQL Loader
Hi,
How to insert an image into database using PL/SQL Procedure and also how to insert using SQL Loader. Please help by giving sample code and process description.
Thanks,
Vijay Vhttp://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:232814159006
-
Usage of Xopen SQL states and SQL Exception?
Hi
Is there way to make full use of SQL Exceptions?
Has anybody used sql states from sql exception?
It is specified in the API reference that an sql exception object contains an xopen sql state which is a string. But the states in specs are defined as class, subclass.
The question is how can i make use of these java strings to interpret what exactly happened at the database? Are they really useful? If they are, any utilities which converts these strings to a meaningful message? Any pointers on these question would also help me.
Thanx in adv.
GiridharSQLException has inherited a method getMessage() which seems to be quite useful.
For situations where you want to check on a specific one of several possible (or expected) states (like: maybe the table is not yet created ...), I think you can quite fine use getSQLState() and also getErorCode(). Try out in tests, which information is returned by which constellation, then you can use it for making decisions in your program logic.
But be aware, that all these informations probably are DBMS specific! -
SQL 2000 AND SQL 2005 ON THE SAME SERVER
Hi all ,
I have an installation of SAP4.7SR1 /MSSQL2000 on a windows 2003 server.
I want to install SAP SOLUTION MANAGER 4.0 /MSSQL2005 on the same server ... it is possible that two version of SQL ( 2000 and 2005 ) coexists on the same server ? It's sufficent to install SQL into two different directory ?
Thank's a lot.
Antonio Voce.Hi,
yes it is possible to install SQL2000 and SQL2005 on same server but there are certain special considerations that you should be aware of
look at following blog
http://blogs.msdn.com/sqlblog/archive/2006/09/27/co-existence-of-sql-2005-with-sql-2000.aspx
also look http://msdn2.microsoft.com/en-us/library/ms143694.aspx
but in case of SAP Installation i prefered that to upgarde SQL2000 to SQL2005 then install solman 4.0
regards,
kaushal -
EKM using the Azure Key Vault is now available for SQL Database and SQL Server running in Azure VM's
In preview today, you can create keys in the Azure Key Vault, and use them with Azure SQL Database, or SQL Server running in a Azure VM. Use the Extensible Key Management (EKM) for TDE, backup encryption, or cell level encryption. For more information, see
Extensible Key Management Using Azure Key Vault (SQL Server)
http://msdn.microsoft.com/en-us/library/dn198405.aspx.
The announcement:
Azure Key Vault in public preview
Key Vault offers an easy, cost-effective way to safeguard keys and other sensitive data used by cloud applications and services. Included are the following features:
Enhance data protection and compliance:
Protect cryptographic keys and sensitive data like passwords with keys stored in Hardware Security Modules (HSMs). For added assurance, import or generate your keys in HSMs certified to FIPS 140-2 level 2 and Common Criteria EAL4 standards,
so that keys stay within the HSM boundary. Key Vault is designed so that Microsoft doesn’t see or extract your keys.
All the control, none of the work:
Provision new vaults and keys in minutes and centrally manage keys, sensitive data, and policies. You maintain control over your encrypted data—simply grant permission for your own and third-party applications to use keys as needed. Enable
developers to easily manage keys used for dev/test and migrate seamlessly to production keys managed by security operations.
Boost performance and achieve global scale: Improve
performance and reduce latency of cloud applications by storing cryptographic keys in the cloud (versus on-premises). Key Vault rapidly scales to meet the cryptographic needs of your cloud applications and match peak demand.
Get started with Azure Key Vault by creating keys for applications you develop,
SQL Server encryption (TDE, CLE, and Backup), and partner solutions like
CloudLink SecureVM.
Key Vault is available now at no charge with discounted preview pricing starting on January 15, 2015.
For more information, please visit the
Key Vault webpage. For a comprehensive look at pricing, please visit the
Key Vault Pricing webpage.
Rick Byham, Microsoft, SQL Server Books Online, Implies no warrantyThank you for sharing this Rick.
Regards,
Alberto Morillo
SQLCoffee.com -
How exit for a script having set of pl/sql blocks and sql queries
HI,
I have set of blocks and sql queries in a script.
In some cases I want to stop the excution of next statements and blocks.
As in pl/sql block We can use return , in case of loop we can use exit, so what is to be use in case if sql script which contain set of blocks and sql queries.
Thanks and Regards in Advance,Hi,
how to exit from the script if confirm_to_continue is set to 'N'.
i.e in this case I want the preceding statements not to be excuted.
Please suggest.
script:
declare /*BLOCK NO1*/
begin
IF &&confirm_to_continue = 'N'
THEN
---exit from from whole script
RETURN; -- this will only exit from this block
END IF;
end;
host IF EXIST &file_name (del &file_name) ELSE (echo missing)
declare /*BLOCK NO 2*/
begin
end;
/ -
Hi ,
I need some help, pls.
The follwg report runs in SQL Workshop - but gives errors in the sql-query report in HTMLDB:
SQL-Workshop:
select
case
when SUM(S.POTENTIAL_GROWTH)> 1 and SUM(S.POTENTIAL_GROWTH) < 4 then 'Ok'
when SUM(S.POTENTIAL_GROWTH)> 4 and SUM(S.POTENTIAL_GROWTH) < 8 then 'SoSo'
when SUM(S.POTENTIAL_GROWTH)> 8 and SUM(S.POTENTIAL_GROWTH) < 12 then 'Very Good'
else 'too much'
end
from "SEGMENTATION" S
In an HTMLDB SQL-Query Report I added Aliases (as requested for HTML) but still gives the error:
<<Query cannot be parsed, please check the syntax of your query. (ORA-00920: invalid relational operator) >>
the code:
select
case
when SUM(S.POTENTIAL_GROWTH) pot_growth > 1 and SUM(S.POTENTIAL_GROWTH)pot_growth < 4 then 'Ok'
when SUM(S.POTENTIAL_GROWTH)pot_growth > 4 and SUM(S.POTENTIAL_GROWTH)pot_growth < 8 then 'SoSo'
when SUM(S.POTENTIAL_GROWTH)pot_growth > 8 and SUM(S.POTENTIAL_GROWTH)pot_growth < 12 then 'Very Good'
else 'too much'
end
from "SEGMENTATION" S
any halp from the gurus wud be very much appreciated.
TIA
BernhardStill you did not give the alias for the case when column. For that only you should give the alias
select
case
when SUM(S.POTENTIAL_GROWTH) pot_growth > 1 and SUM(S.POTENTIAL_GROWTH)pot_growth < 4 then 'Ok'
when SUM(S.POTENTIAL_GROWTH)pot_growth > 4 and SUM(S.POTENTIAL_GROWTH)pot_growth < 8 then 'SoSo'
when SUM(S.POTENTIAL_GROWTH)pot_growth > 8 and SUM(S.POTENTIAL_GROWTH)pot_growth < 12 then 'Very Good'
else 'too much'
end "GROWTH"
from "SEGMENTATION" S -
How to stop sql services and sql agent services on multiple servers
Looking for a t-sql/powershell script to stop/start sql services on multiple servers. Plan is to execute script from centralized server.
Rahulsee
http://www.databasejournal.com/features/mssql/article.php/3644906/Automatically-Stopping-and-Restarting-SQL-Server.htm
http://sqlpowershell.wordpress.com/2013/04/11/powershell-check-start-and-stop-sql-services-of-a-remote-servers/
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
WCF-SQL notification and SQL Change Data Tracking - incompatible?
Hi,
I have a DB with Change Data Tracking enabled on a particular table. Each time an Update/Insert is made on this table, I'm able to check what need to be synchronised with other systems by using the CHANGETABLE function of SQL Server.
And I want to use it with a Receive location WCF-SQL with inboundOperationType=Notification. So each time a modification is made on the table, I have a notification and I'm able to retrieve the updated/inserted records.
Unfortunately, it seems that using the CHANGETABLE is not supported in the NotificationStatement, I got the following error: "The notification callback returned an error. Info=Invalid. Source=Statement. Type=Subscribe.".
Any ideas to workaround?
Thanks.Hi Johns-305,
Thank you for your response.
I'm not totally agreed with you about the notification because it depends on the situation.
In my case, I have a table in a remote SQL database where data are not changing often. But I want to retrieve the changes as fast as I can because it needs to be synchronised with a MDM.
The notification is great for me because I get a notification message just after a change and I can synchronise it. Of course, if my receive location is down I can't receive the notification but with the mechanism described in the MSDN article you pointed,
I can get the changes I missed during the outage.
And now I have a solution to use the notification and the Data Change tracking: I use a regular SELECT statement in the notification statement (SELECT <columns> FROM MYTABLE). If something changes in the table, I got a notification and then I send
a SELECT FROM CHANGETABLE(MYTABLE, ...) and I store the number of the last modification I got. So I can retrieve only the changes that occurs since my previous call. -
SQL Plus and SQL Developper removal
Installed both Oracle products package for win32. Unfortunately every login I try doesn't work so I tried to uninstall with remove program on my OS as well as Universal Installer but it can't locate programs anywhere!! Note that I'm working with windows 8... Any idea on how I can solve this problem??
Thanks!SQL Developer doesn't have an installer - hence you won't find it in Add/Remove programs.
Just nuke the SQL Developer install directory if you want to remove it from Windows 8 (or from any OS for that matter.)
As for your login - who's database is this? Did you try asking 'them' for a proper account to use?
Maybe you are looking for
-
What happens if your iWatch is stolen?
Hi, I watched the live event announcing the iWatch and am very concerned about the iWatch becoming another target for new or old criminals. Nobody has mentioned anything about how safe or secure the watch is. Many people have been beaten or even mu
-
I am using Ubuntu; iTunes installed via wine is not working properly. So how should i sync my apps on iTunes and device? When will iTunes come to Ubuntu?
-
Can I use a 5v 1000mA charger with the 700?
I have a usb car charger that outputs 5v and 1000mA. I think it came with an older Nokia but I am not sure. Is it safe to use this with my 700?
-
NAS nfs (WD Netcenter) permissions and speed problems
I have a 320GB WD Netcenter - used to use it on an older mac and now on my new one. Permissions seemed to be blocked on one of the other user accounts on this new MBP. When I do "get info" the owenship boxes are greyed out and I cannot change anythin
-
Unmountabl​e_boot_vol​ume
First and foremost, my laptop is a Satellite E105-S1402 which came with windows vista, and I upgraded to windows 7 last year without any problems until now. Every time I attempt to boot up windows 7 the screen freezes, goes black, and then my cursor