SQL Server 2012 :: Task Manager Has Been Blocked From Index Re-org

Apr 6, 2015

This is running on sql server 2012, we have seup the databases on Availability group. The strange behavior i have been seeing the past few weeks is task manager has been blocked from index Re-org but have not found that what that task manager doing.. it won't shows the statement that running but shows as command type= 'Task manager'. Index is so big and i have been stopping this because of triple thread blocking.

View 9 Replies


ADVERTISEMENT

SQL 2012 :: Task Manager SPID Blocked System

Sep 1, 2015

We had this issue yesterday, for like an hour. Suddenly, our website started to get slow and get timeout errors. After executing sp_who2 and sp_whoisactive, we found a system process blocking many other processes. Of course, it was impossible for us to kill it.

Under "Status" it said TASK MANAGER, "Login" sa, from sp_who2.
Under "sql_text" it was NULL, "program_name" empty, "open_tran_count" changed like this: 2,3,4,3,4,2,1 until it finished, and "database_name" changed from our database to master at the end, from sp_whoisactive.

Our CPU usage and memory at that moment were almost the same as any other day.

We don't do backups or execute jobs at that particular time. We don't even use "sa" account.

What could have happened? In the event viewer we've found nothing, nor in SQL server logs.

Once it finished everything was back to normal, we want to prevent this from happening again.

View 1 Replies View Related

DB Engine :: Index Operation Getting Blocked

Sep 17, 2015

Since couple of days, I am getting a very weird problem on my production environment. Basically, any index operation [rebuild, drop] etc. against an index on a table is getting blocked by [Sleeping,Dormant] connections.

Scenario: I have a Table TableX in database DBX on Server X. This table has a Non-unique, non-clustered index on a NVARCHAR column. This table is accessed by SQL written in a store procedures from Server A via a link server. Both the Servers are SQL 2008 R2 edition.

If I try to run any operation on the index, it get blocked by existing session and keeps on getting blocked by different sessions. Yesterday it was blocked for about 13 hours before I killed the session.

Executing sp_WhoisActive shows few sessions with Host Server A without any sql_text. These sessions actually blocked the indesx operation on the ServerX. These sessions always exist. Sessions details are

Status= Sleeping/Dormant
Open_Tran_Count=1
Host=ServerA
Read/Writes=NULL
CPU=NULL
WaitInfo=NULL

I am not sure how to find the sql causing this issue.

View 4 Replies View Related

Map Server SPID To PID In Task Manager

Aug 21, 2013

I'm trying to map the SPID of a certain process to the PID under the processes tab in task manager. I can map the PID to the KPID through the sysprocesses table but this KPID does not appear in task manager under the PID's under the processes tab. How can this be done?

View 8 Replies View Related

SQL 2012 :: Script To Find Out Blocked Sessions And Send Email Whenever It Finds Blocking

Feb 20, 2014

I want to implement a script which will run continuously to find out blocked sessions and send an email when ever it finds the blocking.

View 5 Replies View Related

SQL 2012 :: Full Text Index How To Make It NOT To Index Embedded Or Attached Documents

Sep 30, 2015

I am using Full Text Index to index emails stored in BLOB column in a table. Index process parses stored emails, and, if there is one or more files attached to the email these documents get indexed too. In result when I'm querying the full text index for a word or phrase I am getting reference to the email containing the word of phrase if interest if the word was used in the email body OR if it was used in any document attached to the email.

How to distinguish in a Full Text query that the result came from an embedded document rather than from "main" document? Or if that's not possible how to disable indexing of embedded documents?

My goal is either to give a user an option if he or she wants to search emails (email bodies only) OR emails AND documents attached to them, or at least clearly indicate in the returned result the real source where the word or phrase has been found.

View 0 Replies View Related

SQL Server 2012 :: 42% Of 100% Taken In Clustered Index Insert

Dec 1, 2014

