Our databases were working fine in terms of performance until over the last 2 months wherein the timeouts and deadlocks have started increasing. We are having growing clients with huge real-time transactions. We have been adding NOLOCKs on queries that are being used frequently etc but the timeouts are still an issue. Not sure what the best way to identify problem areas is. The CPU utilization has also been on the higher side. Profiler identified long queries are being indexed etc. But the performance is still a concern. Any ideas? What am i not looking at? HELP HELP..
I need to build an SQL query, which generates the random rows priority wise. I found this on following article. http://articlesdotnet.blogspot.com/2007/09/random-rows-in-respect-to-their.html Can anyone test it? In addition, tell me. Is it good or have a bug? If anyone have the better query then please tell me.
I would like to find the average salary for each department which has min salary
In my case I will have 3 departments which have min salary.
select distinct d.department_name, E.SALARY, avg(E.salary) FROM EMPLOYEES E JOIN DEPARTMENTS D ON (E.DEPARTMENT_ID = D.DEPARTMENT_ID) WHERE E.SALARY = (SELECT MIN(E.SALARY) FROM EMPLOYEES E JOIN DEPARTMENTS D ON (E.DEPARTMENT_ID = D.DEPARTMENT_ID)) GROUP BY D.DEPARTMENT_NAME, E.SALARY;
How to display the paper number that is co authored by authors from the same department? The database structure: Department(DeptNum, Descrip, Instname, DeptName, State, Postcode) Academic(AcNum, DeptNum, FamName, GiveName, Initials, Title) Paper(PaNum, Title) Author(PaNum, AcNum) Field(FieldNum, ID, Title) Interest(FieldNum, AcNum, Descrip) Thanks for help a lot
Im using , FORMAT_STRING="###,###.##" on the definition of a calculated member. When testing the query in SSMS, the formatting looks right, but when I run the query in SSRS it looks like its not coming over. I suppose I can apply my own formatting on the report, but im just wondering if this is by design or lack of ?
I have an issue related to SSAS security. We have an SSAS multidimensional cube which needs 3 types of security:
- Access to the entire cube => OK, based upon a role - Restricted access to one department (= dimension)Â => OK, based upon a role - Access to the entire cube, but with dynamic security on 2 measures.
Let's say, we have 2 departments (food and non-food). Users within food are allowed to see sales and pieces from the food department, but not from the non-food department.Â
It is not an option to restrict access to the non-food department because there are other measure which they have access to. I tried cell security, but this is very slow and generates multiple empty rows on my selections.
I have a query in and OLEDB Source which results in incorrect rows returned due to its structure: SELECT table1.ABCD, table2.BAAA, table3.CAAA, table4.DAAA, table5.EAAAFROM table1LEFT OUTER JOINtable3 ON table1.ABCD = table3.BCDE LEFT OUTER JOINtable4 ON table1.ABCD = table4.CDEF LEFT OUTER JOINtable5 ON table1.ABCD = table5.DEFG LEFT OUTER JOINtable2 ON table1.ABCD = table2.EFGHWHEREtable1.extractSession = ?AND table3.extractSession = ?AND table4.extractSession = ?AND table5.extractSession = ?AND table2.extractSession = ?
The correct query needs to be the following, but it won't work in the OLE DB Source: SELECT table1.ABCD, table2.BAAA, table3.CAAA, table4.DAAA, table5.EAAAFROM table1LEFT OUTER JOINtable3 ON table1.ABCD = table3.BCDE AND table3.extractSession = ?LEFT OUTER JOINtable4 ON table1.ABCD = table4.CDEF AND table4.extractSession = ?LEFT OUTER JOINtable5 ON table1.ABCD = table5.DEFG AND table5.extractSession = ?LEFT OUTER JOINtable2 ON table1.ABCD = table2.EFGH AND table2.extractSession = ?WHEREtable1.extractSession = ?
========================= ExtractSession is an integer that uniquely identifies the run (for the night, perhaps). I load a bunch of staging tables that retain their data for a period of time, with each load identified by this staging number. So, I need to restrict my data pull to the correct load (extractSession).
The first query returns three (3) rows when I should be getting back all 250,000 rows from table1. The second query listed works correctly.
Am I missing something, or do I need to find another way to constrain my tables' extract session dynamically at execution time in SSIS? Is a control table the best way to go here and simply join to it?
Hi, I need to pass data from a SQL Server data base to an Access data base. To do this I use the OPENROWSET as followed: FR
INSERT INTO OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'C:Aux.mdb'; 'Admin'; '',Test) (Id, Name, TypeId) SELECT Id,Name,TypeId FROM Test ORDER BY TypeId
FR
On SQL Server 2000 or MSDE the data is transfered as expected, respecting the specified order. But when I run the same clause on a SQL 2005 EE the data is transfered, but the order is not respected. So my question is if I have to activate an option for the order to be respected or if this is a bug.
Hi folks; I have just realised that my language problem is because DB language; then I've changed the language to Turkish but it didn't effect tables.. When I wanted to change tables manually it worned data loss may occur.. What would you suggest to do it? Thanks
Hi; I need Turkish characters in my DB therefore I have to change Collation from SQL_Latin1_General_CP1_CI_AS to Turkish But what I realised is that aspnet membership tables' collation is SQL_Latin1_General_CP1_CI_AS as well and they can store Turkish chars but why not my tables? Thanks..
I want to insert data into my database in greek language but i am getting some "???????" symbols. I have a table called "Words" with columns "Word"-as char and "Result"-as int. Can somebody please explain me what to do?
I am looking into a production geared software called MassGroup. (www.massgroup.com) It says that its FactoryServer builds are on a standardized SQL framework and web architecture for data collection, work order requests, reporting and asset management. My questions are:
1. Is SQL its own programming language? If not what is it? Answer: After going thru several pages and reading the fine print I discovered they use VB, ASP, COM technology, and Crystal Reports.
2. How powerful do you think this would be at gathering data and does it have the capability of creating a number sequence automatically? (example: 0001; 0002; 0003...)
Any help would be appreciated. Thank you in advance!!!!!
Good morning. I have an interesting scenario where one of the requirements of the application is to translate an application to different languages. Modelling the system to translate the UI went over without a hitch, however, we have now been told that the application will need to translate all the existing database tables. Has anyone ever had to do anything like this?
I was curious if anyone out there has any suggestions on how to approach this issue... ways in which it could be modeled, alternative approaches, anything at all would be appreciated. Many thanks in advance!
Does anyone here know anything about the DCS Scripting Language.
A contract vacancy has arisen using this language but I've never heard of it and there does seem to be anything on the internet about it. Can anyone help?
Just curiosity ... never pick up this since beginning. Our box is setted the language to English (United States) while the local machine setted as English (Australia) which I thought it's corresponding to locale machine not sql box.
Will this language setting effecting date issue stuff (DD-MM-YYYY)? Can someone clarify on this?
This thing brought up my attention cause we've just ran a trace and there is a warning which is:
User Error Message - Changed language setting to us_english.
i need to store russian data in sql server db but i found the russain data appeared as odd character in the table, can sql server support it or is there other solution for it? thanks!
i need to know in which language the standard SQL is implemented.. and that from where can i get the code.. i need the code for the "logical operators" of SQL.
I need help about storing data in chinese, arabic, english..... languages in one database. For that I create Database with Latin1_General_CI_AS and I have table Testing with two columns wich are LangName= nvarchar(50), and Comment = nvarchar(MAX). I tried to store comment in chinese language but I could not, when I entered the data "個編碼å?¯ä»¥åŒ…å?«è¶³å¤ çš„å—元:例如,單單æ?å·žå…±å?Œé«”就需è¦?好幾種ä¸?å?Œçš„編碼來包括所有的語言。å?³ä½¿æ˜¯å–®ä¸€ç¨®èªžè¨€ï¼Œä¾‹å¦‚英語,也沒有" it converted as ? sometimes or look as a square.
I've just moved servers - WK3 to WK3 - installed SQLserver 2005 and uploaded the database. Code base has not changed but now I'm getting "String was not recognized as a valid DateTime.Couldn't store <21/07/2006>" . I suspect its to do with the default language , but although the default is English (United States) as in my last server, I have set the language in Advanced settings to be British English. I can't see any difference between the settings and my last server. I'm British BTW . I also ran EXEC @ret = sp_defaultlanguage 'sa', 'British English' as the only login is sa . WK3 is itself set to English (United Kingdom) - I thought SQL 2005 would inherit this setting? Any help would be much appreciated.
Hi,I have a table in an MS SQL 2000 database that represents fields on a form.CREATE TABLE [dbo].[TagData]( [FieldName] [nvarchar](255), [UserID] [int] NOT NULL, [Data] [nvarchar](255)) A requirement has come up where some of these fields must contain Hebrew, or any other unicode character, data and some of the fields will be English. How can I go about saving and retrieving this information.The current solution is a legacy Classic ASP application and I suspect I am going to have to redo this in ASP.NetThanks,Leon
HI, I am using Multi languages web application with sql database...I am using Arabaic and English languge is there is any thing to change sql database data in Arabic and English on run time.I am using only one database client add some record in Arabic in sql database but the another side some one wana check those records in English...plz let me know how can i do on run time asp.net
Can someone please help , we are trying to change the default language from us_english to british englsish as the date formats have to be in dd/mm/yyy for our european clients.
We tried sp_configure 'default language' 23 Reconfigure . It worked 3 months back.
We are trying this on the reverse , now and it doesnt work.
We are trying to change our SQL Database with default Us-English with mdy to British with dmy format for dates . We had earlier tried it seemed to work. Now It is not working. Could some one please help.
we tried
sp_configure 'default language', 23 reconfigure
Should we shut down the server to see the changes, can someone please help.