INFORMATION ON PROCESS ID

Nov 17, 1998

Is there any way to use Transact SQL to get the detailed information on a process like you get when you use the GUI interface under the Enterprise manager for server activity.

Thanks!

View 1 Replies


ADVERTISEMENT

Getting Process Information

Mar 3, 2008



Is there a way, in a query, to pull information on the last process/function/whatever run when an event happens?

Say, everytime a record gets deleted from a specific table, I want to run a delete trigger to record the date & time it occured, and what the last thing was that SQL did. Is there a way to pull that, and place it into a table?

View 16 Replies View Related

The Process Could Not Log Conflict Information

Aug 5, 2005

Hi - I'm getting this error on a merge subscription between two SQL 2000 SP3machines. The agent has been working fine for many weeks and nothing obvioushas changed.Calling up details on the error doesn't give any further info. I've even triedputting it onto the 'Verbose' agent profile.The two machines are authenticating by using the 'Impersonate...' option.Both machines have been rebooted, on the off chance that might be it.Both machines also have other agents, between the same two databases, that areworking fine.Any ideas?Thanks,Jim--Find me at http://www.ursaMinorBeta.co.uk"The voices that control me from inside my headSay I shouldn't kill you yet." - Jonathan Coulton, 'Skullcrusher Mountain'

View 2 Replies View Related

The Process Could Not Log Conflict Information

Dec 21, 2006

I recently setup merge replication and for each subscriber I add an tryand synchronize I get the following error message:"The Process Could Not Log Conflict Information"When I view the details of the error it states the following:"The Process Could Not Log Conflict Information.(Source: Merge Replication Provider (Agent); Error number: -2147200992)---------------------------------------------------------------------------------------------------------SELECT permissions denied on object 'conflict_mydatabase_mytable',database 'MyDatabase', Owner 'MyUser'.(Source: SERVERNAME(Data Source); Error number: 229)---------------------------------------------------------------------------------------------------------INSERT permissions denied on object 'conflict_mydatabase_mytable',database 'MyDatabase', Owner 'MyUser'.(Source: SERVERNAME(Data Source); Error number: 229)"Judging from the Session Details it merges all data first but failsright at the end with the above.Can anyone help me with this??PS. I had setup a test replication environment first and did not haveany problems, only once I put it into production I starting gettingthese errors (My luck!)

View 1 Replies View Related

Transaction (Process ID 135) Was Deadlocked On Lock Resources With Another Process And Has Been Chosen As The Deadlock Victim.

Nov 14, 2007



Hi,

I was trying to extract data from the source server using OLEDB Source and SQL Server Destination when i encountered this error:

"Transaction (Process ID 135) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.".

What must be done so that even if the table being queried is locked, i wouldn't experience any deadlock?

cherriesh

View 4 Replies View Related

FCB::Open: Operating System Error 32(The Process Cannot Access The File Because It Is Being Used By Another Process.) Occurred W

Dec 3, 2007

Hello all,
I am running into an interesting scenario on my desktop. I'm running developer edition on Windows XP Professional (9.00.3042.00 SP2 Developer Edition). OS is autopatched via corporate policy and I saw some patches go in last week. This machine is also a hand-me-down so I don't have a clean install of the databases on the machine but I am local admin.

So, starting last week after a forced remote reboot (also a policy) I noticed a few of the databases didn't start back up. I chalked it up to the hard shutdown and went along my merry way. Friday however I know I shut my machine down nicely and this morning when I booted up, I was in the same state I was last Wenesday. 7 of the 18 databases on my machine came up with

FCB:pen: Operating system error 32(The process cannot access the file because it is being used by another process.) occurred while creating or opening file 'C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataTest.mdf'. Diagnose and correct the operating system error, and retry the operation.
and it also logs
FCB:pen failed: Could not open file C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataTest.mdf for file number 1. OS error: 32(The process cannot access the file because it is being used by another process.).

I've caught references to the auto close feature being a possible culprit, no dice as the databases in question are set to False. Recovery mode varies on the databases from Simple to Full. If I cycle the SQL Server service, whatever transient issue it was having with those files is gone.
As much as I'd love to disable the virus scanner, network security would not be amused. The data and log files appear to have the same permissions as unaffected database files. Nothing's set to read only or archive as I've caught on other forums as possible gremlins. I have sufficient disk space and the databases are set for unrestricted growth.