I have a query which is primarily a victim of blocking and a blocker itself for other queries. I studied the plan for this and it shows a 42% cost on CI insert operation. The insert is happening on a table (Table A) that has a PK. This PK is not a running number. It is also a business key (primary key) in another master table (Table B).

My understanding is that the cost is heavy because -

1, this PK is not an incremental number. It could be any number not in a sequence.
2. while inserting into CI, there must be a scan happening to find out the location where the index will be inserted.

How can I reduce the cost?

1. Should I go for partitioning of this table Table A? I am trying to do this but I am not able to find any suitable partition key looking at the JOINS and filter clauses where this table is being used in the applicaiton.
2. Should I introduce a surrogate key (running number) as a primary key so that CI is faster ?

View 9 Replies View Related

SQL Server 2012 :: Unique Index On Table

Mar 20, 2015

I am trying to create a unique index on a table such that the combination of 2 columns is unique. How do I go about that?

View 5 Replies View Related

SQL 2012 :: Clustered Index Key Order In NC Index

Mar 5, 2015

I have a clustered index that consists of 3 int columns in this order: DateKey, LocationKey, ItemKey (there are many other columns in this data warehouse table such as quantities, prices, etc.).

Now I want to add a non-clustered index on just one of the other columns, say LocationKey, like this:
CREATE INDEX IX_test on TableName (LocationKey)

I understand that the clustered index keys will also be added as key columns to any NC indexes. So, in this case the NC index will also get the other two columns from the clustered index added as key columns. But, in what order will they be added?

Will the resulting index keys on this new NC index effectively be:

LocationKey, DateKey, ItemKey
OR
LocationKey, ItemKey, DateKey

Do the clustering keys get added to a NC index in the same order as they are defined in the clustered index?

View 1 Replies View Related

SQL Server 2012 :: Search For Maximum Value Of A Specified Index On Dataset

Oct 16, 2014

I have a dataset that I need to search for a maximum value of a specified index.

Example of dataset:

Heat Index Heat # Frame Window
1 584 110 110
1 584 102 109
1 584 95 106
1 584 190 112
2 586 100 100
2 586 150 120
2 586 170 130
2 586 112 126

I need to find the maximum value of Frame for each heat and the maximum value of Window for each heat. As you can see each heat has several data points.

Is there a way I can send the dataset to a function? I could then use a loop to test for the maximum of Frame and the maximum of Window for each heat.

Could I use an array?

View 3 Replies View Related

SQL Server 2012 :: Using Function In Create Index Statement

Jun 10, 2015

Can we use a sql function() in create index as below is giving error , what would be work around if cannt use the function in below scenario

CREATE NONCLUSTERED INDEX [X_ADDRESS_ADDR1_UPPER] ON [dbo].[ADDRESS]
(
UPPER([ADDR_LINE_1]) ASC
)
WITH (SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF) ON [PRIMARY]
GO

View 3 Replies View Related

SQL Server 2012 :: Clustered Index For Materialized View?

Aug 8, 2015

I have a view that joins a dozen tables with a million rows added per year by an application. I want to materialize it. The view is always filtered by date first on reports, then there are a few key transaction keys, but then many other fields required to make each row unique. I don't want to add these columns since they are large, many, not used for sorting or filtering, and may not define uniqueness in a future application design. I need a uniqueifier that is application agnostic. I prefer a bigint. So to store the materialized view ideally for reporting, I want to add the following clustered index to materialize the view:

CREATE unique CLUSTERED INDEX idx1
ON [dbo].[myview](myDate, key1, key2, key3, id bigint identity(1,1) NOT NULL)

And I get this error:

Msg 102, Level 15, State 1, Line 3
Incorrect syntax near 'bigint'.

Can I do what I want? If so, how?

View 1 Replies View Related

SQL Server 2012 :: Index View Won't Work With Hierarchical Tables?

Apr 4, 2015

Consider following code:

SELECT e1.EntityIdentity as CompanyID
FROM dbo.Entitye1 --company
JOIN dbo.EntityAssociationea
ON e1.EntityID = ea.EntityID1
JOIN dbo.Entitye2 --user
ON ea.EntityID2 = e2.EntityID

This query occurs as a sub-query in many stored procedures where exists a WHERE clause that includes CompanyID IN (above query).

Since dbo.Entity and dbo.EntityAssociation change infrequently I thought that an indexed view would really improve performance. But I've found one of the seemingly undocumented Microsoft features when trying to create the clustered index and get the following error msg:

Msg 1947, Level 16, State 1, Line 1
Cannot create index on view "ROICore.dbo.vEntityEntityAssociation_CompanyUser". The view contains a self join on "ROICore.dbo.Entity".

I really need to improve performance on this subquery. Entity currently has over 20m rows and EntityAssociation over 35m rows and both are growing.

How to improve performance? Indexes on both tables for the most part give index seeks, but I thought my saviour might be the index view. Obviously this will not work.

View 3 Replies View Related

SQL Server 2012 :: Non-Clustered Column Store Index On Table

Jun 18, 2015

I have created NONCLUSTERED index on table but my report is taking more time that's why i created columnstore NONCLUSTERED index on the same table but i have one query, if any table have row and column level index(same columns in index) . Which index query will consider.

View 1 Replies View Related

SQL Server 2012 :: How To Generate Index Creation Scripts (many Indexes)

Jun 24, 2015

Script they use to generate indexes in SQL 2005.

I have 2 databases on a separate instance. I want to script out all indexes from database1 then execute it on database2.

How to accomplish this task efficiently.

View 5 Replies View Related

SQL Server 2012 :: Best Way To Handle Like Percentage On Column Too Large For Index

Sep 18, 2015

We have a table to 100M rows and up until now we were fine with an non clustered index a varchar(4000) because we never went above 900 bytes (yes it is a bad design).We have the need to support international character sets now so the column was updated to nvarchar(4000) and now we have data past the 900 byte limit.

The data is long, seems useless but is needed by the business and they need to be able to search "where bigcolumn like 'test%'". With an index, even with a huge amount of data, it was 'fast'. Now of course without an index it is unusable. The wildcard is always at the end of the search. I made a full text index on the column and basic queries such as: select * from ourtable where contains(bigcolumn, 'AReallyLongStringofTextHere') works fine unless there is a space in the data. We loose thousands of returned rows because of spaces in the data.

I have tried select * from ourtable where contains(bigcolumn, '"AReallyLongStringofTextHere that includes spaces"') but not all of the data is returned. I get 112 rows with the contains statement. The table scanning statement of "select * from ourtable where bigcolumn like 'AReallyLongStringofTextHere that includes spaces%' returns 1939 rows.I understand that a full text index is breaking the long string up since it contains spaces. Is there a way to retain the entire string as 1 index entry or is there a way to fix my query to return all of the rows?

View 9 Replies View Related

Full-Text Index In Enterprise Manager

Oct 13, 2005

I've been trying to create a full-text index using Enterprise Manager. If I right-click on the table, "Full-Text Index Table" is grayed-out. If I right-click on Full-Text Catalogs, "New Full-Text Catalog" is grayed-out. If I try to start the Full-Text Indexing Wizard it tells me that the "Full-Text Server service needs to be running." The SQL database is on a remote server, and the host assures me that everything on their end is working properly. Does anybody know what I have to do??

View 1 Replies View Related

SQL Server 2012 :: Dynamically Map Metadata In A Data Flow Task

Oct 1, 2014

I am tasked with truncating and reloading tables from one server to another. Company policy prevents cross-server queries, but allows SSIS packages with cross-server connections. I am doing this for about 25 tables. I have the table names in a single table & I have created an FEL to execute tasks against each table one-by-one. It works fine to truncate all the tables. I run into issues, though, with the DataFlowTask. I'm able to tell it which server & table to dynamically connect from and to, but it doesn't know how to map the metadata. They're the exact same columns and field names in both source & destination.

