Understanding Microsoft Code For Index Performance...

Sep 25, 2007



Hello,

I found this code in a Microsoft document about index perfromance in SQL 2005. Can some one explain what iss returned by this statement, in relation to what I should do with this data to create/improve indexes? I am not sure based on the results what the columns mean as far as what needs to be done to indexes. What is the equality_columns, included_columns, statement, etc information? Do I make an index for the included_columns? Any help would be appreciated.

Here is the code:
-- Potentially Useful Indexes
select d.*
, s.avg_total_user_cost
, s.avg_user_impact
, s.last_user_seek
,s.unique_compiles
from sys.dm_db_missing_index_group_stats s
,sys.dm_db_missing_index_groups g
,sys.dm_db_missing_index_details d
where s.group_handle = g.index_group_handle
and d.index_handle = g.index_handle
order by s.avg_user_impact desc
go
--- suggested index columns and usage
declare @handle int

select @handle = d.index_handle
from sys.dm_db_missing_index_group_stats s
,sys.dm_db_missing_index_groups g
,sys.dm_db_missing_index_details d
where s.group_handle = g.index_group_handle
and d.index_handle = g.index_handle

select *
from sys.dm_db_missing_index_columns(@handle)
order by column_id

View 2 Replies


ADVERTISEMENT

Help Understanding This Line Of Code

Aug 16, 2007

case @namesflag when 3 then 1
else case @namesflag when 2 then names.new else names.old
end
end=1

I understand what it is doing for the second part when @namesflag=2
, but what does end=1 mean
Can somebody please explain it to me.
Thanks

View 13 Replies View Related

Understanding Code Created By SSIS Import/export Wizard

Feb 23, 2006

I built a packaage in SSIS with the import/export utility. It created a Package.dtsx and Package1.dtsx. Both of these files seem to be XML files. I want to understand how these files work. For example, in the package I built I had about 80 tables exporting and importing data. Some of them I want to allow the identiy insert and delete the rows first. Others I want to append the data. How can I find the code or settings that does this? Or where can I find the options on the gui interface to change these settings. When I search the code I can't even find a some of the tables that are being transferred.

View 20 Replies View Related

Clustered Index On Client_ID+ORderNO+OrdersubNo, If I Create 3 Noncluster Index On Said Column Will It Imporve Performance

Dec 5, 2007



Dear All.

We had Teradata 4700 SMP. We have moved data from TD to MS_SQL SERVER 2003. records are 19.65 Millions.

table is >> Order_Dtl

Columns are:-

Client_ID varchar 10
Order_ID varchar 50
Order_Sub_ID decimal
.....
...
..
.
Pk is (ClientID+OrderId+OrderSubID)

Web Base application or PDA devices use to initiate the order from all over the country. The issue is this table is not Partioned but good HP with 30 GB RAM is installed. this is main table that receive 18,0000 hits or more. All brokers and users are using this table to see the status of their order.

The always search by OrderID, or ClientID or order_SubNo, or enter any two like (Client_ID+Order_Sub_ID) or any combination.

Query takes to much time when ever server receive more querys. some orther indexes are also created on the same table like (OrderDate, OrdCreate Date and Status)

My Question are:-


