Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Administration - SQL Server 2014 » Latest topics
Viewing all 6525 articles
Browse latest View live

sp_send_dbmail - Error when passing @query parameter.

$
0
0
Hi All,When I send mail using "sp_send_dbmail" it works fine.But it fails when I set "@query" paramerter, fails with below error."Failed to initialize sqlcmd library with error number -2147024809.Can someone please help on this ?.Thanks in advance.San.

Strange insert time

$
0
0
Hi, folksI have to migrate our company SQL server to Germany. I have new SQL server 2014 installed in Germany and I started to transfer databases and applications. I noticed strange behaviour....I have same database on local SQL and also remote SQL in GE.Login at local SQL and command run from local SQL[b]Insert into DE SQL server – read from local server - tooks 00:01:54[/b]INSERT INTO [DENU00CL0042].ADCList.[dbo].[Company_TEST]SELECT * FROM [dbo].[Company][b]Insert into local SQL server – read from DE SQL server - tooks 00:00:01[/b]INSERT INTO [Company2_TEST]SELECT * FROM [DENU00CL0042].ADCList.[dbo].[Company_TEST]Login at GE SQL, command run from GE SQL:[b]Insert into local SQL server – read from DE SQL server - tooks 00:02:00[/b]INSERT INTO [SKBA1S1846].ADCList.[dbo].[Company_TEST]SELECT * FROM [dbo].[Company][b]Insert into DE SQL server – read from local SQL server - tooks 00:00:01[/b]INSERT INTO [Company2_TEST]SELECT * FROM [SKBA1S1846].ADCList.[dbo].[Company_TEST]In another words PUSH the data and write to other SQL server is more than 150x slower than let the other server PULL the data and write it down. Why? Is any possibility to solve this situation? I also found, that PUSH makes lot of small packets (300) in the WAN network, but PULL is using network packet size of 4096.Many thanxRobert

How to understand this deadlock

$
0
0
Hi please find attached.Procedure:[code="sql"]CREATE PROCEDURE [dbo].[RSDocument_Store] -- Add the parameters for the stored procedure here @ID int = 0, @DocumentType int, @EntityID int, @VersionNumber int=1, @DocumentGUID uniqueidentifier=null, @BorrowerDocumentGUID uniqueidentifier=null, @LenderDocumentGUID uniqueidentifier=null, @BinaryLength bigint, @BinaryData varbinary(max)ASBEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; if @ID=0 BEGIN DELETE [dbo].[RSDocuments] WHERE DocumentType=@DocumentType AND EntityID=@EntityID AND DocumentType <> 5 AND DocumentType <> 130 AND DocumentType <> 170 INSERT [dbo].[RSDocuments](DocumentType,EntityID,VersionNumber,DocumentGUID,BorrowerDocumentGUID, LenderDocumentGUID,BinaryLength,BinaryData) VALUES (@DocumentType,@EntityID,@VersionNumber,@DocumentGUID,@BorrowerDocumentGUID, @LenderDocumentGUID,@BinaryLength,@BinaryData) SELECT @ID = @@IDENTITY END ELSE BEGIN UPDATE [dbo].[RSDocuments] SET DocumentType=@DocumentType, EntityID=@EntityID, VersionNumber=@VersionNumber, DocumentGUID=@DocumentGUID, BorrowerDocumentGUID=@BorrowerDocumentGUID, LenderDocumentGUID=@LenderDocumentGUID, BinaryLength=@BinaryLength, BinaryData=@BinaryData WHERE ID=@ID END SELECT * FROM [dbo].[RSDocuments] WHERE ID=@IDEND[/code]

Number of CPU cores used by SQL Server

$
0
0
Hi, In one of our customer, they have SQL Server licensing based on CPU cores. I was wondering how I can check how many CPU cores have been utilized by SQL Server?Thanks,

Performance tuning on Production systems ??