View 9 Replies View Related

SQL Server 2012 :: Make Excel Visible In Script Task

Oct 1, 2014

I am wondering if I can show the Excel window when the SQL server agent job runs. The SSIS package contains a script task that opens Excel and does some formatting. I just need to monitor the formatting of these Excel files.

View 2 Replies View Related

Port Blocked Causes Server To Not Start

Apr 2, 2015

I have changed SQL Server from default port to another port number. All appears fine. If SQL Server is restarted it is all fine, however, when the server is restarted SQL Server fails to start. If you then log into the server and manually start the services they start just fine. So, it appears that something blocks the port or uses the port upon server startup for a few seconds. The AV folks say that they are not blocking ports and that it AV service actually starts 15 seconds after the SQL start failure.So, the question becomes is how can I track down what is blocking or using that port?

This is Win2012/SQL2014 CU3

Server failed to listen on xxxxx::xxxxxxxxxx <ipv6> xxxxx. Error: 0x2741. To proceed, notify your system administrator.

Server failed to listen on fe80::5efe:10.255.196.25%18 <ipv6> 14001. Error: 0x2741. To proceed, notify your system administrator.

TDSSNIClient initialization failed with error 0x2741, status code 0x1. Reason: Initialization failed with an infrastructure error. Check for previous errors. The requested address is not valid in its context.

Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log. SQL Server could not spawn FRunCommunicationsManager thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.

View 4 Replies View Related

Blocked Process - Sql Server 2005

Jan 30, 2008



I have a question about blocked processes. My manager wants to know how you can know the following when a blocked process is encountered.

The job, program and the statement that is causing the blocking. I have figured out how to determine the database involved but not a lot else. Such as in the blocked process report there is a waitresource field. How to you decipher it?
The report also tells you the client application, but in this case it just states the Micro focus Net Express as the client, not the job or program that is running.

I have an inputbuf listed but it just shows the database id, and the object id. And I am not sure how to locate the object id in this case, I am guessing sys.objects, but I do not seem to find that one.

I have read many things on MSN about the blocked process report, but it does not seem to go into great detail.

I seem to have all the pieces, but do not exactly know how to quickly tie them all together.

Any help would be appreciated.

Thanks,
Kathy

View 5 Replies View Related

SQL Server 2012 :: SSIS - Stop DataFlow Task If Result Set Is Empty?

Oct 7, 2014

I am trying to create a SSIS package that will create a csv of a dataset for daily events in the database. However there will be days that there was no activity and thus an empty dataset. The package still runs fine but I want to stop the package if the dataset is empty.

FLOW:

DATA FLOW task: get daily data and put in CSV file

FTP TASK: upload the file to FTP server

MAIL/Copy file task: Move the file and then send a confirmation mail on task completion status.

Pretty simple and it all works great, I do have a few complexities in there. What I would like to add and I am at a loss is at the beginning, if the OLE DB Task resultset is empty then move to Mail Task otherwise process normally. I have tried conditional split, derived columns, the only thing I haven't tried in Script task and am not sure about that yet.

View 4 Replies View Related

SQL Server 2014 :: Can't Find Data Flow Task In SSDT 2012

Nov 5, 2015

I Can't find the Data Flow Task in SSDT 2012.

Has it been replaced by another task or do I need to do something to make it visible?

Edit: It popped up under my favorite tasks.

[URL]

View 2 Replies View Related

Workaround To Connect To SQL Server When Ports Blocked?

Jan 11, 2006

My SQL Server is a shared account at MaximumASP.com a client just deployed my .NET application on GoDaddy.com and they have all there ports blocked and my app cannot connect to the SQL Server. Using "Network Library =dbmssocn" in the connection string did not help and GoDaddy will not help.  MY QUESTION IS: how can I get my .NET app to connect to the SQL Server? web service? This is the first time I have run into this problem. There seems like there has to be some way. THANKS IN ADVANCE!

View 2 Replies View Related

Sql Server 2000 Upgrade To 2005 Blocked

Mar 4, 2008

I've inherited 6 sql server 2000 boxes. I've upgrade 3 with no trouble. now I have one that gives the message :
"your upgrade is blocked because of cross-language compatibility rules.
For more information about cross-language support, see the version..."

all servers are 2003, sp2. All SQL is Enterprise edition, default language is "english". even the collation order is
the same. why the cross language message? Any help would be good else I'll be forced to rebuild the DB and load application again. ugly!!




dave

View 3 Replies View Related

Task Manager Memory?

Jul 8, 2004

I have a SQL Server 2000/E with 8 GB RAM in the machine.

It is configured to use fixed memory size, at 7GB, and all the appropriate OS switches are set to use that.

Everything had been working fine, but we've been having some production problems and while looking into it, I looked at task manager and while the server performance tab shows that the server is using 7+ GB, the processes tab shows sqlservr.exe at 107,724 K.

Do you think this is a real issue, and that the server might only be using 100 mb of ram? Does anyone have any larger servers like this that they could compare?

Thanks

View 3 Replies View Related

Memory Usage In Task Manager

Feb 10, 2004

Hallo,

I am a newbie on SQL server and my problem is this:

My SQL server runs with many client queries and after a while I can observe that the meory usage of the SQL server shown in the Windows Task Manager is growing up (e.g. 260 MB !!!).

I checked the online books and found the settings "min/max server memory" which I set to

min = 4 MB
max = 20 MB

by Enterprise manager.

Then I restarted my SQL server, checked the memory settings again by Enterprise manager and started many client queries. The memory usage in Task Manager nevertheless exeeded the 20 MB.

What is my failure? How can I limit the memory usage of SQL server?

Thank you very much for any help...

View 1 Replies View Related

FTP Task: Connection Manager Can Not Be Found

Oct 22, 2007

When I try to create an SSIS package with an FTP task, it always fails to compile with the messages:

Error at Package: The connection "" is not found. This error is thrown by Connections collection when the specific connection element is not found.
Error at FTP Task [FTP Task]: Connection manager "" can not be found.
Error at FTP Task: There were errors during task validation.
(Microsoft.DataTransformationServices.VsIntegration)

The item is marked with a circled-X. The tool-tip also agrees: The connection "" is not found.

Using my recreation steps below, I am setting up a connection manager, but it is never found at compile time.


1. Open BIDS, select a new Integration Services project.
2. Drag an FTP task from the toolbox to the Control Flow window.
3. Double-click the FTP task.
4. On the FTP Task Editor window, General page, pull down the FTPConnection property.
5. Select <New Connection...>
6. On the FTP Connection Manager Editor window, enter the servername, port, username and password.
7. Click "Test Connection" to verify connectivity. (It succeeds.)
8. Click OK on the FTP Connection Manager Editor window.
9. Click OK on the FTP Task Editor window.


I'm not using a configuration file or logging provider for this example.
I have also installed SP2 + cumulative update 2.

View 2 Replies View Related

SQL Server 2008 :: Unable To Start Agent Due To Blocked Access

Jun 28, 2015

Had some big problems with my SQL Server 2008 R2 SP1 during the last maintenance running on Windows Server 2008 R2 Enterprise ( upgraded from Standard). I'm getting the following error,

"SQL Server blocked access to procedure 'dbo.sp_sqlagent_has_server_access' of component 'Agent XPs' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'Agent XPs' by using sp_configure. For more information about enabling 'Agent XPs', see "Surface Area Configuration" in SQL Server Books Online."

I did a google search and found others with the problem but the resolution isn't working for me. I ran the following commands, heck I ran them multiple times. No errors come back running these commands. But the same error keeps happening, I even restart the service and then the server again.

sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'Agent XPs', 1;
GO
RECONFIGURE
GO

The msdb got too big for the disk it was on. I had maintenance plans to clear out the all of histories but I didn't think of the mail items. When I finally saw this problem I tried clearing them out using the stored procedures only with it finally failing because the transaction log got full. Since we didn't have a lot of jobs scheduled I decided to just recreate the msdb. So I scheduled a maintenance window, download SQL Server Service Pack 3.

my steps are as follows:
->diff backup of msdb
->stopped the service and started it again with: NET START MSSQLSERVER /T3608
->detached msdb with: SQLCMD -E -SP-SRVR-SQL-01 -dmaster -Q"EXEC sp_detach_db msdb"
->moved it off the drive
->restarted the service without any startup flags
->recreated msdb with: SQLCMD -E -SP-SRVR-SQL-01 -i"D:Microsoft SQL ->ServerMSSQL10_50.MSSQLSERVERMSSQLInstallinstmsdb.sql" -o"D:Microsoft SQL ServerMSSQL10_50.MSSQLSERVERMSSQLInstallinstmsdb62715.out"

I looked at the log file and there were no actual error messages so I applied service pack 3 and restarted server after it installed, was actually prompted to restart. In my tests I was never prompted to restart the server.Now I never started the agent service after recreating the msdb database since I knew it wasn't on the same version. I just went directly to the latest SP. Our applications are running fine but now I cant do scheduled backups.

View 1 Replies View Related

SQL Server 2012 :: Failing On Update With Unique Index Error (Not Unique)

Jul 5, 2015

This index is not unique

ix_report_history_creative_id

Msg 2601, Level 14, State 1, Procedure DFP_report_load, Line 161
Cannot insert duplicate key row in object 'dbo.DFP_Reports_History' with unique index 'ix_report_history_creative_id'.

The duplicate key value is (40736326382, 1, 2015-07-03, 67618862, 355324).
Msg 3621, Level 0, State 0, Procedure DFP_report_load, Line 161

The statement has been terminated.

Exception in Task: Cannot insert duplicate key row in object 'dbo.DFP_Reports_History' with unique index 'ix_report_history_creative_id'. The duplicate key value is (40736326382, 1, 2015-07-03, 67618862, 355324).

The statement has been terminated.

View 6 Replies View Related

Windows Task Manager - Sqlservr.exe Mem Usage

Sep 12, 2007

Hello everyone,

I have my minimum server memory in SQL set to 4GB, but in my Windows Task Manager, sqlservr.exe only has about 100MB.

Does anyone have any idea why task manager doesn't show the full amount?

Thanks in advance.

Jarret

View 3 Replies View Related

Rebuild Index Task - Online Only?

Jun 19, 2008

Hi all,

In SQL Server 2005 EE I created a maintenance plan to rebuild indexes for a few large tables. I have selected five specific tables, and I'm using both "sort results in tempdb" as well as "keep index online while reindexing".

If I execute this plan for all these tables, are the indexes guaranteed to remain online? There are all different types of indexes on these tables. For example, the table "Contacts" has 8 indexes: 1 Clustered, 1 PK Unique Non-Clustered, 2 Unique Non-Clustered, and 4 Non-Unique Non-Clustered. I've heard that only certain types of indexes can remain online during a reindex (Clustered and Non-Unique Non-Clustered??).

Will SQL Server rebuild an index that isn't compatible with the online reindex mode, or will it choose to ignore it?

Thanks,

- Matt

View 10 Replies View Related

Index Reorg Task Is Failing

Apr 15, 2008



Getting this error when running a maintenance plan step. The backup steps work fine.

" Description: Failed to acquire connection "Local server connection". Connection may not be configured correctly or you may not have the right permissions on this connection. End Error Warning: 2008-04-15 09:15:03.02 Code: 0x80019002 Source: OnPreExecute Description: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors. End Warning Error: 2008-04-15 09:15:45.02 Code: 0xC0024104 Source: Reorganize Index Task ... The package execution fa... The step failed."


The step is run under the sql service agent account.

We are at SP2 on a 64 bit machine.

Thanks.
Sam

View 5 Replies View Related







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