SQL Server TG Query Optimization
We are using Oracle Transparent Gateway 9.0.1.1.1 to connect an Oracle (Windows 2000) 9.1.7.4.0 database to a SQl Server 2000 SP2 database.
When we use two simple queries to retrieve information from the gateway, the data is returned with a response time of less than 100 milliseconds. When we combine these queries into a single query, data is returned with a response time of over 20 seconds.
QUESTION: Is there any documentation as to the "Do's" and "Don'ts" of querying across the TG for best response times? Anything concerning joining Oracle and SQL Server tables in particular would be appreciated.
Scott Allen
[email protected]
Scott,
The gateway does not create any type of locks. Could you provide the sql statements in your session. Also take a look at the trace generated by the SQL Server profiler
Similar Messages
-
SSRS - SQL Server Spatial Query
Hi, I was hoping someone could help me.
I'm creating an SSRS report with Map and importing points via SQL Server Spatial query. I have a db table with 8,000 points bu the import only ever brings in the first 2,000 queried (no matter what the filter is). Is there a limitation in SSRS that can be
changed via a configuration setting?
Many thanks in advance for any help on this,
Steve.Really appreciate you coming back so quick Olaf.
No its a straightforward query (select AccountNum, Name, Address, Longitude, Lattitude, UrbanArea, County, MI_STYLE, MI_PRINX, SP_GEOMETRY from <table>)
Just to give the whole picture. I had 8,000 points in MapInfo version 10. I imported them to SQL Server 2012 via MapInfo Easy Loader.
The SQL Server spatial points import to SSRS and the Bing overlay map works great (so they import to correct space) but its only a subset of the points that import. I can pick any subset using the WHERE clause but I cannot get all 8,000 points.
I was hoping there was a configuration setting somewhere in SSRS that was causing the problem. -
I have the below network setup:-
1. Its a simple network at my father's office at a small town called Ichalkaranji (District - Kolhapur, Maharashtra).
2. We are using private network range 192.168.1.xxx with two Windows Server 2003 Enterprise Edition with SP2 licensed copies and 15 local Windows 7 clients who are only using Server A.
3. The network is having a TP-Link Braodband Router Connected to internet with the IP 192.168.1.1.
4. Both there Windows Server 2003 Enterprise Edition with SP2 are running separate SQL Server 2005 Express with Advanced Services, you can treat them as Server A (Problematic Server with IP of 192.168.1.2)
and Server B (this is not having any issue with IP of 192.168.1.3).
5. Server A is also being used by 6 Remote users from our Kolkata office using DDNS facility through the NO IP client software which installed separately on both the servers. Kolkata remote users
do not use OR access the Server B.
6. Server B is being used by only 2 Remote users from our Erode office (Under Salem District, Tamilnadu) using DDNS facility through the NO IP client software which installed separately on both
the servers. Erode remote users do not use OR access the Server A.
7. The front end application which running separately on both the servers have been developed in VB by a local vendor at Ichalkaranji (District - Kolhapur, Maharashtra).
8. Both Servers are having the same database structure in terms of design and tables format. Only difference is that both the servers are being used separately.
9. This error OR problem is only related to Server A, where on the clients we get the message "error [hyt00] [microsoft][odbc sql server driver] query timeout expired" every now and then.
10. We have to frequently reboot the server whenever we get this message on the client machines. May be after rebooting every thing works perfectly for 2 hours / 5 Hours / may be one full day but
the the error will come back for sure.
11. Current Database back up size on Server A is around 35 GB and take around 1 hour 15 minutes daily to take the back up.
12. Current Database back up size on Server B is around 3 GB and take around 5 to 10 minutes daily to take the back up.
13. One thing I have noticed is that when ever we reboot Server A, for some time sqlsrvr.exe file will show memory usage of 200 to 300 MBs but it will start using slowly, what i understand is that
this is the way SQL Server works.
14. Both the Servers are also running Quick heal Antivirus Server Edition separate licensed copies also.
15. Server B is also running Tally ERP 9 Licenses copy which is being used locally by 15 users of Ichalkaranji (District - Kolhapur, Maharashtra) same users
Can any one help to resolve this issue. Any help will be highly appreciated.The error message "query timeout expired" occurs, because by default many APIs, including ODBC only waits for 30 seconds for SQL Server to send any output. If no data has been seen for this period of time, they tell SQL Server to cancel execution
and return this error to the caller.
This timeout could be seen as a token that the query is taking too long time to execute and this needs to be fixed. But it can also be a pain in the rear parts, if you are content with a report taking five minutes, because you only run it once a day.
The simplest way to get rid of the error is to set the timeout to zero, which means "wait forever". This is something your vendor would have to do. This may, however, not resolve the problem, as the users may just find that the application is hanging.
To wit, there are two reasons why the query takes more than 30 seconds to complete. One is that there is simply that much work to do. This can be reduced by adding indexes or by doing other tuning, if the execution time is not acceptable. The other possibility
is blocking. That is, there is a process blocking this query from completing. This is much more likely to require attention.
It is not clear to me, whether the vendor has developed the database part as well. In this case, you should probably call the vendor's support desk to have them to sort this out.
Finally, I am little puzzled. You say that you are using Express Edition, but one of the databases is 35 GB in size. 35 GB is far above the limit for Express Edition.
Erland Sommarskog, SQL Server MVP, [email protected] -
How to convert SQL Server hierarchical query (CTE) to Oracle?
How to convert SQL Server hierarchical query (CTE) to Oracle?
WITH cte (col1, col2) AS
SELECT col1, col2
FROM dbo.[tb1]
WHERE col1 = 12
UNION ALL
SELECT c.col1, c.col2
FROM dbo.[tb1] AS c INNER JOIN cte AS p ON c.col2 = p.col1
DELETE a
FROM dbo.[tb1] AS a INNER JOIN cte AS b
ON a.col1 = b.col1See: http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_10002.htm#i2129904
Ah, just spotted it's a delete statement - you won't be able to do it using subquery factoring in Oracle.
I had a go at trying to convert for you, but notice that you reference the cte from inside the cte... I can only assume you have a table called cte too...
DELETE FROM dbo.tb1
WHERE col1 = 12
OR col2 IN (SELECT col1 FROM cte)
Edited by: Boneist on 22-Jun-2009 09:19 -
Copy and Paste from SQL server to Query Generator eliminate spaces
Hi:
My query is run perfectly on SQL server.
However, when I copied it to Query Generator in SAP B1, it can not be run. When I look closely I see that some spaces have been truncated for example between the fieldname and key words like FROM, LEFT OUTER JOIN. I have to then going through the Query Generator in SAP B1 to put in the spaces in appropriate places. This process took long time and require very close attention and did not make any sense to me, since my query already work in SQL server query manager.
Is there any way that we can make Query Generator in SAP B1 keeping the same format (ie. not eliminate the spaces) as in SQL server Query Manager?
Best Regards,
Phong Nguyen.Here is what I mean:
SELECT YEAR(T1.DocDate) YEAR_NO, DATEPART(wk,T1.DocDate) WEEK_NO,SUM(T1.LineTotal) TotalShrinkage_Sales, (SUM(T1.LineTotal)/SUM(T1.Total_Sales)) Percent_Shrinkage, SUM(T1.Total_Sales) Total_Sales,COUNT(DISTINCT T1.Shrinkage_No) Shrinkage_Volume, SUM(T1.TotalCost) TotalShrinkage_CostFROM (SELECT V0.ITEMCODE, V0.DocEntry Shrinkage_No, V0.DocDate, V0.LineTotal, 0 Total_Sales, V0.TotalCostFROM dbo.V_SHRINKAGE_TOTAL V0 WHERE V0.TransType='Shrinkage'UNION ALLSELECT V1.ITEMCODE, null Shrinkage_No, V1.DocDate, 0 LineTotal, V1.LineTotal Total_Sales, 0 TotalCostFROM dbo.V_Sales_Invoice V1UNION ALLSELECT V2.ITEMCODE, null Shrinkage_No, V2.DocDate,0 LineTotal, V2.LineTotal Total_Sales, 0 TotalCost FROM dbo.V_Credit_Note V2) T1WHERE DATEDIFF(wk,T1.DocDate,getdate())<=12GROUP BY YEAR(T1.DocDate), DATEPART(wk,T1.DocDate)ORDER BY YEAR(T1.DocDate) ASC,DATEPART(wk,T1.DocDate) ASC
You can see the the third line (top down) the space between the field TotalShrinkage_Cost and FROM has been eliminated.
Also you can see that on the 4th line (top down) the space between the field V0.TotalCost and FROM has been eliminated.
Also in the 5th line (top down) you can see: V0.TransType='Shrinkage'UNION ALLSELECT --- spaces have been eliminated between 'Shrinkage" and UNION and ALL and SELECT
The list can go on.
Can you help there?
Thanks,
Phong Nguyen. -
MS SQL Server Architecture (Query Processing)
Explain Sql server Architecture for Select statement diagrammatically ?
Explain Sql server Architecture for Insert , update statements diagrammatically ?
bhageeHi,
to me, we have to completely read SQL Server Internals book to understanding internals of DMLs. so many internal compoents, layers works starting from pressing F5 at client location till we get the result in results pane.
Below link has high level info about SELECT
http://www.sqlservercentral.com/blogs/livingforsqlserver/2010/12/05/what-happens-when-a-query-is-submitted/
internals of SELECT
http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/
Internals of INSERT
http://www.sqlservercentral.com/blogs/livingforsqlserver/2012/11/26/time-pass-with-transaction-log-part-4-ddl/
http://www.sqlservercentral.com/blogs/livingforsqlserver/2012/11/27/time-pass-with-transaction-log-part-5-insert/
hope you would find this useful.
Ramkumar Gopal Living For SQL Server Blog: http://www.sqlservercentral.com/blogs/livingforsqlserver/ Facebook: https://www.facebook.com/#!/groups/livingforsqlserver/ Twitter: https://twitter.com/LivingForSQL -
How to get hardware related metrics of SQL Server through query ?
Hi Folks,
I am newbie to the SQL Server programming. I also follow this forum only now. I am not sure if these kind of question had been asked in the past. Let me furnish you more detail about my query. I do like
to get few details regarding the SQL server. I do need the following details to get the information about it through query
SQL Server Installation directory
No. Of CPU(as i read SQL Server standard support 4 cpu and Enterprise support 32 CPU)
CPU Speed of the SQL Server installed machine
Disk Storage details
Operating system on which the SQL Server is installed
Location of the swap file of SQL Server
TempDB directory path
System database directory path
User database location
Log files location
I do like to get information like this through query. Can i know if such information can be get through query or it should be get only thro' WMI. Please drop your ideas in getting these details.
Thanks in Advance,
Regards,
JeiSuryaTry this query in the below link
http://gallery.technet.microsoft.com/Query-to-find-all-the-8fa765e6
you will get the SQL Server and H/W Details like
IP Address
FQDN
CurrentSQLNodeName
SQL Instance Name
SQL Server Product
SQL Server Edition
Service Pack
SQL Server Version
Operating System
OS SP Level
OS Build Number
SystemManufacturer
Processor Type
System Model
Total RAM in MB
NumberOfPhysicalCPUs
NumberOfCoresInEachCPU
TotalNumberOfCores
NumberOfLogicalCPUs -
Hi Team ,
I have some queries for MS SQL server , can you please clarify the below points :
Can I buy licenses for SQL 2008 R2 or do I need to buy license for MSSQL server 2012 license and then downgrade it?
Would there be any additional cost for downgrade ?
If I want to buy license for MSSQL 2008 ,would it be “per processor “ or “per core” for Virtualization i.e. which of the two licensing policies will apply.
Please clarify on this.relevant microsoft oem docs/links would be really helpful
ThanksHi Team ,
I have some queries for MS SQL server , can you please clarify the below points :
Can I buy licenses for SQL 2008 R2 or do I need to buy license for MSSQL server 2012 license and then downgrade it?
Would there be any additional cost for downgrade ?
If I want to buy license for MSSQL 2008 ,would it be “per processor “ or “per core” for Virtualization i.e. which of the two licensing policies will apply.
1. You can buy license for 2008 R2, if your requirement is 2008 R2 dont buy 2012 its costly.. You dont need to buy 2012 license and downgrade it.I am not sure whether it is possible or not licensing expert will be in better position to answer this question.
2.Licensing expert can tell better.
3.Licensing expert can tell better. Please use information provided by Kalman.But i still suggest you to go for 2008 R2 IF that suits your requirement
PS: This is technical forum, Licensing question must be directed to licensing expert
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers
My TechNet Wiki Articles -
How to fetch presence in Lync 2013 from SQL server (using query)
We are running Lync 2013 setup with 5 FE and 2 BE SQL (mirrored) servers.
How can i get presence information for our users by script or SQL queries?
My Concern is to fetch out current presence information of a list of users (CSV file) by script (Powershell or SQL query) for automation purpose. So that one need not to go to Lync 2013 (or anything) Client for every single user, to check their corresponding
presence.
E.g Say a service desk agent is handling tickets of 200 users per day. So it will be time consuming for him/her to go to Lync 2013 client and check presence for every user. It would be better for SD agent to operate, if we could make a script to fetch presence
status for the list of 200 users.
We will fetch the information when required and send a mail to him/her.
i have asked this question under Presence and IM forum.
https://social.technet.microsoft.com/Forums/en-US/ef6287d1-e474-48ab-a411-f3813d256145/how-to-fetch-presence-information-in-lync-2013?forum=lyncprofile
been suggested to post it here.Create a Store procedure which will give you integer value according to presence status:
USE [rtc]
GO
/****** Object: StoredProcedure [dbo].[GetAvailability] Script Date: 05/01/2015 10:36:35 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <sudipta samanta>
-- Create date: <02.01.2015>
-- Description: <fetch presence information of user>
-- =============================================
CREATE PROCEDURE [dbo].[GetAvailability]
@_Publisher varchar(50)
AS
DECLARE
@agrregate_state varchar(500),
@availability varchar(50),
@index_first int,
@index_last int,
@index int
BEGIN
SET NoCount ON
set @agrregate_state = (select top 1 Data from dbo.DiagPublisherDataView(@_Publisher) order by LastPubTime desc);
set @index_first = (select CHARINDEX('<availability>',@agrregate_state));
set @index_last = (select CHARINDEX('</availability>',@agrregate_state));
set @index = @index_first + 14;
set @availability = (SUBSTRING(@agrregate_state,@index,@index_last - @index));
return CONVERT(int, @availability);
END
GO -
Sql Server Express Query String error
I am having trouble trying to filter my sql database using the query string against a date column in my database. I set a date variable = "dd/mm/yyy" format but when I apply that in the sql query as:
StartPeriod = CDate("01/" & Today.Month.ToString & "/" & Today.Year.ToString)
EndPeriod = CDate(Today.Day.ToString & "/" & Today.Month.ToString & "/" & Today.Year.ToString)
At this point StartPeriod = #04/01/2015# and EndPeriod is #04/27/2015#
sql = "SELECT * FROM Transactions WHERE ((PaidOutDate IS Null) OR (TransDate >= '" & StartPeriod & "' AND TransDate <= '" & EndPeriod & "')
When I execute the Sql command I get this error:
"Conversion failed when converting date and/or time from character string"
My Current Culture is {en-AU}
Any help is appreciated.
Brad
BHendVisakh,
Further to the problem above. Your suggestion worked well on my laptop, but when I transferred the program to my desktop it failed with the error: "Conversion failed when converting date and/or time from character string" again. Both
computers are running the same version of Windows 8.1, both running the same version of vs express 2012 and both running the same version of ssms. Both Windows 8.1 versions have the same English (Australia) as the Region and language. The only
difference that I can find is that while both have a CurrentCulture of {en=AU} and CurrentUICulture of {en-GB} the laptop, where the program works has an InstalledUICulture of {en-GB} and the PC where it doesn't work has an InstalledUICulture of {en-US}.
Do you think this could be the problem? If so, how would I change the InstalledIUCulture?
As you can tell I am way our of my depth here, I've looked in the Control Panel and both computers appear to have the same settings for options that I think are relevant, but of course there could be hundreds of other settings nI don't know about.
I've also progressively worked through the Registry on both computers comparing their settings but could find nothing relevant.
Any suggestions of where to look?
Thanks Again
Brad
BHend -
SQL Server 2008R2 SP2 Query optimizer memory leak ?
It looks like we are facing a SQL Server 2008R2 queery optimizer memory leak.
We have below version of SQL Server
Microsoft SQL Server 2008 R2 (SP2) - 10.50.4000.0 (X64)
Jun 28 2012 08:36:30
Copyright (c) Microsoft Corporation
Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)
The instance is set MAximum memory tro 20 GB.
After executing a huge query (2277 kB generated by IBM SPSS Clementine) with tons of CASE and a lot of AND/OR statements in the WHERE and CASE statements and muliple subqueries the server stops responding on Out of memory in the internal pool
and the query optimizer has allocated all the memory.
From Management Data Warehouse we can find that the query was executed at
7.11.2014 22:40:57
Then at 1:22:48 we recieve FAIL_PACE_ALLOCATION 1
2014-11-08 01:22:48.70 spid75 Failed allocate pages: FAIL_PAGE_ALLOCATION 1
And then tons of below errors
2014-11-08 01:24:02.22 spid87 There is insufficient system memory in resource pool 'internal' to run this query.
2014-11-08 01:24:02.22 Server Error: 17300, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2014-11-08 01:24:02.22 Server Error: 17300, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2014-11-08 01:24:02.30 Server Error: 17312, Severity: 16, State: 1.
2014-11-08 01:24:02.30 Server SQL Server is terminating a system or background task Fulltext Host Controller Timer Task due to errors in starting up the task (setup state 1).
2014-11-08 01:24:02.22 spid74 Error: 701, Severity: 17, State: 123.
2014-11-08 01:24:02.22 spid74 There is insufficient system memory in resource pool 'internal' to run this query.
2014-11-08 01:24:13.22 Server Error: 17312, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2014-11-08 01:24:13.22 spid87 Error: 701, Severity: 17, State: 123.
2014-11-08 01:24:13.22 spid87 There is insufficient system memory in resource pool 'internal' to run this query.
2014-11-08 01:24:13.22 spid63 Error: 701, Severity: 17, State: 130.
2014-11-08 01:24:13.22 spid63 There is insufficient system memory in resource pool 'internal' to run this query.
2014-11-08 01:24:13.22 spid57 Error: 701, Severity: 17, State: 123.
2014-11-08 01:24:13.22 spid57 There is insufficient system memory in resource pool 'internal' to run this query.
2014-11-08 01:24:13.22 Server Error: 17300, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2014-11-08 01:24:18.26 Server Error: 17300, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2014-11-08 01:24:24.43 spid81 Error: 701, Severity: 17, State: 123.
2014-11-08 01:24:24.43 spid81 There is insufficient system memory in resource pool 'internal' to run this query.
2014-11-08 01:24:18.25 Server Error: 18052, Severity: -1, State: 0. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2014-11-08 01:24:18.25 Server BRKR TASK: Operating system error Exception 0x1 encountered.
2014-11-08 01:24:30.11 Server Error: 17300, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2014-11-08 01:24:30.11 Server Error: 17300, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2014-11-08 01:24:35.18 spid57 Error: 701, Severity: 17, State: 131.
2014-11-08 01:24:35.18 spid57 There is insufficient system memory in resource pool 'internal' to run this query.
2014-11-08 01:24:35.18 spid71 Error: 701, Severity: 17, State: 193.
2014-11-08 01:24:35.18 spid71 There is insufficient system memory in resource pool 'internal' to run this query.
2014-11-08 01:24:35.18 Server Error: 17312, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2014-11-08 01:24:35.41 Server Error: 17312, Severity: 16, State: 1.
2014-11-08 01:24:35.41 Server SQL Server is terminating a system or background task SSB Task due to errors in starting up the task (setup state 1).
2014-11-08 01:24:35.71 Server Error: 17053, Severity: 16, State: 1.
2014-11-08 01:24:35.71 Server BRKR TASK: Operating system error Exception 0x1 encountered.
2014-11-08 01:24:35.71 spid73 Error: 701, Severity: 17, State: 123.
2014-11-08 01:24:35.71 spid73 There is insufficient system memory in resource pool 'internal' to run this query.
2014-11-08 01:24:46.30 Server Error: 17312, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2014-11-08 01:24:51.31 Server Error: 17053, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2014-11-08 01:24:51.31 Server Error: 17300, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2014-11-08 01:24:51.31 Logon Error: 18052, Severity: -1, State: 0. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
Last error message is half an hour after the inital Out of memory at 2014-11-08 01:52:54.03. Then the Instance is completely shut down
From the memory information in the error log we can see that all the memory is consumed by the QUERY_OPTIMIZER
Buffer Pool Value
Committed 2621440
Target 2621440
Database 130726
Dirty 3682
In IO
0
Latched
1
Free
346
Stolen 2490368
Reserved 0
Visible 2621440
Stolen Potential 0
Limiting Factor 17
Last OOM Factor 0
Last OS Error 0
Page Life Expectancy 28
2014-11-08 01:22:48.90 spid75
Process/System Counts Value
Available Physical Memory 29361627136
Available Virtual Memory 8691842715648
Available Paging File 51593969664
Working Set 628932608
Percent of Committed Memory in WS 100
Page Faults 48955000
System physical memory high 1
System physical memory low 0
Process physical memory low 1
Process virtual memory low 0
MEMORYCLERK_SQLOPTIMIZER (node 1) KB
VM Reserved 0
VM Committed 0
Locked Pages Allocated 0
SM Reserved 0
SM Committed 0
SinglePage Allocator 19419712
MultiPage Allocator 128
Memory Manager KB
VM Reserved 100960236
VM Committed 277664
Locked Pages Allocated 21483904
Reserved Memory 1024
Reserved Memory In Use 0
On the other side MDW reports that the MEMORYCLERK_SQLOPTIMIZER increases since the execution of the query up to the point of OUTOF MEMORY, but the Average value is 54.7 MB during that period as can be seen on attached graph.
We have encountered this issue already two times (every time the critical query is executed).Hi,
This does seems to me kind of memory Leak and actually it is from SQL Optimizer which leaked memory from buffer pool so much that it did not had any memory to be allocated for new page.
MEMORYCLERK_SQLOPTIMIZER (node 1) KB
VM Reserved 0
VM Committed 0
Locked Pages Allocated 0
SM Reserved 0
SM Committed 0
SinglePage Allocator 19419712
MultiPage Allocator 128
Can you post complete DBCC MEMORYSTATUS output which was generated in errorlog. Is this the only message in errorlog or there are some more messages before and after it.
select (SUM(single_pages_kb)*1024)/8192 as total_stolen_pages, type
from sys.dm_os_memory_clerks
group by typeorder by total_stolen_pages desc
and
select sum(pages_allocated_count * page_size_in_bytes)/1024,type from sys.dm_os_memory_objects
group by type
If you can post the output of above two queries with dbcc memorystaus output on some shared drive and share location with us here. I would try to find out what is leaking memory.
You can very well apply SQL Server 2008 r2 SP3 and see if this issue subsides but I am not sure whether this is fixed or actually it is a bug.
Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
My Technet Wiki Article
MVP -
Query: SQL Server Book Recommendations
Hi folks!
There are Books Online. There are the SAP Notes and Documents created by people like Jürgen Thomas (THANKS!!!) ...
There are many sources of information in the WWW - blogs, documents, discussons ...
And there are many BOOKS. Too many ...
I ask you to recommend your favourite books about SQL Server.
Your recommendations should help all of us to buy those books which are helpful ...
Kind regards, RudiHi Rudolf,
Do you focus only on SQL server, not including Windows Server Failover Cluster and SAP? If yes, I recommend you to ask in MSDN -> Database Engine.
Because this is a SAP on SQL forum, I will talk a little bit about WSFC and SAP. Here is my MATERIAL list. Hope this helps.
PS: These are very useful for troubleshooting and performance optimization. Regarding to reviews, there are so many people wrote in Amazon in great detail. I will skip it.
1. Search "Failover Cluster" from MS TechEd 2008~2014
2. Search "SQL Server Performance/Query/execution plan/AlwaysOn" from MS TechEd 2008~2014
3. A book "Microsoft SQL Server 2005 administrator’s companion"
3.5 Troushooting Sql Server ( Troubleshooting SQL Server: A Guide for the Accidental DBA )
4. A material from SAP course "BC 490: ABAP Performance & Tuning"
5. CD 262: Tune Your Custom ABAP Code.
6. Performance Do’s and Don’ts – ABAP: http://service.sap.com/performance
7. SAP performance optimization guide: http://www.amazon.com/SAP-Performance-Optimization-Guide-Edition/dp/1592293689
8. Juergen best practices: http://scn.sap.com/docs/DOC-1006
9. SAP DBA Cockpit and Microsoft SQL Server | SCN
10. DBA Cockpit SQL scripts: http://blogs.msdn.com/b/saponsqlserver/archive/2007/06/05/sap-dbacockpit-and-some-related-sql-scripts-part-1.aspx
11. Search "Enhancment Package/Solution Manager" from SAP TechEd -
Selecting from a SQL Server 2005 with long column names ( 30 chars)
Hi,
I was able to set up a db link from Oracle 11.2.0.1 to SQL Server 2005 using DG4ODBC.
My problem is that some column names in the Sql Server are longer than 30 chars and trying to select them gives me the ORA-00972: identifier is too long error.
If I omit these columns the select succeeds.
I know I can create a view in the sql server and query it instead of the original table, but I was wondering if there's a way to overcome it with sql.
My select looks like this:
select "good_column_name" from sometable@sqlserver_dblink -- this works
select "good_column_name","very_long_column_name>30 chars" from sometable@sqlserver_dblink -- ORA-00972ThanksI tried creating a view with shorter column names but selecting from the view still returns an error.
create view v_Boards as (select [9650_BoardId] as BoardId, [9651_BoardType] as BoardType, [9652_HardwareVendor] as
HardwareVendor, [9653_BoardVersion] as BoardVersion, [9654_BoardName] as BoardName, [9655_BoardDescription] as BoardDescription,
[9656_SlotNumber] as SlotNumber, [9670_SegmentId] as SegmentId, [MasterID] as MasterID, [9657_BoardHostName] as BoardHostName,
[9658_BoardManagementUsername] as BoardManagementUsername, [9659_BoardManagementPassword] as BoardManagementPassword,
[9660_BoardManagementVirtualAddress] as BoardManagementVirtualAddress, [9661_BoardManagementTelnetLoginPrompt] as
MANAGEMENTTELNETLOGINPROMPT, [9662_BoardManagementTelnetPasswordPrompt] as MANAGEMENTTELNETPASSPROMPT,
[9663_BoardManagementTelnetCommandPrompt] as MANAGEMENTTELNETCOMMANDPROMPT FROM Boards)performing a select * from this view in sqlserver works and show the short column names
this is the error i'm getting for performing a select * from v_boards@sqlserver_dblink
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Microsoft][SQL Native Client][SQL Server]Invalid column name 'BoardManagementTelnetLoginProm'. {42S22,NativeErr = 207}[Microsoft]
[SQL Native Client][SQL Server]Invalid column name 'BoardManagementTelnetPasswordP'. {42S22,NativeErr = 207}[Microsoft][SQL Native
Client][SQL Server]Invalid column name 'BoardManagementTelnetCommandPr'. {42S22,NativeErr = 207}[Microsoft][SQL Native Client][SQL
Server]Statement(s) could not be prepared. {42000,NativeErr = 8180}
ORA-02063: preceding 2 lines from sqlserver_dblinkI also tried replacing the * with specific column names but it fails on the columns that have a long name (it doesn't recognize the short names from the view)
what am I doing wrong?
Edited by: Pyrocks on Dec 22, 2010 3:58 PM -
I Installed Sql Server 2008 in my Windows 2008 Server everthing good but after installed when i check expiry date of SQL SERVER using query its showing after 180 Days my Sql will be expiry.
Did i done any mistake while installed or do i want to any activation process after installation of Sql Server.
Please any one get back with reply. I looking forward for a reply.
Its an emergency basis.Hi,
It look like you install the evaluation version:
http://msdn.microsoft.com/en-us/sqlserver/bb671064.aspx
[Personal Site] [Blog] [Facebook] -
XML output from oracle equivalent to sql server
Hi,
I need an equivalent sql server 2005 equivalent output from oracle.
Tried with DBMS_XMLGEN.getxml, xforest etc. But I am not able to get desired output.
Could anyone help me in giving a hint to do so.
Here below i am pasting sql server 2005 query and output, oracle query and output.
SELECT top 5
P.process_id AS Ppid,
P.name AS Pn,
P.group_id AS Pg,
P.locked AS Pl,
P.build AS Pb,
100 AS qcount,
200 AS ocount,
PI.question_id AS PIqid,
PI.process_id AS PIpid,
PI.posx AS PIpx,
PI.posy AS PIpy,
PI.innertext AS PItext,
PI.itemtype AS PItype,
PI.linkfrom AS PIfrom,
PI.linkto AS PIto,
PI.associated AS PIas,
PI.content_id AS PIc,
PI.exitpoint1_id AS PIe1,
PI.exitpoint2_id AS PIe2,
PI.exitpoint3_id AS PIe3,
PI.resolveidentifier AS PIri,
PI.libquestion_idfk AS PIlqid,
PI.followoncall AS PIfoc,
PI.userinput AS PIui,
PI.isLocked AS PIstls,
PI.PreviousAnswer as PIPAns,
PI.VisibleToAgent as PIVAgent,
PI.RetryAttempt as PIRetry,
PI.Tags as PITag,
PO.option_id AS POoid,
PO.question_id AS POqid,
PO.process_id AS popid,
PO.posx AS POpx,
PO.posy AS POpy,
PO.opt_innertext AS POtext,
PO.opt_linkfrom AS POfrom,
PO.opt_linkto AS POto,
PO.libquestion_idfk AS POlqid,
PO.liboption_idfk AS POloid
FROM
dbo.processes_ec AS P WITH (nolock) INNER JOIN
dbo.vw_ProcessesQuestions_Simulator_v6 AS PI WITH (nolock)
ON P.process_id = PI.process_id LEFT OUTER JOIN
dbo.vw_ProcessesOptions_Simulator_v6 AS PO WITH (nolock)
ON PI.question_id = PO.question_id AND PI.process_id = PO.process_id
ORDER BY Ppid, PIqid, POoid ASC
FOR XML AUTO, ELEMENTS
O/P
<P>
<Ppid>450</Ppid>
<Pn>CBB1015 - Router Firewall Settinngs Process</Pn>
<Pg>9</Pg>
<Pl>0</Pl>
<Pb>5</Pb>
<qcount>100</qcount>
<ocount>200</ocount>
<PI>
<PIqid>1</PIqid>
<PIpid>450</PIpid>
<PIpx>366</PIpx>
<PIpy>-516</PIpy>
<PItext>CBB1015 - Router Firewall Settinngs Process</PItext>
<PItype>Title</PItype>
<PIto>2</PIto>
<PO />
</PI>
<PI>
<PIqid>2</PIqid>
<PIpid>450</PIpid>
<PIpx>366</PIpx>
<PIpy>-437</PIpy>
<PItext>Is the customers PC Firewall turned off?</PItext>
<PItype>Question</PItype>
<PIfrom>1</PIfrom>
<PIto>2.2,2.1</PIto>
<PO>
<POoid>1</POoid>
<POqid>2</POqid>
<popid>450</popid>
<POpx>-50</POpx>
<POpy>70</POpy>
<POtext>Yes</POtext>
<POto>5</POto>
</PO>
<PO>
<POoid>2</POoid>
<POqid>2</POqid>
<popid>450</popid>
<POpx>50</POpx>
<POpy>70</POpy>
<POtext>No</POtext>
<POto>3</POto>
</PO>
</PI>
<PI>
<PIqid>3</PIqid>
<PIpid>450</PIpid>
<PIpx>468</PIpx>
<PIpy>-344</PIpy>
<PItext>Advise the customer to turn off the PC Firewall in order to continue. Has this been done?</PItext>
<PItype>Question</PItype>
<PIfrom>2.2</PIfrom>
<PIto>3.2,3.1</PIto>
<PIc>278</PIc>
<PO>
<POoid>1</POoid>
<POqid>3</POqid>
<popid>450</popid>
<POpx>-50</POpx>
<POpy>70</POpy>
<POtext>Yes</POtext>
<POto>5</POto>
</PO>
<PO>
<POoid>2</POoid>
<POqid>3</POqid>
<popid>450</popid>
<POpx>50</POpx>
<POpy>70</POpy>
<POtext>No</POtext>
<POto>4</POto>
</PO>
</PI>
</P>
Oracle query and output
select DBMS_XMLGEN.getxml('select * from (SELECT
P.process_id AS Ppid,
P.name AS Pn,
P.group_id AS Pg,
P.locked AS Pl,
P.build AS Pb,
100 AS qcount,
200 AS ocount,
PI.question_id AS PIqid,
PI.process_id AS PIpid,
PI.posx AS PIpx,
PI.posy AS PIpy,
PI.innertext AS PItext,
PI.itemtype AS PItype,
PI.linkfrom AS PIfrom,
PI.linkto AS PIto,
PI.associated AS PIas,
PI.content_id AS PIc,
PI.exitpoint1_id AS PIe1,
PI.exitpoint2_id AS PIe2,
PI.exitpoint3_id AS PIe3,
PI.resolveidentifier AS PIri,
PI.libquestion_idfk AS PIlqid,
PI.followoncall AS PIfoc,
PI.userinput AS PIui,
PI.isLocked AS PIstls,
PI.PreviousAnswer as PIPAns,
PI.VisibleToAgent as PIVAgent,
PI.RetryAttempt as PIRetry,
PI.Tags as PITag,
PO.option_id AS POoid,
PO.question_id AS POqid,
PO.process_id AS popid,
PO.posx AS POpx,
PO.posy AS POpy,
PO.opt_innertext AS POtext,
PO.opt_linkfrom AS POfrom,
PO.opt_linkto AS POto,
PO.libquestion_idfk AS POlqid,
PO.liboption_idfk AS POloid
FROM
processes_ec P INNER JOIN
vw_ProcessesQuestions_Sim_v6 PI
ON P.process_id = PI.process_id LEFT OUTER JOIN
vw_ProcessesOptions_Sim_v6 PO
ON PI.question_id = PO.question_id AND PI.process_id = PO.process_id
ORDER BY Ppid, PIqid, POoid ASC) where rownum<=5') from dual
O/P
<?xml version="1.0"?>
<ROWSET>
<ROW>
<PPID>450</PPID>
<PN>CBB1015 - Router Firewall Settinngs Process</PN>
<PG>9</PG>
<PL>0</PL>
<PB>5</PB>
<QCOUNT>100</QCOUNT>
<OCOUNT>200</OCOUNT>
<PIQID>1</PIQID>
<PIPID>450</PIPID>
<PIPX>366</PIPX>
<PIPY>-516</PIPY>
<PITEXT>CBB1015 - Router Firewall Settinngs Process</PITEXT>
<PITYPE>Title</PITYPE>
<PITO>2</PITO>
</ROW>
<ROW>
<PPID>450</PPID>
<PN>CBB1015 - Router Firewall Settinngs Process</PN>
<PG>9</PG>
<PL>0</PL>
<PB>5</PB>
<QCOUNT>100</QCOUNT>
<OCOUNT>200</OCOUNT>
<PIQID>2</PIQID>
<PIPID>450</PIPID>
<PIPX>366</PIPX>
<PIPY>-437</PIPY>
<PITEXT>Is the customers PC Firewall turned off?</PITEXT>
<PITYPE>Question</PITYPE>
<PIFROM>1</PIFROM>
<PITO>2.2,2.1</PITO>
<POOID>1</POOID>
<POQID>2</POQID>
<POPID>450</POPID>
<POPX>-50</POPX>
<POPY>70</POPY>
<POTEXT>Yes</POTEXT>
<POTO>5</POTO>
</ROW>
<ROW>
<PPID>450</PPID>
<PN>CBB1015 - Router Firewall Settinngs Process</PN>
<PG>9</PG>
<PL>0</PL>
<PB>5</PB>
<QCOUNT>100</QCOUNT>
<OCOUNT>200</OCOUNT>
<PIQID>2</PIQID>
<PIPID>450</PIPID>
<PIPX>366</PIPX>
<PIPY>-437</PIPY>
<PITEXT>Is the customers PC Firewall turned off?</PITEXT>
<PITYPE>Question</PITYPE>
<PIFROM>1</PIFROM>
<PITO>2.2,2.1</PITO>
<POOID>2</POOID>
<POQID>2</POQID>
<POPID>450</POPID>
<POPX>50</POPX>
<POPY>70</POPY>
<POTEXT>No</POTEXT>
<POTO>3</POTO>
</ROW>
<ROW>
<PPID>450</PPID>
<PN>CBB1015 - Router Firewall Settinngs Process</PN>
<PG>9</PG>
<PL>0</PL>
<PB>5</PB>
<QCOUNT>100</QCOUNT>
<OCOUNT>200</OCOUNT>
<PIQID>3</PIQID>
<PIPID>450</PIPID>
<PIPX>468</PIPX>
<PIPY>-344</PIPY>
<PITEXT>Advise the customer to turn off the PC Firewall in order to continue. Has this been done?</PITEXT>
<PITYPE>Question</PITYPE>
<PIFROM>2.2</PIFROM>
<PITO>3.2,3.1</PITO>
<PIC>278</PIC>
<POOID>1</POOID>
<POQID>3</POQID>
<POPID>450</POPID>
<POPX>-50</POPX>
<POPY>70</POPY>
<POTEXT>Yes</POTEXT>
<POTO>5</POTO>
</ROW>
<ROW>
<PPID>450</PPID>
<PN>CBB1015 - Router Firewall Settinngs Process</PN>
<PG>9</PG>
<PL>0</PL>
<PB>5</PB>
<QCOUNT>100</QCOUNT>
<OCOUNT>200</OCOUNT>
<PIQID>3</PIQID>
<PIPID>450</PIPID>
<PIPX>468</PIPX>
<PIPY>-344</PIPY>
<PITEXT>Advise the customer to turn off the PC Firewall in order to continue. Has this been done?</PITEXT>
<PITYPE>Question</PITYPE>
<PIFROM>2.2</PIFROM>
<PITO>3.2,3.1</PITO>
<PIC>278</PIC>
<POOID>2</POOID>
<POQID>3</POQID>
<POPID>450</POPID>
<POPX>50</POPX>
<POPY>70</POPY>
<POTEXT>No</POTEXT>
<POTO>4</POTO>
</ROW>
</ROWSET>
Any help really appreciated.
Thanks in advanceHere are the links ->
http://www.psoug.org/reference/xml_functions.html
http://www.psoug.org/reference/dbms_xmlgen.html
http://www.adp-gmbh.ch/ora/sql/xmlelement.html
http://www.oracle-base.com/articles/9i/SQLXML9i.php
http://download.oracle.com/docs/cd/B10500_01/appdev.920/a96620/toc.htm
Regards.
Satyaki De
Maybe you are looking for
-
I have been trying to install Premier 6.0 back on to my computer after returning to the creative cloud. I can download it, when it comes for me to install it, it wont launch. It pops up into my doc for a second then goees again. Can anyone advise me!
-
[solved] Get the browser playing videos without flash
Hi there, on my favourite news site in the web (n-tv.de) there are also some videos available. Now I 'm trying to get rid of flash. Those videos are playable with vp8, which should be available in gstreamer0.10-good-plugins. I've tried it with both F
-
Standard texts(SO10)
HI gurus Whats the exact use of maintaining stabdard texts using tcode SO10. where it is reflected? Regards, prasad
-
"illegal instruction" during install of xapian-ruby-bindings (AUR)
In the installation process of xapian-ruby-bindings from aur the command /usr/bin/ruby -I.libs -I. ${dir}$tst is run from within a shell script. On my system, it causes an "illegal instruction" error, thus the installation fails. I read in another th
-
Query in Setting the attribute value
Hi all, can anyone please tell me as to how to set a value of an attribute from the 'DO_PREPARE_OUTPUT' method of Implementation class. Regards, Vijay