$
0
0
Hi All,Sorry to ask this question in this forum. Its more kind of general and not a technical question.Can anyone tell me what are the drawbacks of using Production Server as a Testing Server. Recently, I got into an uncomfortable conversation with my manager who is a not so technical but he wanted me to do performance testing of slow running SQL Agent jobs which client was asking for a long time. I just joined this team a week before and this is my 1st task assigned to me!!They are blunt and wanted me to work on the same.I explained to some extent that doesn't work and if any changes made to the code and re-running/creating indexes/updating stats/turning on trace flags/running traces, will lead to adverse performance of ongoing/running workload. Still they insist me to do that. I just kept quite and came out of that discussion room.I need some inputs/specific usecase's of what can go wrong if we use a PROD server for testing purposes. How can I convince these management guys that what I am supposed to do is wrong and in a polite way.Not sure how to convey the BIG NO NO message here.. Can anyone help me with some specific use case so that I can convince my management and get a testing environment.Thanks.

Invalid object name 'sysarticles' and Availability Groups

$
0
0
I have a Availibility Groups set up between two SQL 2014 boxes, the primary is used for PROD and the secondary is used for Read Only purposes.. I am attempting to ALTER a table on the primary and add a column to it, but when I run the ALTER TABLE command, I get the following error:Msg 208, Level 16, State 1, Procedure sysextendedarticlesview, Line 870Invalid object name 'sysarticles'.Googling the error it speaks that I would need to break replication and add the column. The problem with that is, we are not running replication, we are running Availibility groups and to the best of my knowledge schema changes should flow thru to the secondary just like any data changes would.Is that a correct assumption? What can I do to get past this error?Thank you in advance for any help and information!!!

SQL Server Crashed

$
0
0
Hi All,I am trying to find out the root cause for SQL Server crash. A timeout (30000 milliseconds) was reached while waiting for a transaction response from the MSSQLSERVER service.The SQL Server (MSSQLSERVER) service terminated unexpectedly. It has done this 5 time(s).AutoRestart: Unable to restart the MSSQLSERVER service (reason: An instance of the service is already running)This file is generated by Microsoft SQL Server version 12.0.4213.0 upon detection of fatal unexpected error. Please return this file, the query or program that produced the bugcheck, the database and the error log, and any other pertinent information with a Service Request. Computer type is Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz. Bios Version is Xen - 0 Revision: 1.221 32 X64 level 8664, 10 Mhz processor (s). Windows NT 6.2 Build 9200 CSD . Memory MemoryLoad = 94% Total Physical = 249999 MB Available Physical = 14127 MB Total Page File = 267338 MB Available Page File = 28793 MB Total Virtual = 134217727 MB Available Virtual = 133598094 MB ***Stack Dump being sent to D:\tempdataroot\MSSQL12.MSSQLSERVER\MSSQL\LOG\SQLDump0039.txt SqlDumpExceptionHandler: Process 159 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process. * ******************************************************************************* * * BEGIN STACK DUMP: * 07/29/16 16:21:52 spid 159 * * * Exception Address = 000000007A93E615 Module(cwbodbc+000000000005E615) * Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION * Access Violation occurred reading address 000000006029E2CA * Input Buffer 48 bytes - * _GetTransfers * This dump is generated frequently. The SP name changes. We have a linked server which gets the data from AS400 using cwbodbc(IBM iSeries) driver. This is a primary node of AG setup. After primary node failed the automatic failover kicked in but dint succeed. Following errors were reported. The lease between availability group 'P1AG' and the Windows Server Failover Cluster has expired. A connectivity issue occurred between the instance of SQL Server and the Windows Server Failover Cluster. To determine whether the availability group is failing over correctly, check the corresponding availability group resource in the Windows Server Failover ClusterAlwaysOn Availability Groups connection with secondary database terminated for primary database 'a' on the availability replica 'P2' with Replica ID: {}. This is an informational message only. No user action is required. The availability group database "a" is changing roles from "PRIMARY" to "RESOLVING" because the mirroring session or availability group failed over due to role synchronization. This is an informational message only. No user action is required.Unable to access availability database 'a' because the database replica is not in the PRIMARY or SECONDARY role. Connections to an availability database is permitted only when the database replica is in the PRIMARY or SECONDARY role. Try the operation again later.Please help me troubleshoot this.

What algorithm do you use to determine low space?

$
0
0
I want to create an alert on low space for SQL Server. My instances vary a lot between number of drives, numbers of data files on each drive etc. Some of my drives are full 99% with only SQL Server data files on there, but they are only 60% full. Some other drives have 60% free space, but the data files are nearly full.I initially thought of creating an alert for if Disk Space Used > 80% AND SUM(% free space in data files) > 80% then fire an alert. However this approach does not take into account large drive sizes (we have some greater than 4TB) and the autogrowth amounts for each database. To complicate things further, some databases have more than one data file on multiple disks.How have you solved space monitoring alerts?

Log file Growth

$
0
0
Hi Experts,Have observed that the log file is growing huge because of Index Rebuild operation? Can anyone help me understand why?TIA

massive i/o bottleneck

$
0
0
We’re using Microsoft SQL Server 2014 - 12.0.4213.0 (X64) Jun 9 2015 12:06:16 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: )We have a few processes that process massive amounts of data daily. When they run the Queue length on the data drive fills and we end up w/ several other processes waiting for i/o. It’s so bad that when it's happening you can’t even expand the database in sql server management studio. Has anyone else ran into this issue? My plan was to either break the primary offenders database mdf file to multiple drives or give him his own drive and break out all the other db's onto different sets of drives. Would setting up buffer extensions help?Anyone have any ideas? Right now the CPU is staying level between 5 and 20 percent for the most part.

Shiny new server - split temp db files question

$
0
0
Hi,We have a brand new server. As part of that server we now have the power/space to split out our Tempdb from one file to 12. Question:After I split out the tempdb files (12 x 10G files) what happens if there is a transaction that goes over my 10G limit for that tempdb file? Does it automatically use one of the other available tempdb files?

SQL 2014 SSIS Proxy account issues

$
0
0
Hi,I am having real trouble trying to get an SSIS package trying to run via a SQL Agent Job in SQL Server 2014.I have set up a new credential and proxy account as per all our SQL2008 R2 servers (which have all worked perfectly), but the job refuses to run in 2014 and just gives the error:Executed as user: DOMAIN\Proxy_account. The process could not be created for step 1 of job <job number> (reason: A required privilege is not held by the client). The step failed.I have tried changing every permission, even making the proxy account a Server Admin and a SQL Admin, but nothing will work. I have tried changing the Integration Services service account (instead of the NT Service\MsDtsServer120 account) to run as the same account as the SQL Agent service account, I've tried it running as the Network Service accunt and also the Local Service Account, but it still gives the same error.I have searched for this error extensively and tried everything I've found that is suggested, but still no luck.However, the job runs fine if it is run as the SQL Agent Service Account. It also runs fine if just executed via the "Execute Package Utility".Has anyone else encountered the same issue on Windows Server 2012 R2 with SQL Server 2014? I am experiencing it on all servers of the same architecture, so it's not specific to this one server.Any help greatly appreciated.

SQL Server 2014/Server 2008 R2 Installation Question

$
0
0
All,From my research on TechNet and MSDN I have found that SQL Server 2014 can be installed on an SMB share. This installation would support system and user databases being located on the SMB share. What I have a question on is whether SMB 2.1 will support this installation.My current problem is that I have a SQL 2014 instance installed on a Server 2008 R2 machine with system and user databases being hosted on an SMB share. The share is located on a Server 2008 R2 machine. At least once a week the application that uses this database instance becomes inoperable due to lost connectivity with the database. A restart of the SQL instance service on the host machine brings everything back up and online, but it is becoming an inconvenience to have to verify every morning that the application is still up and running. We are looking into a scheduled task to restart the service when a certain event ID is logged on the system, but we would like to figure out the root cause of this issue. I am not a DBA but am responsible for ensuring the application stays up and running. I have enough SQL experience to be dangerous. Any help is appreciated and if you require more information please let me know.

Alerts in SQL server

$
0
0
I usually created alerts using native alerts 011-025 when I setup a new SQL server, what other alerts do you usually create for your SQL servers as DBA?Thanks,

SQL Server was hung, need to find root cause

