Retrieve Data with count
Hi All,
I want to retrieve total number of records returned by a SQL query with the actual data. Is there a way or SQL keyword to get both in one execution. Here I cant use group by coz' some of the columns in the query contain uniquie records..
Following is a dummy query to make my problem more understandable -
SELECT myrownum, nm_cntnt_id, vc_ttl, vc_othr_clmns FROM (SELECT ROWNUM myrownum, nm_cntnt_id, vc_ttl, vc_othr_clmns
FROM CNTNT_TABLE
ORDER BY vc_ttl ASC )
WHERE myrownum <= 20 AND myrownum >= 11Above query first retrieve all the records from the database and then the upper most query filters it to retrieve 10 rows. I wanna to get the actual number of rows retrieved by the inner query with the result.
I am using Oracle9i and Java EJB's for the application. Can anybody help me out for this.
Thanx.
This the version of what I use :
mds Version 5.5.34.46
Built on 2006-Nov-18
Client Interface Version 1.0.00.00
Interface CRC=0xd8012b4a
Console Interface Version 1.0.00.00
Interface CRC=0x7553e3d9
Web Interface Version 5.5.34.06
-Interface CRC=0x9e584ed6
The core dump is a memory core dump.
regards
Similar Messages
-
my given query return only date but i need date with time. my datatype is date format so i cant use the to_char function in my procedure bcz returning should be date format....
select to_date(sysdate, 'dd-mon-yyyy hh24:mi:ss') from dual;SANCHIT GUPTA wrote:
my given query return only date but i need date with time. my datatype is date format so i cant use the to_char function in my procedure bcz returning should be date format....
select to_date(sysdate, 'dd-mon-yyyy hh24:mi:ss') from dual;It is absolutely pointless (and often dangerous) to feed a DATE datatype to to_date. to_date is expecting character string, so feeding it a date just causes a double implicit conversion.
DATE type always include time, whether it is displayed or not.
Where are you using the value after it is returned? I think you are confusing data value with data presentation.
See http://edstevensdba.wordpress.com/2011/04/07/nls_date_format/ -
Retrieve data with restrict document number
hi,
i want to retrieve the data from table into internal table, where the document number start with 19********.
so how an i going to code it so that anything start from 19***** will be taken only, and others are not?
thanksUse
SELECT * FROM dbtab WHERE docnum LIKE '19%' -
Retrieving datas with ArrayList
Below, im trying to get 6 columned records from the access database.
//PNL 1:
PNL1=new JPanel();
PNL1.setLayout(new BorderLayout(15,15));
java.awt.List veri;
ArrayList veri2;
lblABaslik=new JLabel("Arama Sonuclari :");
String[] sutunAdlari={"Tarih","Arac","Kategori","Aciklama","Detay","Miktar"};
int sayac=-1;
java.util.Date tarih;int arac;int kategori;int aciklama;String detay;int tutar;
try {
String url="jdbc:odbc:Driver={MicroSoft Access Driver (*.mdb)};DBQ=..\\bekir.mdb";
String query="select * from harcamalar where tarih between # 2003-11-14 # and #2003-12-14 #";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection(url,"serdar","serdar");
Statement stmt=con.createStatement();
ResultSet rs = stmt.executeQuery(query);
veri=new java.awt.List(6);
veri2=new ArrayList();
String ekle;
while(rs.next()) {
ekle=new String(rs.getString("tarih"));
veri.add(ekle);
ekle=new String(rs.getString("arac_id"));
veri.add(ekle);
ekle=new String(rs.getString("kategori_id"));
veri.add(ekle);
ekle=new String(rs.getString("aciklama_id"));
veri.add(ekle);
ekle=new String(rs.getString("detay"));
veri.add(ekle);
ekle=new String(rs.getString("miktar"));
veri.add(ekle);
veri2.add(veri);
rs.close();
stmt.close();
con.close();
catch (ClassNotFoundException e2){
e2.printStackTrace(System.err);
catch (SQLException e2){
System.err.println("SQL state: " + e2.getSQLState());
System.err.println("SQL error: " + e2.getErrorCode());
e2.printStackTrace(System.err);
table=new JTable(veri2,sutunAdlari);
table.setPreferredScrollableViewportSize(new Dimension(600,100));
JScrollPane scrollpane=new JScrollPane(table);
PNL1.add("North",lblABaslik);
PNL1.add("Center",scrollpane);
table.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
System.out.println(table.getSelectedRow());
but i get the error :
"BekirAna2.java": cannot resolve symbol: constructor JTable (java.util.ArrayList,java.lang.String[])in class javax.swing.JTable at line 1928, column 55
which represents the line :
table=new JTable(veri2,sutunAdlari);
thanxi changed the codes with Vector definitions;
//PNL1 :
PNL1=new JPanel();
PNL1.setLayout(new BorderLayout(15,15));
Vector veri;
Vector veri2;
//ArrayList veri2;
lblABaslik=new JLabel("Arama Sonuclari :");
//Object[][] veri=new Object[10][7];
//veri[0][0] = new String("foo"); //etc.
String[] sutunAdlari={"Tarih","Arac","Kategori","Aciklama","Detay","Miktar"};
int sayac=-1;
java.util.Date tarih;int arac;int kategori;int aciklama;String detay;int tutar;
try {
String url="jdbc:odbc:Driver={MicroSoft Access Driver (*.mdb)};DBQ=..\\bekir.mdb";
//String query="select * from harcamalar";
String query="select * from harcamalar where tarih between # 2003-11-14 # and #2003-12-14 #";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection(url,"serdar","serdar");
Statement stmt=con.createStatement();
ResultSet rs = stmt.executeQuery(query);
veri=new Vector();
//veri2=new ArrayList();
veri2 = new Vector();
String ekle;
while(rs.next()) {
ekle=new String(rs.getString("tarih"));
veri.add(ekle);
ekle=new String(rs.getString("arac_id"));
veri.add(ekle);
ekle=new String(rs.getString("kategori_id"));
veri.add(ekle);
ekle=new String(rs.getString("aciklama_id"));
veri.add(ekle);
ekle=new String(rs.getString("detay"));
veri.add(ekle);
ekle=new String(rs.getString("miktar"));
veri.add(ekle);
veri2.add(veri);
rs.close();
stmt.close();
con.close();
catch (ClassNotFoundException e2){
e2.printStackTrace(System.err);
catch (SQLException e2){
System.err.println("SQL state: " + e2.getSQLState());
System.err.println("SQL error: " + e2.getErrorCode());
e2.printStackTrace(System.err);
//table=new JTable(veri,sutunAdlari);
table=new JTable(veri2,sutunAdlari);
table.setPreferredScrollableViewportSize(new Dimension(600,100));
JScrollPane scrollpane=new JScrollPane(table);
PNL1.add("North",lblABaslik);
PNL1.add("Center",scrollpane);
table.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
System.out.println(table.getSelectedRow());
});but i still get the error alike:
"BekirAna2.java": cannot resolve symbol: constructor JTable (java.util.Vector,java.lang.String[])in class javax.swing.JTable at line 1931, column 55
pointing the line;
table=new JTable(veri2,sutunAdlari); -
Query For Retrieving Data With Date
Hi Guys
I am having a hard time to figure out the sql query.
I have a table with data. Below is the illustration.
date location
item
1 jan 14 A
apple
2 jan 14 A
apple
3 jan 14 B
apple
4 jan 14 B
apple
1 jan 14 A
orange
2 jan 14 A
orange
3 jan 14 B
orange
4 jan 14 B
orange
My question it how to get the latest date on each location and item
This is the result I want
date location
item
2 jan 14 A
apple
4 jan 14 B
apple
2 jan 14 A
orange
4 jan 14 B
orange
Thanks.Try the below:
create table #temp (sdate datetime,location char(1),Item varchar(20))
insert into #temp values('1 jan 14','A','Apple')
insert into #temp values('2 jan 14','A','Apple')
insert into #temp values('3 jan 14','B','Apple')
insert into #temp values('4 jan 14','B','Apple')
insert into #temp values('1 jan 14','A','Orange')
insert into #temp values('2 jan 14','A','Orange')
insert into #temp values('3 jan 14','B','Orange')
insert into #temp values('4 jan 14','B','Orange')
;With cte as
Select * , Row_Number()Over(partition by location, item order by sdate desc) Rn
From #Temp
Select * From cte Where rn=1 Order by Item asc,location asc
drop table #temp -
Query For Retrieving Data With Date and grouping
Hi Guys
I am having a hard time to figure out the sql query.
I have a table with data. Below is the illustration.
date location item description
1 jan 14 A apple desc1
2 jan 14 A apple desc2
3 jan 14 B apple desc1
4 jan 14 B apple desc2
1 jan 14 A orange desc1
2 jan 14 A orange desc2
3 jan 14 B orange desc1
4 jan 14 B orange desc2
My question it how to get the latest date on each location and item along with the description field
This is the result I want
date location item description
2 jan 14 A apple desc2
4 jan 14 B apple desc2
2 jan 14 A orange desc2
4 jan 14 B orange desc2
Thanks.provided it a datetime/date field you've for date you can do this
SELECT [date],location,itemdescription
FROM
SELECT [date],location,itemdescription,
ROW_NUMBER() OVER (PARTITION BY location ORDER BY [date] DESC) AS Rn
FROM table
)t
WHERE Rn = 1
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
Flashing folder icon -- how to retrieve data with time machine?
Hello all --
I was away from home for three months. When I returned and turned on my trusty 20" iMac running OSX 10.7.5, I got the flashing folder icon. I have tried all the recommended methods of restoring the system and nothing has worked. The processor obviously will no longer recognize the hard drive, which to me means the hard drive has either crashed or the cable connecting the two has failed. I am not as concerned with saving the unit itself, but with saving my data. I have a 128 GB flash drive configured as a Time Machine backup that the processor can "see", but I don't know how to transfer that data to another machine or an external hard drive that could be used in one of my other Macs. Any suggestions?
Thanks in advance,
DaveYou restore the TM backup to the other Mac. Connect the TM drive to the "new" Mac and open Migration Assistant (Applications - Utilities - Migration Assistant) and migrate from the TM drive. Remember this will create a new user account.
-
Retrieve data on table with data type
Hello,
I want ask, there is query to retrieve data with data type on table SQL Server 2008 R2 ?Please take a look at sp_describe_first_result_set,sp_describe_undeclared_parameters,
and sys.dm_exec_describe_first_result_set. -
Hi all,
Has anyone come across SQL Server 2012 SP1 CU8/9 failing to install with a “Failed to retrieve data for this request.” error.
The error is too generic for a useful search on web, for me at least anyway.
Had no problems patching a whole bunch of other servers in the same environment.
I’m no good at reading these error logs. For some reason the primary replica is referenced in the detailed log???
The CU8/9 patch has been run by both Domain Admins and local Admin with no luck.
We are trying to patch a secondary failover replica. (SharePoint 2013 is installed on this server.)
This is from the summary log:
Overall summary:
Final result: The patch installer has failed to update the shared features. To determine the reason for failure,
review the log files.
Exit code (Decimal): -2146233088
Exit facility code: 19
Exit error code: 5376
Exit message: Failed to retrieve data for this request.
Start time: 2014-04-10 11:51:11
End time: 2014-04-10 11:51:49
Requested action: Patch
Exception help link:
http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3412.0&EvtType=0xB2652E58%400xDC80C325&EvtType=0xB2652E58%400xDC80C325
Machine Properties:
Machine name: VMSPDB2
Machine processor count: 4
OS version: Future Windows Version
OS service pack:
OS region: Australia
OS language: English (United States)
OS architecture: x64
Process architecture: 64 Bit
OS clustered: Yes
Product features discovered:
Product Instance Instance ID
Feature Language
Edition Version Clustered Configured
SQL Server 2012 MSSQLSERVER MSSQL11.MSSQLSERVER Database
Engine Services 1033 Enterprise Edition
11.1.3000.0 No Yes
SQL Server 2012 MSSQLSERVER MSSQL11.MSSQLSERVER SQL Server
Replication 1033 Enterprise
Edition 11.1.3000.0 No Yes
SQL Server 2012 MSSQLSERVER MSSQL11.MSSQLSERVER Full-Text
and Semantic Extractions for Search 1033 Enterprise Edition 11.1.3000.0 No
Yes
SQL Server 2012 MSSQLSERVER MSSQL11.MSSQLSERVER Data
Quality Services 1033
Enterprise Edition 11.1.3000.0 No Yes
SQL Server 2012
Management Tools - Basic 1033
Enterprise Edition 11.1.3000.0 No Yes
SQL Server 2012
Management Tools - Complete 1033 Enterprise Edition
11.1.3000.0 No Yes
SQL Server 2012
Client Tools Connectivity 1033 Enterprise Edition
11.1.3000.0 No Yes
SQL Server 2012
SQL Server Data Tools 1033
Enterprise Edition 11.1.3000.0 No Yes
SQL Server 2012
Integration Services 1033
Enterprise Edition 11.1.3000.0 No Yes
Package properties:
Description: Microsoft SQL Server 2012 Service Pack 1
ProductName: SQL Server 2012
Type: RTM
Version: 11
SPLevel: 1
KBArticle: KB2931078
KBArticleHyperlink:
http://support.microsoft.com/?kbid=2931078
PatchType: QFE
AssociatedHotfixBuild: 0
Platform: x64
PatchLevel: 11.1.3412.0
ProductVersion: 11.1.3000.0
GDRReservedRange: 10.0.1000.0:10.0.1099.0;10.0.3000.0:10.0.3099.0
PackageName: SQLServer2012-KB2931078-x64.exe
Installation location: e:\90a192411a98d1f6dc\x64\setup\
User Input Settings:
ACTION: Patch
ALLINSTANCES: false
CLUSTERPASSIVE: false
CONFIGURATIONFILE:
ENU: false
HELP: false
IACCEPTSQLSERVERLICENSETERMS: false
INDICATEPROGRESS: false
INSTANCEID: <empty>
INSTANCENAME: <empty>
QUIET: false
QUIETSIMPLE: false
SQMREPORTING: false
UIMODE: Normal
X86: false
Rules with failures:
Global rules:
There are no scenario-specific rules.
Rules report file: The rule result report file is not available.
Exception summary:
The following is an exception stack listing the exceptions in outermost to innermost order
Inner exceptions are being indented
Exception type: Microsoft.SqlServer.Management.Sdk.Sfc.EnumeratorException
Message:
Failed to retrieve data for this request.
HResult : 0x80131500
Data:
HelpLink.ProdName = Microsoft SQL Server
HelpLink.BaseHelpUrl =
http://go.microsoft.com/fwlink
HelpLink.LinkId = 20476
HelpLink.EvtType =
0xB2652E58@0xDC80C325
DisableWatson = true
Stack:
at Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.Process(Object connectionInfo, Request request)
at Microsoft.SqlServer.Chainer.Infrastructure.SqlDiscoveryDatastoreInterface.ProcessDTbl(DataTable dt, Int32 level)
at Microsoft.SqlServer.Chainer.Infrastructure.SqlDiscoveryDatastoreInterface.CollectSqlDiscoveryData(String machineName)
at Microsoft.SqlServer.Chainer.Infrastructure.SqlDiscoveryDatastoreInterface.CollectDiscoveryData(String machineName)
at Microsoft.SqlServer.Chainer.Infrastructure.SqlDiscoveryDatastoreInterface.LoadData(IEnumerable`1 machineNames, String discoveryDocRootPath, String clusterDiscoveryDocRootPath)
at Microsoft.SqlServer.Configuration.SetupExtension.RunDiscoveryAction.ExecuteAction(String actionId)
at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)
at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(TextWriter statusStream, ISequencedAction actionToRun, ServiceContainer context)
Inner exception type: System.ComponentModel.Win32Exception
Message:
Not all privileges or groups referenced are assigned to the caller.
HResult : 0x80004005
Error : 1300
Stack:
at Microsoft.SqlServer.Configuration.Sco.AdjustTokenPrivilege.SetPrivilege(Boolean enable)
at Microsoft.SqlServer.Configuration.Sco.AdjustTokenPrivilege..ctor(String privilege)
at Microsoft.SqlServer.Configuration.Sco.SqlRegistry.GetLocallyCachedLocalMachineSubKey(ServiceContainer ctx, String machineName, SqlRegistryKey
key)
at Microsoft.SqlServer.Discovery.DiscoveryUtils.TryLocallyCacheRegistryKey(ServiceContainer ctx, String machineName, SqlRegistryKey
machineKey, String registryPath, RegistryView regView, String regPath, RegistryAccess registryAccess, Boolean& alreadyCached)
at Microsoft.SqlServer.Discovery.DiscoveryUtils.GetLocalMachineSubKey(ServiceContainer ctx, String machineName, RegistryView regView,
String regPath, RegistryAccess registryAccess)
at Microsoft.SqlServer.Discovery.DiscoveryEnumObject.GetSql2kMsiInstanceListInHive(String machineName, RegistryView regView)
at Microsoft.SqlServer.Discovery.DiscoveryEnumObject.LoadSql2kInstanceList(String machineName)
at Microsoft.SqlServer.Discovery.Product.GetData(EnumResult erParent)
at Microsoft.SqlServer.Management.Sdk.Sfc.Environment.GetData()
at Microsoft.SqlServer.Management.Sdk.Sfc.Environment.GetData(Request req, Object ci)
at Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.GetData(Object connectionInfo, Request request)
at Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.Process(Object connectionInfo, Request request)
And the tail of the detailed log:
(01) 2014-04-10 11:51:29 Slp: Completed Action: InitializeMsiExtension, returned True
(01) 2014-04-10 11:51:30 Slp: ----------------------------------------------------------------------
(01) 2014-04-10 11:51:30 Slp: Running Action: AddPackageModifierSourcesAction
(01) 2014-04-10 11:51:30 Slp: Completed Action: AddPackageModifierSourcesAction, returned True
(01) 2014-04-10 11:51:30 Slp: ----------------------------------------------------------------------
(01) 2014-04-10 11:51:30 Slp: Running Action: InitializeConfigAction
(01) 2014-04-10 11:51:30 Slp: Completed Action: InitializeConfigAction, returned True
(01) 2014-04-10 11:51:30 Slp: ----------------------------------------------------------------------
(01) 2014-04-10 11:51:30 Slp: Running Action: RunRemoteDiscoveryAction
(01) 2014-04-10 11:51:31 Slp: Running discovery on local machine
(01) 2014-04-10 11:51:33 Slp: Discovery on local machine is complete
(01) 2014-04-10 11:51:33 Slp: Running discovery on remote machine: VMSPDB1
(01) 2014-04-10 11:51:35 Slp: Discovery on VMSPDB1 failed due to exception
(01) 2014-04-10 11:51:36 Slp: Microsoft.SqlServer.Management.Sdk.Sfc.EnumeratorException: Failed to retrieve data for this request. ---> System.ComponentModel.Win32Exception: Not all privileges or groups referenced are
assigned to the caller.
at Microsoft.SqlServer.Configuration.Sco.AdjustTokenPrivilege.SetPrivilege(Boolean enable)
at Microsoft.SqlServer.Configuration.Sco.AdjustTokenPrivilege..ctor(String privilege)
at Microsoft.SqlServer.Configuration.Sco.SqlRegistry.GetLocallyCachedLocalMachineSubKey(ServiceContainer ctx, String machineName, SqlRegistryKey key)
at Microsoft.SqlServer.Discovery.DiscoveryUtils.TryLocallyCacheRegistryKey(ServiceContainer ctx, String machineName, SqlRegistryKey machineKey, String registryPath, RegistryView regView, String regPath, RegistryAccess
registryAccess, Boolean& alreadyCached)
at Microsoft.SqlServer.Discovery.DiscoveryUtils.GetLocalMachineSubKey(ServiceContainer ctx, String machineName, RegistryView regView, String regPath, RegistryAccess registryAccess)
at Microsoft.SqlServer.Discovery.DiscoveryEnumObject.GetSql2kMsiInstanceListInHive(String machineName, RegistryView regView)
at Microsoft.SqlServer.Discovery.DiscoveryEnumObject.LoadSql2kInstanceList(String machineName)
at Microsoft.SqlServer.Discovery.Product.GetData(EnumResult erParent)
at Microsoft.SqlServer.Management.Sdk.Sfc.Environment.GetData()
at Microsoft.SqlServer.Management.Sdk.Sfc.Environment.GetData(Request req, Object ci)
at Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.GetData(Object connectionInfo, Request request)
at Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.Process(Object connectionInfo, Request request)
--- End of inner exception stack trace ---
at Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.Process(Object connectionInfo, Request request)
at Microsoft.SqlServer.Chainer.Infrastructure.SqlDiscoveryDatastoreInterface.ProcessDTbl(DataTable dt, Int32 level)
at Microsoft.SqlServer.Chainer.Infrastructure.SqlDiscoveryDatastoreInterface.CollectSqlDiscoveryData(String machineName)
at Microsoft.SqlServer.Chainer.Infrastructure.SqlDiscoveryDatastoreInterface.CollectDiscoveryData(String machineName)
at Microsoft.SqlServer.Chainer.Infrastructure.SqlDiscoveryDatastoreInterface.LoadData(IEnumerable`1 machineNames, String discoveryDocRootPath, String clusterDiscoveryDocRootPath)
(01) 2014-04-10 11:51:36 Slp: Error: Action "Microsoft.SqlServer.Configuration.SetupExtension.RunDiscoveryAction" threw an exception during execution.
(01) 2014-04-10 11:51:36 Slp: Microsoft.SqlServer.Setup.Chainer.Workflow.ActionExecutionException: Failed to retrieve data for this request. ---> Microsoft.SqlServer.Management.Sdk.Sfc.EnumeratorException: Failed to
retrieve data for this request. ---> System.ComponentModel.Win32Exception: Not all privileges or groups referenced are assigned to the caller.
(01) 2014-04-10 11:51:36 Slp: at Microsoft.SqlServer.Configuration.Sco.AdjustTokenPrivilege.SetPrivilege(Boolean enable)
(01) 2014-04-10 11:51:36 Slp: at Microsoft.SqlServer.Configuration.Sco.AdjustTokenPrivilege..ctor(String privilege)
(01) 2014-04-10 11:51:36 Slp: at Microsoft.SqlServer.Configuration.Sco.SqlRegistry.GetLocallyCachedLocalMachineSubKey(ServiceContainer ctx, String machineName, SqlRegistryKey key)
(01) 2014-04-10 11:51:36 Slp: at Microsoft.SqlServer.Discovery.DiscoveryUtils.TryLocallyCacheRegistryKey(ServiceContainer ctx, String machineName, SqlRegistryKey machineKey, String registryPath, RegistryView
regView, String regPath, RegistryAccess registryAccess, Boolean& alreadyCached)
(01) 2014-04-10 11:51:36 Slp: at Microsoft.SqlServer.Discovery.DiscoveryUtils.GetLocalMachineSubKey(ServiceContainer ctx, String machineName, RegistryView regView, String regPath, RegistryAccess registryAccess)
(01) 2014-04-10 11:51:36 Slp: at Microsoft.SqlServer.Discovery.DiscoveryEnumObject.GetSql2kMsiInstanceListInHive(String machineName, RegistryView regView)
(01) 2014-04-10 11:51:36 Slp: at Microsoft.SqlServer.Discovery.DiscoveryEnumObject.LoadSql2kInstanceList(String machineName)
(01) 2014-04-10 11:51:36 Slp: at Microsoft.SqlServer.Discovery.Product.GetData(EnumResult erParent)
(01) 2014-04-10 11:51:36 Slp: at Microsoft.SqlServer.Management.Sdk.Sfc.Environment.GetData()
(01) 2014-04-10 11:51:36 Slp: at Microsoft.SqlServer.Management.Sdk.Sfc.Environment.GetData(Request req, Object ci)
(01) 2014-04-10 11:51:36 Slp: at Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.GetData(Object connectionInfo, Request request)
(01) 2014-04-10 11:51:36 Slp: at Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.Process(Object connectionInfo, Request request)
(01) 2014-04-10 11:51:36 Slp: --- End of inner exception stack trace ---
(01) 2014-04-10 11:51:39 Slp: Received request to add the following file to Watson reporting: C:\Users\HS2\AppData\Local\Temp\tmp6614.tmp
(01) 2014-04-10 11:51:39 Slp: The following is an exception stack listing the exceptions in outermost to innermost order
(01) 2014-04-10 11:51:39 Slp: Inner exceptions are being indented
(01) 2014-04-10 11:51:39 Slp:
(01) 2014-04-10 11:51:39 Slp: Exception type: Microsoft.SqlServer.Management.Sdk.Sfc.EnumeratorException
(01) 2014-04-10 11:51:39 Slp: Message:
(01) 2014-04-10 11:51:39 Slp: Failed to retrieve data for this request.
(01) 2014-04-10 11:51:39 Slp: HResult : 0x80131500
(01) 2014-04-10 11:51:39 Slp: Data:
(01) 2014-04-10 11:51:39 Slp: HelpLink.ProdName = Microsoft SQL Server
(01) 2014-04-10 11:51:39 Slp: HelpLink.BaseHelpUrl =
http://go.microsoft.com/fwlink
(01) 2014-04-10 11:51:39 Slp: HelpLink.LinkId = 20476
(01) 2014-04-10 11:51:39 Slp: Stack:
(01) 2014-04-10 11:51:39 Slp: at Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.Process(Object connectionInfo, Request request)
(01) 2014-04-10 11:51:39 Slp: at Microsoft.SqlServer.Chainer.Infrastructure.SqlDiscoveryDatastoreInterface.ProcessDTbl(DataTable dt, Int32 level)
(01) 2014-04-10 11:51:39 Slp: at Microsoft.SqlServer.Chainer.Infrastructure.SqlDiscoveryDatastoreInterface.CollectSqlDiscoveryData(String machineName)
(01) 2014-04-10 11:51:39 Slp: at Microsoft.SqlServer.Chainer.Infrastructure.SqlDiscoveryDatastoreInterface.CollectDiscoveryData(String machineName)
(01) 2014-04-10 11:51:39 Slp: at Microsoft.SqlServer.Chainer.Infrastructure.SqlDiscoveryDatastoreInterface.LoadData(IEnumerable`1 machineNames, String discoveryDocRootPath,
String clusterDiscoveryDocRootPath)
(01) 2014-04-10 11:51:39 Slp: at Microsoft.SqlServer.Configuration.SetupExtension.RunDiscoveryAction.ExecuteAction(String actionId)
(01) 2014-04-10 11:51:39 Slp: at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)
(01) 2014-04-10 11:51:39 Slp: at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(TextWriter statusStream, ISequencedAction actionToRun, ServiceContainer
context)
(01) 2014-04-10 11:51:39 Slp: Inner exception type: System.ComponentModel.Win32Exception
(01) 2014-04-10 11:51:39 Slp: Message:
(01) 2014-04-10 11:51:39 Slp: Not all privileges or groups referenced are assigned to the caller.
(01) 2014-04-10 11:51:39 Slp:
(01) 2014-04-10 11:51:39 Slp: HResult : 0x80004005
(01) 2014-04-10 11:51:39 Slp: Error : 1300
(01) 2014-04-10 11:51:39 Slp: Stack:
(01) 2014-04-10 11:51:39 Slp: at Microsoft.SqlServer.Configuration.Sco.AdjustTokenPrivilege.SetPrivilege(Boolean
enable)
(01) 2014-04-10 11:51:39 Slp: at Microsoft.SqlServer.Configuration.Sco.AdjustTokenPrivilege..ctor(String privilege)
(01) 2014-04-10 11:51:39 Slp: at Microsoft.SqlServer.Configuration.Sco.SqlRegistry.GetLocallyCachedLocalMachineSubKey(ServiceContainer
ctx, String machineName, SqlRegistryKey key)
(01) 2014-04-10 11:51:39 Slp: at Microsoft.SqlServer.Discovery.DiscoveryUtils.TryLocallyCacheRegistryKey(ServiceContainer ctx,
String machineName, SqlRegistryKey machineKey, String registryPath, RegistryView regView, String regPath, RegistryAccess registryAccess, Boolean& alreadyCached)
(01) 2014-04-10 11:51:39 Slp: at Microsoft.SqlServer.Discovery.DiscoveryUtils.GetLocalMachineSubKey(ServiceContainer
ctx, String machineName, RegistryView regView, String regPath, RegistryAccess registryAccess)
(01) 2014-04-10 11:51:39 Slp: at Microsoft.SqlServer.Discovery.DiscoveryEnumObject.GetSql2kMsiInstanceListInHive(String
machineName, RegistryView regView)
(01) 2014-04-10 11:51:39 Slp: at Microsoft.SqlServer.Discovery.DiscoveryEnumObject.LoadSql2kInstanceList(String machineName)
(01) 2014-04-10 11:51:39 Slp: at Microsoft.SqlServer.Discovery.Product.GetData(EnumResult erParent)
(01) 2014-04-10 11:51:39 Slp: at Microsoft.SqlServer.Management.Sdk.Sfc.Environment.GetData()
(01) 2014-04-10 11:51:39 Slp: at Microsoft.SqlServer.Management.Sdk.Sfc.Environment.GetData(Request req, Object ci)
(01) 2014-04-10 11:51:39 Slp: at Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.GetData(Object connectionInfo, Request request)
(01) 2014-04-10 11:51:39 Slp: at Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.Process(Object connectionInfo, Request request)
(01) 2014-04-10 11:51:44 Slp: Watson Bucket 2
Original Parameter Values
(01) 2014-04-10 11:51:44 Slp: Parameter 0 : SQL Server
2012@RTM@KB2931078
(01) 2014-04-10 11:51:44 Slp: Parameter 1 : Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.Process
(01) 2014-04-10 11:51:44 Slp: Parameter 2 : Microsoft.SqlServer.Configuration.Sco.AdjustTokenPrivilege.SetPrivilege
(01) 2014-04-10 11:51:44 Slp: Parameter 3 :
Microsoft.SqlServer.Management.Sdk.Sfc.EnumeratorException@-2146233088
(01) 2014-04-10 11:51:44 Slp: Parameter 4 :
System.ComponentModel.Win32Exception@-2147467259
(01) 2014-04-10 11:51:44 Slp: Parameter 5 : RunRemoteDiscoveryAction
(01) 2014-04-10 11:51:44 Slp: Parameter 8 : 1300
(01) 2014-04-10 11:51:44 Slp:
Final Parameter Values
(01) 2014-04-10 11:51:44 Slp: Parameter 0 : SQL Server
2012@RTM@KB2931078
(01) 2014-04-10 11:51:44 Slp: Parameter 1 : 0x6785B09D
(01) 2014-04-10 11:51:44 Slp: Parameter 2 : 0xB2652E58
(01) 2014-04-10 11:51:44 Slp: Parameter 3 : 0x74E34741
(01) 2014-04-10 11:51:44 Slp: Parameter 4 : 0xDC80C325
(01) 2014-04-10 11:51:44 Slp: Parameter 5 : RunRemoteDiscoveryAction
(01) 2014-04-10 11:51:44 Slp: Parameter 8 : 0xA05EFA62
(01) 2014-04-10 11:51:45 Slp: Sco: Attempting to write hklm registry key Microsoft SQL Server to file C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20140410_115053\Registry_SOFTWARE_Microsoft_Microsoft SQL
Server.reg_
(01) 2014-04-10 11:51:45 Slp: The following exception occurred while preparing registry logs during Watson failure processing: Not all privileges or groups referenced are assigned to the caller.
(01) 2014-04-10 11:51:45 Slp: Sco: Attempting to write hklm registry key Uninstall to file C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20140410_115053\Registry_SOFTWARE_Microsoft_Windows_CurrentVersion_Uninstall.reg_
(01) 2014-04-10 11:51:45 Slp: The following exception occurred while preparing registry logs during Watson failure processing: Not all privileges or groups referenced are assigned to the caller.
(01) 2014-04-10 11:51:45 Slp: Sco: Attempting to write hklm registry key MSSQLServer to file C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20140410_115053\Registry_SOFTWARE_Microsoft_MSSQLServer.reg_
(01) 2014-04-10 11:51:45 Slp: The following exception occurred while preparing registry logs during Watson failure processing: Not all privileges or groups referenced are assigned to the caller.
(01) 2014-04-10 11:51:45 Slp: Sco: Attempting to write hklm registry key Microsoft SQL Server to file C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20140410_115053\Registry_SOFTWARE_Wow6432Node_Microsoft_Microsoft
SQL Server.reg_
(01) 2014-04-10 11:51:45 Slp: The following exception occurred while preparing registry logs during Watson failure processing: Not all privileges or groups referenced are assigned to the caller.
(01) 2014-04-10 11:51:45 Slp: Sco: Attempting to write hklm registry key Uninstall to file C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20140410_115053\Registry_SOFTWARE_Wow6432Node_Microsoft_Windows_CurrentVersion_Uninstall.reg_
(01) 2014-04-10 11:51:45 Slp: The following exception occurred while preparing registry logs during Watson failure processing: Not all privileges or groups referenced are assigned to the caller.
(01) 2014-04-10 11:51:45 Slp: Sco: Attempting to write hklm registry key MSSQLServer to file C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20140410_115053\Registry_SOFTWARE_Wow6432Node_Microsoft_MSSQLServer.reg_
(01) 2014-04-10 11:51:45 Slp: The following exception occurred while preparing registry logs during Watson failure processing: Not all privileges or groups referenced are assigned to the caller.
(01) 2014-04-10 11:51:46 Slp: Failed to retrieve data for this request.
(01) 2014-04-10 11:51:46 Slp: Watson bucket for exception based failure has been created
(01) 2014-04-10 11:51:46 Slp: Sco: Attempting to create base registry key HKEY_LOCAL_MACHINE, machine
(01) 2014-04-10 11:51:46 Slp: Sco: Attempting to open registry subkey Software\Microsoft\Microsoft SQL Server\110
(01) 2014-04-10 11:51:46 Slp: Sco: Attempting to get registry value EnableErrorReporting
(01) 2014-04-10 11:51:46 Slp: WER: Successfully read app consent from registry Software\Microsoft\Microsoft SQL Server\110\EnableErrorReporting=0.
(01) 2014-04-10 11:51:46 Slp: WER: Application level consent value '0' was mapped to consent status 'WerConsentDenied'
(01) 2014-04-10 11:51:46 Slp: WER: Result of the submission:: 'WerDisabled'
(01) 2014-04-10 11:51:46 Slp: WER: Submitted 1 of 1 failures to the Watson data repository
(01) 2014-04-10 11:51:46 Slp: Sco: File 'C:\Windows\system32\Cluster.exe' does not exist
(01) 2014-04-10 11:51:46 Slp: Failed to collect cluster logs, cannot find Cluster.exe under system directory.
(01) 2014-04-10 11:51:46 Slp: Dumping final cluster state.
(01) 2014-04-10 11:51:49 Slp: Completed dumping final cluster state.
(01) 2014-04-10 11:51:51 Slp:
(01) 2014-04-10 11:51:51 Slp: ----------------------------------------------------------------------
(01) 2014-04-10 11:51:51 Slp:
(01) 2014-04-10 11:51:51 Slp: Error result: -2146233088
(01) 2014-04-10 11:51:51 Slp: Result facility code: 19
(01) 2014-04-10 11:51:51 Slp: Result error code: 5376
(01) 2014-04-10 11:51:51 Slp: SQM Service: Sqm does not have active session.Hello SQL Ranger,
Thanks for posting the detailed log. I dont have exact solution for this but I can give you some hint what could be reason patch has failed below message points to fact that there is some issue with account which is used to install CU patch.Have alook at
below log.It says that when patch was trying to get details from other node in cluster it was not able to.
01) 2014-04-10 11:51:33 Slp: Discovery on local machine is complete
(01) 2014-04-10 11:51:33 Slp: Running discovery on remote machine: VMSPDB1
(01) 2014-04-10 11:51:35 Slp: Discovery on VMSPDB1 failed due to exception
(01) 2014-04-10 11:51:36 Slp: Microsoft.SqlServer.Management.Sdk.Sfc.EnumeratorException: Failed to retrieve data for this request. ---> System.ComponentModel.Win32Exception: Not all privileges or groups referenced are assigned to the caller.
IMO I strongly feel it is issue with the account. Microsoft has also documented about this for SQL Server 2008 .Have a look at following links
http://support.microsoft.com/default.aspx?scid=kb;en-US;2000257
Please also assign privilege mentioned in below link
http://www.bradg.co.za/?p=12
Hope this helps
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers -
Problems with retrieving data from tables with 240 and more records
Hi,
I've been connecting to Oracle 11g Server (not sure exact version) using Oracle 10.1.0 Client and O10 Oracle 10g driver. Everything was ok.
I installed Oracle 11.2.0 Client and I started to have problems with retrieving data from tables.
First I used the same connection string, driver and so on (O10 Oracle 10g) then I tried ORA Oracle but with no luck. The result is like this:
I'm able to connect to database. I'm able to retrieve data but from small tables (e.g. with 110 records it works perfectly using both O10 and ORA drivers). When I try to retrieve data from tables with like 240 and more records retrieval simply hangs (nothing happens at all - no error, no timeout). Application seems to hang forever.
I'm using Powerbuilder to connect to Database (either PB10.5 using O10 driver or PB12 using ORA driver). I used DBTrace, so I see that query hangs on the first FETCH.
So for the retrievals that hang I have something like:
(3260008): BIND SELECT OUTPUT BUFFER (DataWindow):(DBI_SELBIND) (0.186 MS / 18978.709 MS)
(3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=0
(3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=1
(3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=0
(3260008): EXECUTE:(DBI_DW_EXECUTE) (192.982 MS / 19171.691 MS)
(3260008): FETCH NEXT:(DBI_FETCHNEXT)
and this is the last line,
while for retrievals that end, I have FETCH producing time, data in buffer and moving to the next Fetch until all data is retrieved
On the side note, I have no problems with retrieving data either by SQL Developer or DbVisualizer.
Problems started when I installed 11.2.0 Client. Even if I want to use 10.0.1 Client, the same problem occurs. So I guess something from 11.2.0 overrides 10.0.1 settings.
I will appreciate any comments/hints/help.
Thank you very much.pgoel wrote:
I've been connecting to Oracle 11g Server (not sure exact version) using Oracle 10.1.0 Client and O10 Oracle 10g driver. Everything was ok.Earlier (before installing new stuff) did you ever try retrieving data from big tables (like 240 and more records), if yes, was it working?Yes, with Oracle 10g client (before installing 11g) I was able to retrieve any data, either it was 10k+ records or 100 records. Installing 11g client changed something that even using old 10g client (which I still have installed) fails to work. The same problem occur no matter I'm using 10g or 11g client now. Powerbuilder hangs on retrieving tables with more than like 240 records.
Thanks. -
Is it possible to retrieve data using RFC alone with out using BAPI ?
Hi ,
Is it possible to connect SAP to Non-SAP systems to retrieve data using RFC alone with out using BAPI ?
thanks
RamaHello Nelson,
Could you please explain how this can be done. Because my understanding is that only BAPI can be used to connect Non SAP and SAP system not RFC function module.
Regards
Farzan -
Retrieve data from BW with an XML interface
Hello all,
Is it possible to retrieve data from BW with an XML interface ? And if so, how can we do this ?
Kind regards,
MarcThanks Edan,
Can you please example as how to access the ODS object in the BW using ABAP? Please note that we would initiate the call from another XAPP system and update the data into the CRM system.
Also please provide an example as how the BAPI can acces the cube data in BW.
I assume that we will be writing both the BAPI and the ABAP code( as an RFC) in the BW sysyem and call those from the XAPPS to get data out of BW Cube and ODS respectively.
Thanks
Arunava -
Wrong file in the "Populating an ArrayCollection with retrieved data" exercise
In the "Populating an ArrayCollection with retrieved data" there is a file ex2_04_starter.zip, which contains ex2_04_solution.mxml file and should contain ex2_04_start.mxml, right ?
Great videos! Thank you!Hi Burpix,
Looks like the link for the starter file within the exercise is linked to the wrong file. If you pull the project archive for Day 2 you will get all of the starter & solution files and video transcripts for all of Day 2 exercises. The starter file for ex2.04 is correct if download it from the project archive zip. Adobe will be fixing the link within the exercise later but for now you can pull the correct starter file from the project archive zip. -
Is it possible to retrieve data from an Oracle db with an LDAP query?
Our application uses an LDAP query to retrieve data from Microsoft Active Directory. Is it also possible to retrieve data from an Oracle database with an LDAP query?
if you have Oracle Internet Directory, you will retrieve with ldapsearch data, which are physically stored in the database. But to select * from emp where ename='SCOTT', it is probably not possible.
At least I have never heard of such a product which translate ldap query in sql query. But feel free to write your own one in perl :-) -
Retrieving Data from SQLite and make link with the ID of the retrieved data?
Hello, first of all sorry if my english is bad as im from Mexico.
I using HTML/Javascript/SQLite, and im having an issue while retrieving data from SQLite, all my querys work right, but when i try to select an Id, the Name, Firstname, and Lastname and only use the Name, Firstname and Lastname to print on screen and the Id to use as a link or OnClick query with the id more info from the name of the person..
My SQLite query is the next one.
var sql = "SELECT [sis_persona].[idPersona], [sis_persona].[Nombre], [sis_persona].[Paterno], [sis_persona].[Materno] FROM [sis_persona] WHERE Nombre LIKE '"+ nombre1+"%' AND Paterno LIKE '"+ paterno1+"%' AND Materno LIKE '"+ materno1+"%' ORDER BY [sis_persona].[Nombre], [sis_persona].[Paterno], [sis_persona].[Materno] LIMIT 20";
And my ResultHandler is the next one:
row = document.createElement("tr");
cell = document.createElement("th");
cell.innerText = "Nombre";
row.appendChild(cell)
cell = document.createElement("th");
cell.innerText = "Paterno";
row.appendChild(cell)
cell = document.createElement("th");
cell.innerText = "Materno";
row.appendChild(cell)
tbl.appendChild(row);
var numRows = result.data.length;
for (var i = 0; i < numRows; i++)
// iterate over the columns in the result row object
row = document.createElement("tr");
for (col in result.data[i])
var ea = result.data[i];
cell = document.createElement("td");
var a = document.createElement( 'a' );
a.setAttribute('HREF','#');
var txt = document.createTextNode( ea.Nombre );
a.appendChild( txt );
a.onclick = function() {querytest(ea.idPersona);};
row.appendChild( a );
row.appendChild(cell);
cell = document.createElement("td");
var a = document.createElement( 'a' );
a.setAttribute('HREF','#');
var txt = document.createTextNode( ea.Paterno );
a.appendChild( txt );
a.onclick = function() {querytest(ea.idPersona);};
row.appendChild( a );
row.appendChild(cell);
cell = document.createElement("td");
var a = document.createElement( 'a' );
a.setAttribute('HREF','#');
var txt = document.createTextNode( ea.Materno );
a.appendChild( txt );
a.onclick = function() {querytest(ea.idPersona);};
row.appendChild( a );
row.appendChild(cell);
tbl.appendChild(row);
And this is where i have the problem, it print three times and i dont know how to take print only the result and make a link with the id from the query.
var ea = result.data[i];
cell = document.createElement("td");
var a = document.createElement( 'a' );
a.setAttribute('HREF','#');
var txt = document.createTextNode( ea.Nombre );
a.appendChild( txt );
a.onclick = function() {querytest(ea.idPersona);};
row.appendChild( a );
row.appendChild(cell);
Anyone have any ideas?
Sorry again if my english is bad.
Thanks in advanceHi Prashant,
Continuation to above my thread. There is a small correction.Directly in lsmw not possible. I uploaded using the same code of lsmw and made one report. Through that i uploaded the data directly selecting the file.
Regards,
Madhu.
Maybe you are looking for
-
Oracle 9.0.1.0 and Ora-00604 when dropping a table.
Hi. I'm running Oracle 9i (9.0.1.0.0) on Redhat linux 7.3 I am trying to drop a table and I get this error. ORA-00604: error occurred at recursive SQL level 1 ORA-00001: unique constraint (SYS.I_COL_USAGE$) violated Any idea, what I should do? Thanks
-
HT5422 Different versions of Remote Desktop Admin 3.6.1
How do Remote Desktop Admin 3.6.1 from 24 Sept with Download ID SL1595 and 14.73 MB in size and another from 3 Dec labelled DL1570 and 14.75 MB in size differ? Perhaps this is a version labelling problem, the one from 3 Dec perhaps is actually 3.6.2
-
Transferri​ng movies from pc to playbook
Can any one help me transfer movies from my laptop to playbook message says destination access denied.
-
When I send a file to Ps from Lr, edit that file then save it, Lr puts that file at the end of the line instead of next to the file I was working on. When you have 600 photos in a down loud, it is a pain to scroll through the photo's to find your pl
-
Time machine and Windows Partition
Will Time Machine backup my windows/Boot Camp partition?