Any thoughts on what I could look at? If it was everything coming up in RECOVERY_PENDING it's make more sense to me than a hit or miss type of thing I'm experiencing now.

View 13 Replies View Related

[Execute Process Task] Error:The Process Exit Code Was -1 While The Expected Was 0.

Mar 11, 2008

Dear list
Im designing a package that uses Microsofts preplog.exe to prepare web log files to be imported into SQL Server

What Im trying to do is convert this cmd that works into an execute process task
D:SSIS ProcessPrepweblogProcessLoad>preplog ex.log > out.log
the above dos cmd works 100%



However when I use the Execute Process Task I get this error
[Execute Process Task] Error: In Executing "D:SSIS ProcessPrepweblogProcessLoadpreplog.exe" "" at "D:SSIS ProcessPrepweblogProcessLoad", The process exit code was "-1" while the expected was "0".

There are two package varaibles
User::gsPreplogInput = ex.log
User::gsPreplogOutput = out.log

Here are the task properties
RequireFullFileName = True
Executable = D:SSIS ProcessPrepweblogProcessLoadpreplog.exe
Arguments =
WorkingDirectory = D:SSIS ProcessPrepweblogProcessLoad
StandardInputVariable = User::gsPreplogInput
StandardOutputVariable = User::gsPreplogOutput
StandardErrorVariable =
FailTaskIfReturnCodeIsNotSuccessValue = True
SuccessValue = 0
TimeOut = 0

thanks in advance
Dave

View 1 Replies View Related

Execute Process Task Error - The Process Exit Code Was 1 While The Expected Was 0.

Jan 30, 2007

How do I use the execute process task? I am trying to unzip the file using the freeware PZUnzip.exe and I tried to place the entire command in a batch file and specified the working directory as the location of the batch file, but the task fails with the error:

SSIS package "IngramWeeklyPOS.dtsx" starting.

Error: 0xC0029151 at Unzip download file, Execute Process Task: In Executing "C:ETLPOSDataIngramWeeklyUnzip.bat" "" at "C:ETLPOSDataIngramWeekly", The process exit code was "1" while the expected was "0".

Task failed: Unzip download file

SSIS package "IngramWeeklyPOS.dtsx" finished: Success.

Then I tried to specify the exe directly in the Executable property and the agruments as the location of the zip file and the directory to unzip the files in, but this time it fails with the following message:

SSIS package "IngramWeeklyPOS.dtsx" starting.

Error: 0xC002F304 at Unzip download file, Execute Process Task: An error occurred with the following error message: "%1 is not a valid Win32 application".

Task failed: Unzip download file

SSIS package "IngramWeeklyPOS.dtsx" finished: Success.

The command in the batch file when run from the command line works perfectly and unzips the file, so there is absolutely no problem with the command, I believe it is just the set up of the variables on the execute process task editor under Process. Any input on resolving this will be much appreciated.

Thanks,

Monisha

View 1 Replies View Related

Execute Process Task - Error :The Process Exit Code Was 2 While The Expected Was 0.

Mar 20, 2008



I am designing a utility which will keep two similar databases in sync. In other words, copying the new data from db1 to db2 and updating the old data from db1 to db2.

For this I am making use of the 'Tablediff' utility which when provided with server name, database, table info will generate .sql file which can be used to keep the target table in sync with the source table.

I am using the Execute Process Task and the process parameters I am providing are:



WorkingDirectory : C:Program Files (x86)Microsoft SQL Server90COM
Executable : C:SQL_bat_FilesSQL5TC_CTIcustomer.bat

The customer.bat file will have the following code:
tablediff -sourceserver "LV-SQL5" -sourcedatabase "TC_CTI" -sourcetable "CUSTOMER_1" -destinationserver "LV-SQL2" -destinationdatabase "TC_CTI" -destinationtable "CUSTOMER" -f "c:SQL_bat_Filessql5TC_CTIsql_filescustomer1"

the .sql file will be generated at: C:SQL_bat_Filessql5TC_CTIsql_filescustomer1.

The Problem:
The Execute Process Task is working fine, ie., the tables are being compared correctly and the .SQL file is being generated as desired. But the task as such is reporting faliure with the following error :

[Execute Process Task] Error: In Executing "C:SQL_bat_FilesSQL5TC_CTIpackage_occurrence.bat" "" at "C:Program Files (x86)Microsoft SQL Server90COM", The process exit code was "2" while the expected was "0". ]

Some of you may suggest to just set the ForceExecutionResult = Success (infact this is what I am doing now just to get the program working), but, this is not what I desire.

Can anyone help ?




View 9 Replies View Related

Integration Services :: Dataload Process - Error Capturing Process

Aug 20, 2014

I'm pulling data from Oracle db and load into MS-SQL 2008.For my data type checks during the data load process, what are options to ensure that the data being processed wouldn't fail. such that I can verify first in-hand with the target type of data and then if its valid format load it into destination table else mark it with error flag and push into errors table... All this at the row level.One way I can think of is to load into a staging table then get the source & destination table -column data types, compare them and proceed.

should I just try loading the data directly and if it fails try trouble shooting(which could be a difficult task as I wouldn't know what caused error...)

View 3 Replies View Related

Transaction (Process ID 66) Was Deadlocked On Lock Resources With Another Process.

Feb 14, 2007

Hi Folks,

I am having this table locking issue that I need to start paying attention to as its getting more frequent.

The problem is that the data in the tables is live finance data that needs to be changed and viewed almost real time so what I have picked up so far is that using 'table Hints' may not be a good idea.

I have a guy at work telling me that introducing a data access layer is the only way to solve this, I am not convinced but havnt enough knowledge to back my own feeling up. (asp system not .net).

Thanks in advance

View 1 Replies View Related

Transaction (Process ID 65) Was Deadlocked On Lock Resources With Another Process

Jan 6, 2012

We are facing deadlock issue in our web application. The below message is coming:

> Session ID: pwdagc55bdps0q45q0j4ux55
> Location: xxx.xxx.xxx.xxx
> Error in: http://xxx.xxx.xxx.xxx:xxxx/Manhatta...Bar=&Mode=Edit
> Notes:
> Parameters:
> __EVENTTARGET:
> __EVENTARGUMENT:

[code].....

View 2 Replies View Related

SecurityException Class SQLServerDatabaseMetaData's Signer Information Does Not Match Signer Information Of Other

May 23, 2007

Hello,

I have some troubles with IBM WebSphere Application Server using MS SQL Server 2005 JDBC Driver. I always get the error e.g.
java.lang.SecurityException: class "com.microsoft.sqlserver.jdbc.SQLServerDatabaseMetaData"'s signer information does not match signer information of other classes in the same package

I found this Feedback but it seems to be closed.

A temporary solution for me was to delete the meta-inf directory of the JAR-File, but that can't be the solution.

Can anyone help me with this problem?

Simon

View 4 Replies View Related

ASPNETDB.MDF: The Process Cannot Access The File Because It Is Being Used By Another Process

Feb 17, 2007

Hi,
I'm trying to upload the ASPNETDB.MDF file to a hosting server via FTP, and everytime when it was uploaded half way(40% or 50%)
I would get an error message saying:
"550 ASPNETDB.MDF: The process cannot access the file because it is being used by another process"
 and then the upload failed.
 I'm using SQL Express. Does anybody know what's the cause?
 Thanks a lot

View 1 Replies View Related

Cannot Process Request Because The Process (3880) Has Exited.

Nov 15, 2007



Hi. When I try to start a package manually clicking the Start Debugging button I get this after a little while:


Cannot process request because the process (3880) has exited. (Microsoft.DataTransformationServices.VsIntegration)

How can I prevent this from happening? This happens every time I want to start the package and
every time the process id is different. Here it is 3880.

Darek

View 13 Replies View Related

System Process Or User Process

Dec 20, 2006

select * from sysprocesses
How can I determine whether a process a system or user?

View 3 Replies View Related

Identify A Process Which Locked Other Process

Oct 11, 2007

Hello,



I have had a full lock on my sql server and I have a few logs to found the origin of the lock.

I know the process at the head of the lock is the 55 process.



Here are the information I have on this process:
Spid 55 55
ecid 5 5
Ecid 0 0
ObjId 0 1784601646
IndId 0 0
Type DB PAG
Resource 1:1976242
Mode S IS
Status TransID GRANT GRANT
TransID 0 16980
TransUOW 00000000-0000-0000-0000-000000000000
00000000-0000-0000-0000-000000000000


lastwaittype PAGEIOLATCH_SH
CMD AWAITING COMMAND
Physycal id 1059
Login time 2007-07-05 04:29:53.873
nat address DFF06EBF974D
Wait type 0x0046
HostName .
BlkBy .
DBName grpprddb
CPUTime 54331
DiskIO 1059
ProgramName


Would someone know a way to identify the origin of the process 55?

I have already tried to execute the following request:
select * from SYSOBJECTS
where id=1784601646

But I have had no returns.



Regards,

Renaud

View 3 Replies View Related

The Process Cannot Access The File It Is Being Used By Another Process.

Aug 24, 2006

I have a File System Task Copy file operation to copy a file in an SSIS package. The package when scheduled as a job fails with the following error:

The process cannot access the file 'C:ETLConsignmentAppleAppleRawFile.txt' because it is being used by another process.".

However when I right click on the package and execute it manually from the Integration Services it runs successfully without any problem. I am not certain on how to resolve this issue any inputs will be much appreciated.

Thanks,

Monisha

View 19 Replies View Related

The Process Cannot Access The File Because It Is Being Used By Another Process.

Feb 6, 2008

Error: 0xC002F304 at Rename file 1, File System Task: An error occurred with the following error message: "The process cannot access the file because it is being used by another process.".

When running two File System Tasks after each other, with the same file, the file is still locked when running the second task. Resulting in an error: 0xC002F304 at Rename file 1, File System Task: An error occurred with the following error message: "The process cannot access the file because it is being used by another process.".


I found a workaround by addind a Execute Process Task before the second File System Task that pings to the localhost. This results in a 5 second delay, but there must be a better solution. Anyone?

View 9 Replies View Related

The Process Cannot Access The File Because It Is Being Used By Another Process.

Nov 23, 2006

While configuring log shipping using SQL 2000 Ent, the copy process failed with this message :

The process cannot access the file because it is being used by another process.

does anyone know what cause this ?

SAP R/3 is configured with the system, could this be the problem ?

View 3 Replies View Related

A Connection Was Successfully Established With The Server, But Then An Error Occurred During The Login Process. (provider: Shared Memory Provider, Error: 0 - No Process Is On The Other End Of The Pipe.)

Apr 7, 2008

i'm going nuts with SQL server notification thing. I have gone throigh this artical which tells how to set user http://www.codeproject.com/KB/database/SqlDependencyPermissions.aspx. This article show how to create new user and setup for sql server notification.But In my case user was alredy existing in database. which is very common senario in most cases. So i did following( check the SQL script below) but then i get this error
"A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)"
this my sql script
use [master]Go
-- Ensuring that Service Broker is enabled ALTER DATABASE [DatabaseName] SET ENABLE_BROKERGO
-- Switching to our databaseuse [DatabaseName]GO
CREATE SCHEMA schemaname AUTHORIZATION usernameGO
ALTER USER username WITH DEFAULT_SCHEMA = schemaname GO
/* * Creating two new roles. We're not going to set the necessary permissions  * on the user-accounts, but we're going to set them on these two new roles. * At the end of this script, we're simply going to make our two users  * members of these roles. */EXEC sp_addrole 'sql_dependency_subscriber' EXEC sp_addrole 'sql_dependency_starter'
-- Permissions needed for [sql_dependency_starter]GRANT CREATE PROCEDURE to [sql_dependency_starter] GRANT CREATE QUEUE to [sql_dependency_starter]GRANT CREATE SERVICE to [sql_dependency_starter]GRANT REFERENCES on CONTRACT::[http://schemas.microsoft.com/SQL/Notifications/PostQueryNotification]  to [sql_dependency_starter] GRANT VIEW DEFINITION TO [sql_dependency_starter]
-- Permissions needed for [sql_dependency_subscriber] GRANT SELECT to [sql_dependency_subscriber] GRANT SUBSCRIBE QUERY NOTIFICATIONS TO [sql_dependency_subscriber] GRANT RECEIVE ON QueryNotificationErrorsQueue TO [sql_dependency_subscriber] GRANT REFERENCES on CONTRACT::[http://schemas.microsoft.com/SQL/Notifications/PostQueryNotification]  to [sql_dependency_subscriber]
-- Making sure that my users are member of the correct role.EXEC sp_addrolemember 'sql_dependency_starter', 'username'EXEC sp_addrolemember 'sql_dependency_subscriber', 'username'

View 10 Replies View Related

ASP.net, Database File, Process Cannot Access The File Because It Is Being Used By Another Process

Mar 19, 2008

Hi I am using VWD 2008, SQL Express 2005, Reporting Services, Win-XP, IIS5Basically let's say I have 2 pages:Page1: has a SQLDataSource control that populates a GridView from a table from a database file myDB.mdf  (no code behind)Page2: has a reportviewer control that show a report with data from the same table from myDB.mdf from the reportserver, (no code behind)I have attached myDB.mdf to the SQL Server Express using the SQL Server Management Studio Express.If I first open Page2 to display the ReportViewer it works ok. or using the Report ManagerNow this is the problem:If after that I try to open Page1 then a get an error message:Cannot open user default database. Login failed.Login failed for user 'myServerASPNET'. Exception Details: System.Data.SqlClient.SqlException: Cannot open user default database. Login failed.Login failed for user 'myServerASPNET'.Then I have to restart the SQL Server to fix it,Now I can open Page1 ok, but if after this I try to open Page2 (ReportViewer) againThen I get this error:"      An error has occurred during report processing. o      Cannot create a connection to data source 'my_Datasource'.  &And this error if open the report using the report manager:"      An error has occurred during report processing. o      Cannot create a connection to data source 'my_Datasource'. ยง      Unable to open the physical file "C:InetpubwwwrootWebsiteApp_DatamyDB.mdf". Operating system error 32: "32(The process cannot access the file because it is being used by another process.)".  &Now if i check the Management Studio Express again, you can see that myDB.mdf was detached. It seems to be there by it has no Tables or definitions, so I have to attach it again..Do you know how to fix this?Thanks in advance,Ed

View 5 Replies View Related

Information About A Job After It Ran

Jul 2, 2001

I have a job that runs each night that deletes all records from a table that are older than two weeks old. Is there some way I can view how many records were deleted from the table each night. Is it written to a log somewhere? Thanks in advance!

View 1 Replies View Related

Getting Information

Aug 4, 2005

Hi all,
This is my first thread here.
I got an information about
SET NO_BROWSETABLE ON/OFF
in your forum.. The replier told that this is an undocumented option.
My question is how you guys find information on such undocumented things....

Thanks in advance.
Saint

View 1 Replies View Related

Information !

Mar 26, 2008

Hello,

Can anyone clarify the nuances of How to deal with the change management environment in SQL Server.

Thanks.

View 3 Replies View Related

Get Job Information

Sep 6, 2007

I am trying to get job information and have a query set up. However, I would also like to get the owner information. However, the job only stores the sid of the owner. Does anybody know how I could change this query to get the owner name instead of sid? Don't want to use the sp_help_job command.

SELECT @@SERVERNAME AS Server, msdb.dbo.sysjobs.job_id, msdb.dbo.sysjobs.name, msdb.dbo.sysjobs.enabled AS Job_Enabled,
msdb.dbo.sysjobs.description, msdb.dbo.sysjobs.notify_level_eventlog, msdb.dbo.sysjobs.notify_level_email,
msdb.dbo.sysjobs.notify_level_netsend, msdb.dbo.sysjobs.notify_level_page, msdb.dbo.sysjobs.notify_email_operator_id,
msdb.dbo.sysjobs.date_created, msdb.dbo.syscategories.name AS Category_Name, msdb.dbo.sysjobschedules.next_run_date,
msdb.dbo.sysjobschedules.next_run_time, msdb.dbo.sysjobservers.last_run_outcome, msdb.dbo.sysjobservers.last_outcome_message,
msdb.dbo.sysjobservers.last_run_date, msdb.dbo.sysjobservers.last_run_time, msdb.dbo.sysjobservers.last_run_duration,
msdb.dbo.sysoperators.name AS Notify_Operator, msdb.dbo.sysoperators.email_address, msdb.dbo.sysjobs.date_modified, GETDATE()
AS Package_run_date
FROM msdb.dbo.sysjobs INNER JOIN
msdb.dbo.syscategories ON msdb.dbo.sysjobs.category_id = msdb.dbo.syscategories.category_id LEFT OUTER JOIN
msdb.dbo.sysoperators ON msdb.dbo.sysjobs.notify_email_operator_id = msdb.dbo.sysoperators.id LEFT OUTER JOIN
msdb.dbo.sysjobservers ON msdb.dbo.sysjobs.job_id = msdb.dbo.sysjobservers.job_id LEFT OUTER JOIN
msdb.dbo.sysjobschedules ON msdb.dbo.sysjobschedules.job_id = msdb.dbo.sysjobs.job_id

View 1 Replies View Related

Information Being Cut Off

Mar 17, 2008

I have a report where the information is getting cut off the report.

At the beginning of or at the ending of the page it is dropping the information.

My layout setting are set 8.5in wide by 11in height. .5in for either left or right margin. 1in for top and bottom.

I run the report and I'm missing a record.

I adjust the height to 10in to force diffferent page breaks and it's there.

I have the setting in one of the groups set for a page break at end. If I uncheck that it doesn't help.Still no records.

What is going on?

View 5 Replies View Related

Looking For Information

Mar 15, 2006

I'm looking for books or information on command line configuration of settings for things like activating Remote Connections under the Service Area Configuration and setting a port for that connection.

What books would be good to get or where can I download papers on this?

Any help would be appreciated.

View 1 Replies View Related

Locking Information

Dec 23, 2005

Hi!This is a very simple question and I'm sure you guys will help me a lot.I'm using Visual Basic 2005 for programming. I have one table on my MS SQL 2005 database that has an int column with a counter that needs to be incremented when a user registers.So when reading the value I use a simple SQL query like this:
SELECT counter FROM companies WHERE company=0
then I store the value in a local int variable and then I increment it. Then I update the incremented value.
UPDATE companies ...
I need every single customer to have an individual value. My question is how can I prevent an error, data corruption or whatever if two or more users want to register at the same time? I've been reading about lock update but I'm not sure how to implement it on Visual Basic 2005 and I don't want to store scripts on SQL Server.
I'll appreciate your comments and help on this situation.

View 15 Replies View Related

Trigger Information

Jul 26, 2001

Hi,
I have a problem here in my SQL Server Database. I want to find which trigger is working backend affecting my table input. Since the original author of this trigger was somebody else, I am not able to find the trigger information
A simple line of syntax would be great.
Thanks in advance
sandeep

View 1 Replies View Related

Last Login Information

Aug 30, 2001

I am doing an audit of user information in our database and was wondering if there is a way for me to see the last time a user logged into the database. I am using a SQL Server 7.0 box. Any Information would be greatly appreciated. Thanks!

View 1 Replies View Related

Alias Information In 70

Jun 27, 2000

Hi,
In my database one user is aliased like a guest. When i run sp_helpuser on the particular database it is giving following result.

username login name database
-------- ----------- --------
aaaa NULL XYZ


NOrmally we fill see like this for GUEST User. Now i want to drop this user 'aaaa' only. IF i use
sp_dropuser 'null'
i think guest user will also drop from XYZ database.
So can anyone pls suggest me how to drop this user. I have to add a same user with full permissions. i know in 65 we have sysalternates table gives all alias information. Is there any table gives the same information in sql7.
Pls suggest me regarding this.

thank u
raj

View 1 Replies View Related

HELP (URGENT) Need Information!

Sep 26, 2000

Hi,

I administering SQL server and one of or Db (size ~7 Gb) have a table with size 396 MB and 25 indexes created on this one. We working with this DB using Siebel Call center.
I have met a very strange situation: when I tried to get some data (using Siebel) my request take ~5 min. I run Profiler and catched this T-SQL statement which Siebel send to SQL server. After that, I run this T-SQL query using Query Analyser and found that Query Optimiser used wrong index. (clustered index) and try to compare every 470436 rows from the tables.
This is the statement. @P1, @P2, and @P3 just variable which siebel transfer to SQL server.

SELECT ........
FROM
dbo.S_EVT_ACT T1
LEFT OUTER JOIN dbo.S_CONTACT T2 ON T1.TARGET_PER_ID = T2.ROW_ID
WHERE
((T1.APPT_REPT_FLG != @P1 OR T1.APPT_REPT_FLG IS NULL) AND
(T1.TEMPLATE_FLG != @P2 OR T1.TEMPLATE_FLG IS NULL)) AND
(T1.SRA_DEFECT_ID = @P3)

But I found the very strange situation - when I manualy put the value '1-FRK' instead of @P3 - Query Optimizer used RIGHT index and I had a very good performance.


And addition when I tried to run the first Query on the same table but with the only 1000 rows the Query Optimiser choose right index.


Wat's on, wat happend with My Query Optimizer? Wy his decision so different from time to time?


Thank's a lot for any information about how to make Optimiser obedient.

View 5 Replies View Related







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