$
0
0
Hello All,Yesterday one of our SQL Server was hung and not able to RDP and connect SQL remotely, Windows team notified us TCP connections were full in resource monitor and CPU was high but was changing not constantly at 100%.what we have done was to cancel the commvault backup running and then we were able to RDP and Application jobs went fineIn the error logs we noticed only I/O taking longer than 15 seconds SQL Server has encountered 4084 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file ... The OS file handle is 0x00000000000012F8. The offset of the latest long I/O is: 0x000018c04a0000.Recently we had storage migration from HP to XtremeIO.Also we use 118GB for Max memory of SQL Server out of 128GB and during the issue we observed that Memory usage was 97% used and generally we have 96% used always. FYI .. this is VM Server.Suggest us how the TCP connections in resource monitor and SQL Server are related and also whether there is any problem from storage side and how to clearly say that it is storage problem.++ adding the events observed in eventvwrObserved below events in eventvwr till the issue was resolved, after that there were no below occurrences observed, was there anything that Windows/VM team could have done to stop this. Please help on this.The IO operation at logical block address 0x520de7e0 for Disk 31 was retried.

Need More Beta Participants!

$
0
0
Hey guys!We are looking for active beta participants to try out our new SaaS-Based Database Monitoring Tool. Our tool will monitor your databases and their underlying (virtual) infrastructure. If you would like to be a part of the beta, sign up here: http://www.bluemedora.com/early-access/We will initially be supporting RDS, MSSQL, Oracle, PostgreSQL, Mongo, DynamoDB and MySQL (and MariaDB). And then we will add support to SQL Azure, DB2, Aurora, etc. as the beta progresses.If you have any questions, feel free to post and I will be happy to answer them.

Error Locating Server/Instance Specified, SQL Server 2014/Windows 10

$
0
0
SQL Server 2014 on Windows 2012R2 server. Our application connects to SQL Server without any problem on several Windows 7 computers, but gets the above error on a new Windows 10 machine.No firewall or anti-virus running on client.Using a named instance, SQL Browser is running.Used Portqry and got the following results:Server's response:ServerName SQL_SERVERInstanceName DTSQLSERVERIsClustered NoVersion 12.0.4100.1tcp 49782np \\SQL_SERVER\pip\MSSQL$DTSQLSERVER\sql\queryUDP port 1434 is LISTENINGTried to establish a connection to the instance from the client using ODBCAD32. Failed with same error message. When setting up in ODBCAD32, you can see the instance and select it as the Server, but the test fails.Any ideas on where I go from here?Isaac

upgrading sql 2012 to sql 2014 on 2 node active/passive cluster best practices

$
0
0
Question is it best practice to let new upgraded node run in PROD for couple days then once there are no errors we can upgrade the other node and failover to it? Or is it better to upgrade both nodes and then let PROD users back on? Appreciate the help.

Upgrading 2008 Enterprise to 2012 Standard

$
0
0
Hi All - As the title suggests. We're currently running 2008 Enterprise and need to upgrade to 2012 Standard (which we've already obtained a license for). Since the upgrade path is unsupported, what is the cleanest and most efficient way to do the upgrade?Just install an new instance of 2012 and use the Import/Export wizard to move the databases/tables from the 2008 instance to the new 2012 instance?Are there any risks with this?ANY help is appreciated!

Execute package in SSISDB catalog with UNC path

$
0
0
We recently start using the SSIS project deploy mode which utilize SSISCatalog database SSISDB.I found there is an issue if we run a package in SSISDB by right click the package in SSISDB Catalog,if the package has a connection that uses a UNC path or shared directory on network, it will fail with access denied. I am running the package using my account and I have all permissions to the path.Later I understand this is a double hop issue, not very sure what caused that, but it seems the solution is to create SPN and allow kerobos authentication, then it should work when executing in SSISDB.My question is when setting up SPN, what SPNs needed to be added in order for above to work.I know it is definitely need creating for SQL service account, but for this case it is running under my account, so how SPN can be related with my account?I am not the person who is going to create SPN, it will be passed to our network manager.But I am trying to understand this.An earlier posted question related with this is here:http://www.sqlservercentral.com/Forums/Topic1794324-3411-1.aspx
Viewing all 6525 articles
Browse latest View live