Q1. IF Person "A" query to DB on Client_ID, then what Index will use ? (If any one do Query on any two combination like Client_ID+Order_ID, So what index will be uesd.? How does MS-SQL SERVER deal with these kind of issues.?

Q2. If i create 3 more indexes on ClientID, ORderID and OrdersubID. will this improve the performance of query.if person "A" search record on orderNo so what index will be used. (Mind it their would be 3 seprate indexes for Each PK columns) and composite-Clustered index is also available.?

Q3. I want to check what indexes has been used? on what search?

Q4. How can i check what table was populated when, or last date of update (DML)?

My Limitation is i Dont Create a Partioned table. I dont have permission to do it.



In Teradata we had more than 4 tb record of CRM data with no issue. i am not new baby in db line but not expert in sql server 2003.


I am thank u to all who read or reply.

Arshad

Manager Database
Esoulconsultancy.com

(Teradata Master)
10g OCP










View 3 Replies View Related

Integration Services :: Rebuild Index / Refresh Index And Stats Improves Ssis Package Performance

Oct 28, 2015

My SSIS package is running very slow taking so much time to execute, One task is taking 2hr for inserting 100k records, i have disabled unused index still it is taking time.I am rebuilding/Refreshing indexes and stats once in month if i try to execute on daily basis will it improve my SSIS Package performance? 

View 2 Replies View Related

Index/performance Index For SELECT.... IN Statement

Sep 10, 2007



Hi All,

I 'm working to improve some sql performance.


One of the major syntax inside the SELECT statment is ..

WHERE FIELDA IN (SELECT PARAVALUE FROM PARATABLE WHERE SESSIONID = "XXXXX" AND PARATYPE='A') AND
WHERE FIELDB IN (SELECT PARAVALUE FROM PARATABLE WHERE SESSIONID = "XXXXX" AND PARATYPE='B') AND
WHERE FIELDC IN (SELECT PARAVALUE FROM PARATABLE WHERE SESSIONID = "XXXXX" AND PARATYPE='C') AND
WHERE FIELDD IN (SELECT PARAVALUE FROM PARATABLE WHERE SESSIONID = "XXXXX" AND PARATYPE='D') AND
WHERE FIELDE IN (SELECT PARAVALUE FROM PARATABLE WHERE SESSIONID = "XXXXX" AND PARATYPE='E') AND
WHERE FIELDF IN (SELECT PARAVALUE FROM PARATABLE WHERE SESSIONID = "XXXXX" AND PARATYPE='F')

(It's to compare the field content with some user input parameter inside a parameter table... )

I think properly is that the SELECT ... IN is causing much slowness in the sql statement. I have indexed FIELDA , FIELDB, FILEDC etc and those PARAVALUE and PARATYPE in the PARATABLE table. But perfromance is still slow and execution takes >20 seconds for 200000 rows of records.

Do any one know if still any chance to improvide the performance like this?

Much Thanks,

Andy

View 14 Replies View Related

Microsoft SQL Server 2005 Performance

Nov 6, 2007

 Hi,I have a Microsoft SQL Server 2005 Enterprise installed on Windows Server 2003, and developing web application for 500 clients. So I am interested will I have any performance issues if I put in 'Articles' table, data for all 500 clients and then filter it on client ID, or should I make 500 'Articles' tables for every client one with different name and then change sqldatasource for gridview depending on which client is working on it. I will have, beside 'Articles' table, another 10 tables, which means 5500 tables total, if I use second approach, on first I will have only 11 tables. So I am asking is it better to have more tables with less data, or less tables with more data. And what are pros and cons for both approach. Thanks a lot! 

View 1 Replies View Related

How To Use A Variable From The Code On Microsoft Reporting Services 2005

Jan 19, 2007

Hi all.

I have a Application developed on VB2005 with the reports (processed local) from Microsoft Reporting Services 2005.

I would like to know how can i use the value of a variable to be displayed on a textbox on my report.

Thanks for the help.

Best regards.

dp

View 7 Replies View Related

Better Performance Without An Index??

Jun 12, 2007

I have a small table (600 rows) that is used in a query with a relatively large table (200,000 rows). Strangely, I get the best performance from the query by removing all indexes from the small table (including the primary key). This seems a little odd to me, and I'm wondering if this is a common scenario, and if there is some general rule that can be applied when indexing small tables.



I have tried changing the primary key index (clustered vs nonclustered) and adding other indexes to both tables, but I always get the best performance by removing all indexes from the small table. The performance difference is significant, execution time goes from 2 seconds to just over 1 second, and this is a query that gets executed quite a bit.



I can't delete the PK index as the table needs a PK for data integrity reasons. So I'm not sure how to achieve the non-index performance without removing the index.



Any suggestions would be much appreciated. By the way it's SQL Server 2005 Express.

View 3 Replies View Related

DB Design :: Re-indexing A Table Using Some Commands From ALTER INDEX REBUILD From Microsoft

May 20, 2015

I'm working on re-indexing a table using some commands from ALTER INDEX REBUILD from Microsoft. The indexes will be tested for threshold fragmentation. my plan is once the reindex is executed, a transaction backup will occur while controlling the size of the log file.  The query impose time limitations or stop reindexing after the specified amount of time has elapsed.

my question,
1. How can I integrate a query which checks if transaction log is getting full and which runs a Tlog backup if over 70%
2. How do I impose time limitation?

View 3 Replies View Related

Better Performance With Unique Index?

May 21, 2002

I have read that you get better performance with unique indexes rather than non-unique indexes.
I have experimented with this in SQL 2000. I have two identical tables (with about 250000 rows each) with a 12-character unique column. In one table I define it as a regular index and in the other I define it as a unique index. No matter what I try I get identical performance, and the query optimizer shows an identical plan.
I even tried clauses such as
WHERE 1 < (SELECT COUNT(*) FROM TheTable
WHERE key_column = OtherTable.key_column)
which should obviously return nothing if TheTable.key_column is unique. However the query still ran a long time no matter if the index is unique or not.
I have also tried a unique constraint instead of a unique index and got the same (non)results.
Can anyone come up with an example where creating a unique index actually makes a performance difference?

View 1 Replies View Related

Clustered Index Performance

Nov 16, 1998

We run an order entry system, and as such our Order Detail table comprises
over half of the data in the system. This isn't gigantic, about 1.5
gigabytes, but our performance problems are centering on this table.

My question is, does it make a difference how selective the clustered index
is in terms of insert performance. Our clustered index is on item_id.
There are around 200 items that can be ordered. This is reasonable
selectivity, but still there will be many pages of rows all having the
same value for the clustered index. Is there a performance penalty for
SQL Server having to choose one of the pages to store a record? Does
anybody know how it chooses which page to store a record on in the situation
where there are multiple pages with the same index value for the clustered
index?

Thanks...
ben

View 1 Replies View Related

Index Performance Tuning Help

Oct 22, 2007

I'm using the Database Engine Tuning Advisor to do some performance evaluation on my database. I have one particular table that will potentially have a couple million rows. but this may not occur for a few months to a year from now.

when i run the advisor with 1.5 million rows, it recommends that i add an index across all columns in this table (covering index) for an estimated 91% improvement. when i run it with 1500 rows in it, it recommends that i add an index on 2 key columns for an 8% improvement.

how should i reconcile this? can i have both and what does that do to performance?

View 17 Replies View Related

Poor Index Performance

Mar 24, 2007

Hey guys,

Having some trouble with indexes on sql server 2005. I'll explain it with a simplified example.
I have a customers table, and a sp to list customers :


create table Customers(
CusID int not null,
Name varchar(50) null,
Surname varchar(50) null,
CusNo int not null,
Deleted bit not null
)


create proc spCusLs (
@CusID int = null,
@Name varchar(50) = null,
@Surname varchar(50) = null,
@CusNo int = null
)
as

select
CusID,
Name,
Surname,
CusNo
from
Customers
where
Deleted = 0
and CusID <> 1000
and (@CusID is null or CusID = @CusID)
and (@CusNo is null or CusNo = @CusNo)
and (@Name is null or Name like @Name)
and (@Surname is null or Surname like @Surname)
order by
Name,
Surname


create nonclustered index ix_customers_name on customers ([name] asc)
with (sort_in_tempdb = off, drop_existing = off, ignore_dup_key = off, online = off) on primary

create nonclustered index ix_customers_surname on customers (surname asc)
with (sort_in_tempdb = off, drop_existing = off, ignore_dup_key = off, online = off) on primary

create nonclustered index ix_customers_cusno on customers (cusno asc)
with (sort_in_tempdb = off, drop_existing = off, ignore_dup_key = off, online = off) on primary



I've recently noticed that some tables, including 'Customers' don't have indexes except primary keys. And I have added indexes to "name", "surname" and "cusno" columns. This has dropped the number of IO reads. But the strange thing is; one time it works with name / surname searches like ('joh%' '%') but when CusNo is included, it does a full scan. And vice versa when the SP is recompiled using 'alter', works ok with CusNo, but not with name/surname. Recompile it, and it's reversed again. When run as a single query, the execution plan looks different.

What's happening? Perhaps something to do with statistics? This doesn't have a big payload on the server, but there are some other procs suffering from this on heavy queries, making server performance worse than before...

View 1 Replies View Related

Microsoft OLEDB Provider For DB2 Performance Issue (Missing Where Clause On DB2 Site)

Aug 17, 2007

Hi!
I have just installed Microsoft OLEDB provider for DB2 on a SQL server 2005. I created a Linked server against our DB2 V.8 Z/OS database. I tested the connection via execution of a simple select call, something like:

SELECT FIELD_A FROM DB2SRV.DB2DB.CREATOR_A.TABLE_A
WHERE FIELD_A='ABC'

I traced the call on the DB2 site. The SQL running on DB2 site was to my surprise without the €œwhere clause€?:

SELECT FIELD_A FROM DB2DB.CREATOR_A.TABLE_A

So, all rows are moved to SQL server before the where clause is executed, resulting in bad performance. The index on FIELD_A is not used and so on €¦ !

If anyone out there has an idea of what could be wrong, please let me know!


NB. I know that by using OPENQUERY pass-through query, all execution is done on the DB2 site.

View 5 Replies View Related

Performance Creating Clustered Index

Sep 29, 2005

Hi Guys,

I have a SQL 2000 sp3a server on Windows 2000 sp4. Running dual proc server with hyper threading enabled, 3gb memory attached to a HP EVA 5000 SAN.

One of the tables is 67gb and contains 140,000,000 rows. Recently someone dropped the clustered indexe so i`m trying to put it back (i've dropped the non clustered indexes as no point leaving them there whilst clustered builds).

The problem i am having is the rebuild is taking forever!! It ran for 23 hours before someone rebooted the server (!). The database is currently recovering from the reboot but i need to work out what is causing the appalling performance so i can get the index rebuilt. There are no reported hardware problems.....

There are multiple file groups involved and i found i was getting an extent allocation rate of 1.5 extents a second and same for deallocation.

Any advice on how to trouble shoot this?

View 12 Replies View Related

Free Text Index Performance

Apr 3, 2008

I've got a free text index on a table that is taking 15-30 % of processing becuase there is a lot of insert activity on this table at the moment.
I know the indexer backs off if the server gets busy - or so the theory goes.
Is there a way for me to tell it to take more of a back seat?

View 1 Replies View Related

Microsoft SQL Server 2005 Express Edition Service Pack 2 Error Code: 0x2B22

May 19, 2007

Hi i tried to install the Microsoft SQL Server 2005 Express Edition Service Pack 2 but was unable to do so. I got an error message saying: Error Code: 0x2B22



I went through what the message said, but i was unable to solve the problem. Below is the summary of the problem. Please help me solve it.



Time: 05/19/2007 12:32:24.781
KB Number: KB921896
Machine: DET-NB0631262
OS Version: Microsoft Windows XP Professional Service Pack 2 (Build 2600)
Package Language: 1033 (ENU)
Package Platform: x86
Package SP Level: 2
Package Version: 3042
Command-line parameters specified:
/quiet
/allinstances
Cluster Installation: No

**********************************************************************************
Prerequisites Check & Status
SQLSupport: Passed

**********************************************************************************
Products Detected Language Level Patch Level Platform Edition
Express Database Services (SQLEXPRESS) ENU RTM 2005.090.1399.00 x86 EXPRESS
Express Database Services (SQLExpress) ENU SP2 x86 EXPRESS

**********************************************************************************
Products Disqualified & Reason
Product Reason
Express Database Services (SQLEXPRESS) Unable to start service

**********************************************************************************
Processes Locking Files
Process Name Feature Type User Name PID

**********************************************************************************
Product Installation Status
Product : Express Database Services (SQLEXPRESS)
Product Version (Previous): 1399
Product Version (Final) :
Status : Not Applied
Log File :
SQL Express Features : SQL_Data_Files,SQL_Engine,SQL_Replication,SQL_SharedTools
Error Number : 11042
Error Description : Unable to start service
----------------------------------------------------------------------------------
Product : Express Database Services (SQLExpress)
Product Version (Previous):
Product Version (Final) :
Status : Not Applied
Log File :
SQL Express Features : Client_Components,Connectivity,SDK
Error Number : 0
Error Description :
----------------------------------------------------------------------------------

**********************************************************************************
Summary
Unable to start service
Exit Code Returned: 11042

View 3 Replies View Related

Performance Problem With VS2005 Code Style?

May 31, 2006

I run into a wirt asp.net sittuation, when coding my ASP.NET page using the traditional old way like this, it runs very fast:
        Dim thisSQL =" SELECT strAuthorName, strTitle, strContent, lngChapter, tblKiemHiepChapters.strReference FROM tblKiemHiepAuthors A " & _                     " INNER JOIN tblKiemHiepTitles B ON A.ID=lngAuthorID " & _                     " INNER JOIN tblKiemHiepChapters ON B.ID=lngTruyenID " & _                     " AND tblKiemHiepChapters.ID="& e.CommandArgument
        Dim thisConnection As SqlConnection = new SqlConnection(ConfigurationSettings.AppSettings("DNS2"))        Dim thisCommand As SqlCommand = New SqlCommand(thisSQL, thisConnection)        thisConnection.Open()        dim objReader As SqlDataReader = thisCommand.ExecuteReader()                objReader.Read()        if objReader.HasRows then            if (objReader.Item("strTitle") Is DBNull.Value ) Then               thisHeading = Replace(thisHeading, "#HEADING#", "" )
            else               '''''''''''            end if................
but when I used VISUAL STUDIO.NET way of binding datasouce like below: it runs so damn slow. do you guys know what the problem is? if you need to see the complete code please let me know. this happen when my ntext field that contains lots of text (the code post heredoes  not necessary have the same functionality)
<asp:SqlDataSource ID="GetContentByChapterID" runat="server" ConnectionString="<%$ ConnectionStrings:nangmoi_cnn_string %>"SelectCommand="SELECT [lngChapter], [strReference], [strContent] FROM [tblKiemHiepChapters] WHERE (ID = @ChapterID)"><SelectParameters><asp:SessionParameter DefaultValue=0 Name="ChapterID" SessionField="ChapterID" Type="Int32" /></SelectParameters>            </asp:SqlDataSource>

View 1 Replies View Related

Performance Issue - No Index Usage If Variables Used.

Jul 25, 2007

Hi guys,



My company is currently migrating from Interbase to SQL Server 2005. During the migration we have came across a rather peculiar issue and wondering if anyone can advise.



We have a table.. named "prospect" which holds client information



We have a stored procedure which hangs on the following statement.


DECLARE @surname char(25);

SET @surname='BLAH%';

SELECT *
FROM Prospect
WHERE c_surname LIKE @surname;


The above takes 28 seconds to run. The following statement returns a result inside a second.


SELECT *
FROM Prospect
WHERE c_surname LIKE 'BLAH%';





In Interbase, the original returned the answer within a second too. The schema in both database is the same.



The 1st statement does not use an index! The execution plan is different to the 2nd statement. I am aware I can create an index recommended by the Database Engine Tuning which solves the issue or specify the index to use in the original statement but why does the engine not use the correct index if there is a variable involved? I need to know as we have just started looking at the code.



Thanks,



Kalim

View 2 Replies View Related

Failed To Generate ResultSet Code. Typed ResultSets Are Only Valid For Microsoft SQL Server Compact 3.5 Databases

Feb 27, 2008



I get the error above when I do the following.

Using VS 2008 I got a Windows Smart Device project targeting WM6 Standard and using .NET CF 3.5.
I add a new database file = creating an empty Compact 3.5 database (creates an sdf-file in my project).
Then create an empty dataset in the wizard (creates an xsd-file in my project).
Then I add a couple of tables in the database.
After that I want to use my earlier created dataset.
I mark the xsd-file and looks in Poperties.
I get the error when I try to change Custom Tool value from 'MSDataSetGenerator' to 'MSResultSetGenerator'.
Why????

View 1 Replies View Related

Performance Comparison - Code Vs SqlDataSource, Gridview Etc Vs PlainControl

Jun 9, 2007

There are so many ways to use database in asp.net/ado.net, I'm a bit confused about their difference from the performance point of view.So apparently SqlDataSource in DataReader mode is faster than DataSet mode, at a cost of losing some bolt-on builtin functions.What about SqlDataSource in DataReader mode vs manual binding in code? Say creating a SqlDataSource ds1 and set "DataSourceID" in Gridview, vs manually creating the SqlConnection, SqlCommand, SqlDataReader objects and mannually bind the myReader object to the gridview with the Bind() method.Also Gridview is a very convenient control for many basic tasks. But for more complex scenarios it requires lots of customization and modification. Now if I do not use gridview at all and build the entire thing from scratch with basic web controls such as table and label controls, and mannually read and display everything from a DataReader object, how's the performance would be like compared to the Gridview-databind route?

View 3 Replies View Related

Performance Tuning Using Index. How To Force The Query Engine To Use It?

Nov 14, 2007

Hello all.
I have the following table

Create Table Item(
I_AssetCode NVarChar(40) Primary Key NOT NULL,
I_Name NVarChar(160),
I_BC nvarchar(20),
I_Company nvarchar(20)
);

Create Index ind_Item_Name on Item(I_Name);
Create Index ind_Item_BC on Item(I_BC);
Create Index ind_Item_Company on Item(I_Company);

It is populated with 50 000 records.
Searching on indexed columns is fast, but I've run into the following problem:
I need to get all distinct companies in the table.
I've tried with these two queries, but they both are very slow!

1. "select I_Company from item group by I_Company " - This one takes 19 seconds

2. "select distinct(I_Company) from item" -This one takes 29 secons

When I ran them through the SQL Management Studio and checked the performance plan, I saw that the second one doesn't use index at all ! So I focused on the first...
The first one used index (it took it 15% of the time), but then it ran the "stream aggregate" which took 85% of the time !
Actully 15% of 19 seconds - about 2 seconds is pretty much enough for me. But it looks that aggregate function is run for nothing!
So is it possible to force the query engine of the SSCE not to run it, since there is actually no aggregate functions in my select clause?
According to SQL CE Books online:
Group By


"Specifies the groups (equivalence classes) that output rows are to be placed in. If aggregate functions are included in the SELECT clause <select list>, the GROUP BY clause calculates a summary value for each group."
It seems the aggregate is run every time, not only when there is an aggregate function.

Is this a bug?

Thanks in advance,
TipoMan

View 4 Replies View Related

High CPU Performance Issue With BIGINT Column Comparison SQL Code

Dec 11, 2007

I recently converted a column that was once an int to an bigint on one of my tables. The modified column provided a generic row id information and there are duplicates within this column. I am trying to perform a self join via the following:

SELECT a.row_id FROM test_db a INNER JOIN test_db b ON b.row_id < a.row_id.

This code use to work when the column was an int but now I am getting high CPU issues since I converted to bigint. I am unsure on why the change to bigint will cause such an issue. The OS/SQL is 64BIT.

Thanks for the help in advance.

View 7 Replies View Related

Difference Between Index Seek &&amp; Index Scan &&amp; Index Lookup Operations?

Oct 20, 2006

please explain the differences btween this logical & phisicall operations that we can see therir graphical icons in execution plan tab in Management Studio

thank you in advance

View 3 Replies View Related

Microsoft.AnalysisServices.Viewers.DLL Microsoft SQL Server 2005 Datamining Viewer Controls

Jun 21, 2007





Hi

I am trying to use Association Viewer Control in

Microsoft.AnalysisServices.Viewers.DLL dll in VS 2005 but sometimes it gives an error.

"Code generatio for property 'ConnecitonManager'" failed. Error was:'Property accesor 'ConnectionManager' on object 'AssosiactionViewer1' threw the following exception:'Object referance not set to instance of an object"


Is there anyone here who use
"Microsoft SQL Server 2005 Datamining Viewer Controls" in SQLServer2005 FeaturePack ?
http://www.microsoft.com/downloads/details.aspx?FamilyID=50b97994-8453-4998-8226-fa42ec403d17&DisplayLang=en

i am using VS2005 Version 8.0.50727.762 (SP.050727-7600)
and SQL Server 2005 SP2

thanks from now.

Cem Ãœney







View 9 Replies View Related

Microsoft Access Doesn't Support Design Changes To The Version Of Microsoft SQL Server

Jul 23, 2005

Dear All,Access adp on sql-server 2000After upgrating to A2003 updating data with 1 perticular combobox causes theprogram to hangs without any error-msg.Traying to change te combobox recordsource i get this error:This version of Microsoft Access doesn't support design changes to theversion of Microsoft SQL Server your project is connected to. See theMicrosoft Office Update Web site for the latest information and downloads(on the Help menu, click Office on the Web). Your design changes will not besaved.The solution in :http://support.microsoft.com/defaul...kb;en-us;313298tolks about SP 'dt_verstamp007' but I have SP 'dt_verstamp006'What should I do.Is the failure of the combobox also caused by the absence of dt_verstamp007???Filip

View 2 Replies View Related

[Microsoft][ODBC Microsoft Access Driver] System Resource Exceeded

May 22, 2007

odbc_pconnect() [function.odbc-pconnect]: SQL error: [Microsoft][ODBC Microsoft Access Driver] System resource exceeded., SQL state S1001 in SQLConnect





we got the error with access 2000 database and PHP as prog. language .



we created dsn for the connection.



reboot solves the problem. but we need another solution better than this.

View 7 Replies View Related

Help In Understanding This SQL...

Jan 19, 2005

Hi,

The following SQL is lifted from one of the Reporting Services / Adventureworks2000 sample reports. I'm a little slow / baffled on how the inner joins are working? Specifically the Inner Join Locale and Inner Join ProductModel. I'm used to seeing Inner Join SomTable On Something = Somthing but how these joins are working is lost on me. Can someone give a quick overview (or point me to a reference) so I can better understand.

Thanks!


SELECT ProductSubCategory.Name AS ProdSubCat, ProductModel.Name AS ProdModel, ProductCategory.Name AS ProdCat, ProductDescription.Description,
ProductPhoto.LargePhoto, Product.Name AS ProdName, Product.ProductNumber, Product.Color, Product.Size, Product.Weight, Product.DealerPrice,
Product.Style, Product.Class, Product.ListPrice
FROM ProductSubCategory
INNER JOIN Locale
INNER JOIN ProductDescriptionXLocale ON Locale.LocaleID = ProductDescriptionXLocale.LocaleID
INNER JOIN ProductDescription ON ProductDescriptionXLocale.ProductDescriptionID = ProductDescription.ProductDescriptionID
INNER JOIN ProductModel
INNER JOIN Product ON ProductModel.ProductModelID = Product.ProductModelID
INNER JOIN ProductModelXProductDescriptionXLocale ON ProductModel.ProductModelID = ProductModelXProductDescriptionXLocale.ProductModelID
ON ProductDescriptionXLocale.LocaleID = ProductModelXProductDescriptionXLocale.LocaleID AND
ProductDescriptionXLocale.ProductDescriptionID = ProductModelXProductDescriptionXLocale.ProductDescriptionID
ON ProductSubCategory.ProductSubCategoryID = Product.ProductSubCategoryID
INNER JOIN ProductCategory ON ProductSubCategory.ProductCategoryID = ProductCategory.ProductCategoryID
LEFT OUTER JOIN ProductPhoto ON Product.ProductPhotoID = ProductPhoto.ProductPhotoID
WHERE (Locale.LocaleID = 'EN')




Shawn

View 3 Replies View Related

Installing Microsoft Dynamics 10.0 With Microsoft SQL Server 2008 Katmai

Sep 25, 2007



Hi,

I'm trying to install Microsoft Dynamics 10.0 with SQL 2008 Dev but when launching the utilities this returns the following error message:

******************************************************************
Your current SQL Server is not a supported version.

Req: Microsoft SQL Server 8.0
Act: Microsoft SQL Server code name "Katmai" (CTP) - 10

You need to upgrade to SQL Server 8.0 before continuing.

******************************************************************

Any ideas could help or has this if anyone knows been desinged not to work with GP10 currently?

Assad

View 7 Replies View Related

Need Help Understanding A Function

May 17, 2007

I'm trying to get the following poll working:http://www.codeproject.com/useritems/Site_Poll_Control.aspIt looks like it's exactly what I was looking for, but it doesn't come with much in the way of instructions.  I have the following function: Public Function CastVote(ByVal PollId As Integer, ByVal Answer As Integer, ByVal MemberId As Integer) As Boolean        Dim cmd As New SqlCommand("InsertPollResult", New SqlConnection(Connection))        With cmd.Parameters            .AddWithValue("@PollId", PollId)            .AddWithValue("@PollChoice", Answer)            .AddWithValue("@MemberId", MemberId)        End With        Return (SqlExecuteInsertSp(cmd) > 0)    End Function This calls SqlExecuteInsertSp(cmd) which is:Public Function SqlExecuteInsertSp(ByVal cmd As SqlCommand) As Integer        Dim i As Integer        cmd.CommandType = CommandType.StoredProcedure        Try            cmd.Connection.Open()            i = cmd.ExecuteNonQuery()        Catch ex As Exception            ErrorMessage = "ProDBObject.SqlExecuteInsertSp(SqlCommand): " & ex.Message.ToString        Finally            cmd.Connection.Close()        End Try        Return i    End Function I can't figure out what this is doing.  The best I can figure is it determines if we have a good connection.  Is this right?  In my code CastVote keeps returning false, and I don't know why.   The answer seems to be in the i = cmd.ExecuteNonQuery() line, but I can't figure out what that line is supposed to be doing.Diane  

View 3 Replies View Related

Understanding Sch-M Locks...

Sep 4, 2006

Hi Guys,
I have written quite a big stored procedure which creates a temporary table (multi-session) and updates it. All the statements are encapsulated in a single transaction which is explicitly declared in the code. What happens is that a lock is being put by the server on that table (of type Sch-M) in order thus preventing any type of operations on it (including simple select)

Now, I want to be able read that table from within another transaction. Why is that I cannot use a table hint NOLOCK in the select statement?

Here is some code which reproduces my problem.

Query A:



SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;

BEGIN TRAN TR_DEMO;

CREATE TABLE ##TBL1(
Oidx int not null primary key identity(1,1),
Name nvarchar(30) not null,
Type char(1) not null
);


INSERT ##TBL1 (Name,Type) VALUES ('Car','M');

WAITFOR DELAY '00:00:10';

INSERT ##TBL1 (Name,Type) VALUES ('Plane','M');

WAITFOR DELAY '00:00:10';

INSERT ##TBL1 (Name,Type) VALUES('Submarine','M');

WAITFOR DELAY '00:00:10';

DELETE FROM ##TBL1;

DROP TABLE ##TBL1;

COMMIT TRAN TR_DEMO;



Query B:

SELECT TOP 1 * FROM ##TBL1 (NOLOCK) ORDER BY oidx DESC;

Launch query A and then execute query B.

Thanks a lot for your help.

View 2 Replies View Related

Understanding @@ERROR ....

Nov 3, 2004

My question is in what situations @@ERROR will be set...

I like to do some logic when some error is occured in a particular statement....

the doc. says the @@ERROR value will be set if an error occurs in a statement, and the control will move to the next statement without exiting(???) the procedure and @@ERROR value can be used in that statement.

but when i execute the below procedure, the execution is terminated ( when the error occurs) without moving to the next statement. please help me to understand the SQL Server's @@ERROR and the situations when it will be set....

-----------------------------------------------------------------------
CREATE PROCEDURE VALUE_ERROR_TEST
AS
BEGIN
DECLARE @adv_error INT
DECLARE @errno INT
DECLARE @var int
SELECT @var = '101 a'
SELECT @errno = @@ERROR
print @errno
END
go
-----------------------------------------------------------------------
procedure get successfully compiled. when executed it says,

Server: Msg 245, Level 16, State 1, Procedure VALUE_ERROR_TEST, Line 10
Syntax error converting the varchar value '101 a' to a column of data type int.


Jake

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved