Tuesday, March 27, 2012
deadlocks
I have created a VB program to perform DTS tasks for data transfer from
ACCESS database to SQL Server. The DTS are created by saving the actual DTS
packages as VB file and used those bas files in VP app to run the DTS
programmatically.
The process works fine most of the time.
But occassionally the DTS process is getting locked. The two connections
from the DTS package to SQL server database gains DB lock on the database
and so the process does not go further .
Can any body know why this is happenning?
what could be the solution for this problem?
please help.
thanks
SamTracing Deadlocks
http://www.sqlservercentral.com/col...ngdeadlocks.asp
AMB
"Sam" wrote:
> Hi,
> I have created a VB program to perform DTS tasks for data transfer from
> ACCESS database to SQL Server. The DTS are created by saving the actual DT
S
> packages as VB file and used those bas files in VP app to run the DTS
> programmatically.
> The process works fine most of the time.
> But occassionally the DTS process is getting locked. The two connections
> from the DTS package to SQL server database gains DB lock on the database
> and so the process does not go further .
> Can any body know why this is happenning?
> what could be the solution for this problem?
> please help.
> thanks
> Sam
>
>
Sunday, March 25, 2012
deadlock: could not perform retention-based meta data cleanup
Hi SQL Replication Gurus:
I got some issues in my production environment, so please help me out. The following is the message I got from the replication monitor and I don't what to at this point.
Appreciate you help.
Yong
==========================================================================================
Command attempted:
{call sp_mergemetadataretentioncleanup(?, ?, ?)}
Error messages:
The merge process could not perform retention-based meta data cleanup in database 'TT'. (Source: Merge Replication Provider, Error number: -2147199467)
Get help: http://help/-2147199467
Transaction (Process ID 73) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. (Source: ply-db-svr1, Error number: 1205)
Get help: http://help/1205
Michael ,
Thank you for your response. I have tried restarting the sql server agent, the sql Server Engine, and even restarting the windows server. That did not resolve the problem at all.
Thanks.
Yong
|||1) How many subcribers connecting to publisher?
2) What is the amount of data loaded?
3) What is your configuration on SQL Merge profiler?
Sunday, March 11, 2012
deadlock
I have created a VB program to perform DTS tasks for data transfer from
ACCESS database to SQL Server. The DTS are created by saving the actual DTS
packages as VB file and used those bas files in VP app to run the DTS
programmatically.
The process works fine most of the time.
But occassionally the DTS process is getting locked. The two connections
from the DTS package to SQL server database gains DB lock on the database
and so the process does not go further .
Can any body know why this is happenning?
what could be the solution for this problem?
please help.
thanks
Sam
How are you sure it's a deadlock instead of a normal blocking?
You can set up trace flag -T1204 and -T3605 in the start up parameters on
the SQL server and capture deadlock details in the SQL error log. Or if you
have lumigent Log Explorer, you can set up alert on deadlocks. YOu can also
use SQL profiler to capture a trace using Locks:Deadlocks and Lock:Deadlock
Chain.
Richard
"Sam" <samirsoni@.hotmail.com> wrote in message
news:elDzAt6MFHA.3340@.TK2MSFTNGP14.phx.gbl...
> Hi,
> I have created a VB program to perform DTS tasks for data transfer from
> ACCESS database to SQL Server. The DTS are created by saving the actual
> DTS
> packages as VB file and used those bas files in VP app to run the DTS
> programmatically.
> The process works fine most of the time.
> But occassionally the DTS process is getting locked. The two connections
> from the DTS package to SQL server database gains DB lock on the database
> and so the process does not go further .
> Can any body know why this is happenning?
> what could be the solution for this problem?
> please help.
> thanks
> Sam
>
>
Thursday, March 8, 2012
deadlock
I have created a VB program to perform DTS tasks for data transfer from
ACCESS database to SQL Server. The DTS are created by saving the actual DTS
packages as VB file and used those bas files in VP app to run the DTS
programmatically.
The process works fine most of the time.
But occassionally the DTS process is getting locked. The two connections
from the DTS package to SQL server database gains DB lock on the database
and so the process does not go further .
Can any body know why this is happenning?
what could be the solution for this problem?
please help.
thanks
SamHow are you sure it's a deadlock instead of a normal blocking?
You can set up trace flag -T1204 and -T3605 in the start up parameters on
the SQL server and capture deadlock details in the SQL error log. Or if you
have lumigent Log Explorer, you can set up alert on deadlocks. YOu can also
use SQL profiler to capture a trace using Locks:Deadlocks and Lock:Deadlock
Chain.
Richard
"Sam" <samirsoni@.hotmail.com> wrote in message
news:elDzAt6MFHA.3340@.TK2MSFTNGP14.phx.gbl...
> Hi,
> I have created a VB program to perform DTS tasks for data transfer from
> ACCESS database to SQL Server. The DTS are created by saving the actual
> DTS
> packages as VB file and used those bas files in VP app to run the DTS
> programmatically.
> The process works fine most of the time.
> But occassionally the DTS process is getting locked. The two connections
> from the DTS package to SQL server database gains DB lock on the database
> and so the process does not go further .
> Can any body know why this is happenning?
> what could be the solution for this problem?
> please help.
> thanks
> Sam
>
>
deadlock
I have created a VB program to perform DTS tasks for data transfer from
ACCESS database to SQL Server. The DTS are created by saving the actual DTS
packages as VB file and used those bas files in VP app to run the DTS
programmatically.
The process works fine most of the time.
But occassionally the DTS process is getting locked. The two connections
from the DTS package to SQL server database gains DB lock on the database
and so the process does not go further .
Can any body know why this is happenning?
what could be the solution for this problem?
please help.
thanks
SamHow are you sure it's a deadlock instead of a normal blocking?
You can set up trace flag -T1204 and -T3605 in the start up parameters on
the SQL server and capture deadlock details in the SQL error log. Or if you
have lumigent Log Explorer, you can set up alert on deadlocks. YOu can also
use SQL profiler to capture a trace using Locks:Deadlocks and Lock:Deadlock
Chain.
Richard
"Sam" <samirsoni@.hotmail.com> wrote in message
news:elDzAt6MFHA.3340@.TK2MSFTNGP14.phx.gbl...
> Hi,
> I have created a VB program to perform DTS tasks for data transfer from
> ACCESS database to SQL Server. The DTS are created by saving the actual
> DTS
> packages as VB file and used those bas files in VP app to run the DTS
> programmatically.
> The process works fine most of the time.
> But occassionally the DTS process is getting locked. The two connections
> from the DTS package to SQL server database gains DB lock on the database
> and so the process does not go further .
> Can any body know why this is happenning?
> what could be the solution for this problem?
> please help.
> thanks
> Sam
>
>
Wednesday, March 7, 2012
DDL file to convert from mySQL to SQLServerXXX
We want to migrate a mySQL database to sql server 2000 or sql Server 2005. I have been given a DDL file to perform the conversion, but I don't know what to do with the file? Can anyone help me out? From what I can conclude, the DDL files is a script. So how do I run this script? Where do I place the file, before I run it?
Please help !
IF its a small file (with few tables/storedprocs/views..etc) I would go through the script to check for syntax errors. You could even to a "syntax check" from the query analyzer of SQL Server. Get the script fixed if there are any issues. Then create a database on SQL Server and compile the scripts against the DB.I believe there are SQL Server upgrade/migrate advisors. you can always google and check out any tips.|||Try this blog and if it work let me know
http://weblogs.asp.net/scottgu/archive/2005/08/25/423703.aspx
Saturday, February 25, 2012
dbTrace to find Index Non-Use - How To?
ultimately find where indexes are NOT being used when users perform
searches...
Any idea how to set this up? I don't see events related to indexes...
TIA,
ChrisHi,
Easy method is "Use the Execution Plan" graphical option in Query
Analyzer -- Query option --"Show Execution plan"
Thanks
Hari
SQL Server MVP
"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:F5880B81-77A8-4BC2-92A7-4A1B01BE6EE8@.microsoft.com...
> I read somewhere or heard you can trace for activity on table indexes to
> ultimately find where indexes are NOT being used when users perform
> searches...
> Any idea how to set this up? I don't see events related to indexes...
> TIA,
> Chris|||Chris,
You might try the Index Tuning Wizard.
HTH
Jerry
"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:F5880B81-77A8-4BC2-92A7-4A1B01BE6EE8@.microsoft.com...
> I read somewhere or heard you can trace for activity on table indexes to
> ultimately find where indexes are NOT being used when users perform
> searches...
> Any idea how to set this up? I don't see events related to indexes...
> TIA,
> Chris|||I need to monitor ALL indexes on all db tables, then find those that are NOT
being used... can't do that w/ Query Analyzer show plan, can't do that w/ the
tuning wizard. I need to collect this activity either thru a dbTrace or
PerfMon counters...
Any ideas'
"Chris" wrote:
> I read somewhere or heard you can trace for activity on table indexes to
> ultimately find where indexes are NOT being used when users perform
> searches...
> Any idea how to set this up? I don't see events related to indexes...
> TIA,
> Chris|||Chris,
What about ITWIZ?
See:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/coprompt/cp_isqlw_8p2x.asp
HTH
Jerry
"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:34A64A78-9F16-4851-A5C3-1DB66D7B390A@.microsoft.com...
> I need to monitor ALL indexes on all db tables, then find those that are
> NOT
> being used... can't do that w/ Query Analyzer show plan, can't do that w/
> the
> tuning wizard. I need to collect this activity either thru a dbTrace or
> PerfMon counters...
> Any ideas'
> "Chris" wrote:
>> I read somewhere or heard you can trace for activity on table indexes to
>> ultimately find where indexes are NOT being used when users perform
>> searches...
>> Any idea how to set this up? I don't see events related to indexes...
>> TIA,
>> Chris|||Capture the execution plan over a relevant time period, parse it, compare against the indexes you
have in your tables. Anything in the trace that isn't in sysindexes? There you have it, those
indexes wasn't used by the SQL submitted over that trace. There will be better ways in 2005 to do
this...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:34A64A78-9F16-4851-A5C3-1DB66D7B390A@.microsoft.com...
> I need to monitor ALL indexes on all db tables, then find those that are NOT
> being used... can't do that w/ Query Analyzer show plan, can't do that w/ the
> tuning wizard. I need to collect this activity either thru a dbTrace or
> PerfMon counters...
> Any ideas'
> "Chris" wrote:
>> I read somewhere or heard you can trace for activity on table indexes to
>> ultimately find where indexes are NOT being used when users perform
>> searches...
>> Any idea how to set this up? I don't see events related to indexes...
>> TIA,
>> Chris|||Hi Chris
I do it by using trace to capture a workload over as long a period of time
as I can, and then run that through the Index Tuning Wizard. ITW generates a
set of reports, one of which is a list of which of your current indexes are
being used what percent of the time.
--
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:F5880B81-77A8-4BC2-92A7-4A1B01BE6EE8@.microsoft.com...
> I read somewhere or heard you can trace for activity on table indexes to
> ultimately find where indexes are NOT being used when users perform
> searches...
> Any idea how to set this up? I don't see events related to indexes...
> TIA,
> Chris
>
dbreindex vs index defrag question
You can reduce fragmentation and improve read-ahead performance by using one of the following:
Dropping and re-creating an index
=================================
Best performance, but places an exclusive table lock on the table, preventing any table access by users and shared table lock on the table, preventing all
but SELECT operations to be performed on it.
OR
Rebuilding an index by using the DBCC DBREINDEX statement
================================================== =======
Faster than dropping and re-creating, but during rebuilding a clustered index, an exclusive table lock is put on the table, preventing any table access by
users. And during rebuilding a nonclustered index a shared table lock is put on the table, preventing all but SELECT operations to be performed on it
OR
Defragmenting an index by using the DBCC INDEXDEFRAG statement
================================================== ============
It does not hold locks (or only for very shot time) [i.e. online operation], but takes longer time - works little by little. It is not suggested to use for
very fragmented indexes
Hope it helps ...|||Thanks for the info. So basically running both index defrag and dbreindex is redundant because they perform the same function. I will disable my dbreindex job.
Thanks|||http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/ss2kidbp.mspx
Remember these are deprecated in 2005. It is also not correct to say that they perform the same function - they perform similar functions.
HTH|||http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/ss2kidbp.mspx
Remember these are deprecated in 2005. It is also not correct to say that they perform the same function - they perform similar functions.
HTHWow Pootie...thanks! I read this just in time for it to help me solve the sqlservercentral Question Of The Day!!!
Question: You are writing a new stored procedure to perform maintenance on your SQL Server 2005 databases that defragments the indexes in an online manner. What command should you use?
Correct Answer: ALTER INDEX with the REORGANIZE option
You Answered: ALTER INDEX with the REORGANIZE option
Total Participants: 466
Total Correct Answers: 196 or 42.1% of participants
Explanation:
You should use the ALTER INDEX with the REORGANIZE option because the DBCC commands have been deprecated.|||Wow - you are in the top 42.1% of respondants. Congratulations :beer:|||Hi dsmbwoy,
DBCC DBREINDEX and DBCC INDEXDEFRAG are not one and the same. DBREINDEX sorts the both internal and external fragmantation, whereas INDEXDEFRAG only assists with internal fragmentation. You might want to take a look at the following link, which explains the differences: http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/ss2kidbp.mspx?pf=true