Quantcast
Channel: SQL Archives - SQL Authority with Pinal Dave
Viewing all 594 articles
Browse latest View live

SQL SERVER – Unable to Recycle ERRORLOG Using sp_cycle_errorlog

$
0
0

There are many DBAs who create jobs in SQL Server to recycle ERRORLOG files every midnight. They also increase the files from 6 to a bigger number so that they have data for more than 6 days.

SQL SERVER - Unable to Recycle ERRORLOG Using sp_cycle_errorlog error-log-01-800x254

Here is the blog where I wrote about sp_cycle_errorlog. SQL SERVER – Recycle Error Log – Create New Log file without a Server Restart

You can read comments on above blog and see various usage scenarios.

One of the blog reader quoted my blog and said that I am unable to recycle ERRORLOG file using sp_cycle_errorlog command. I asked to share the ERRORLOG file content while running the command. Here is what we see in ERRORLOG.

2016-09-09 08:24:37.45 spid70 Attempting to cycle error log. This is an informational message only; no user action is required.
2016-09-09 08:24:37.46 spid70 Error: 17049, Severity: 16, State: 1.
2016-09-09 08:24:37.46 spid70 Unable to cycle error log file from ‘E:\MSSQL10_50.INSTANCE1\MSSQL\Log\ERRORLOG.5’ to ‘E:\MSSQL10_50.INSTANCE1\MSSQL\Log\ERRORLOG.6’ due to OS error ‘1392(The file or directory is corrupted and unreadable.)’. A process outside of SQL Server may be preventing SQL Server from reading the files. As a result, errorlog entries may be lost and it may not be possible to view some SQL Server errorlogs. Make sure no other processes have locked the file with write-only access.”

I asked to open file in SSMS and he informed that he is getting error.

.Net SqlClient Data Provider Unicode file expected.

All of these point to corruption to the file in such a way that SQL is not able to read them correctly. Strangely, they were able to open via notepad.

SOLUTION

I have asked them to make sure that there is no corruption on the E drive. Since we were able to read the files via notepad, I told them to move “bad” file to some other location and then try.

We moved all ERRORLOG.* files to a different folder and after that recycle worked well.

Reference: Pinal Dave (http://blog.sqlauthority.com)

First appeared on SQL SERVER – Unable to Recycle ERRORLOG Using sp_cycle_errorlog


SQL SERVER – Unable to Bring SQL Online – DoSQLDataRootApplyACL : Failed to Create Directory Tree at SQLDataRoot

$
0
0

Here is one of email which I received from one of my clients where he mentioned that he was unable to bring SQL Online.

Pinal,
I need assistance in getting the failed SQL Server resource online on the node named “SQLDBN01” for the Cluster named “DBCLUSTER01 “.

I checked the event log and have all generic messages. Do you have any expert trick?

Thanks!

This was one of the shortest email which I have ever received, asking for assistance.  I have sent shortest reply.

<Reply>Please try
SQL SERVER – Steps to Generate Windows Cluster Log? </Reply>

There shared cluster log and below is the relevant section.

INFO [RES] SQL Server : [sqsrvres] Dependency expression for resource ‘SQL Network Name (LGA-DB1)’ is ‘([a15276ac-8bf2-d013-8ab5-4e09eb594606])’
ERR [RES] SQL Server : [sqsrvres] Worker Thread (C8107C10): Failed to retrieve the ftdata root registry value (hr = 2147942402, last error = 0). Full-text upgrade will be skipped.
WARN [RES] SQL Server : [sqsrvres] Worker Thread (C8107C10): DoSQLDataRootApplyACL : Failed to create directory tree at SQLDataRoot.
ERR [RES] SQL Server : [sqsrvres] SQL Cluster shared data upgrade failed with error 0 (worker retval = 3). Please contact customer support
ERR [RES] SQL Server : [sqsrvres] Failed to prepare environment for online. See previous message for detail. Please contact customer support
INFO [RES] SQL Server : [sqsrvres] SQL Server resource state is changed from ‘ClusterResourceOnlinePending’ to ‘ClusterResourceFailed’
ERR [RHS] Online for resource SQL Server failed.

Here are the warning and errors

  1. Failed to retrieve the ftdata root registry value (hr = 2147942402, last error = 0). Full-text upgrade will be skipped.
  2. DoSQLDataRootApplyACL : Failed to create directory tree at SQLDataRoot.
  3. SQL Server <SQL Server>: [sqsrvres] SQL Cluster shared data upgrade failed with error 0 (worker retval = 3). Please contact customer support

SOLUTION/WORKAROUND

I asked them to check registry values at

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.MSSQLSERVER\Setup

For SQLDataRoot and found that they had a drive M earlier, which is replaced by drive O now. In the registry there were having reference to old drive and hence the problem.

SQL SERVER - Unable to Bring SQL Online - DoSQLDataRootApplyACL : Failed to Create Directory Tree at SQLDataRoot DoSQLDataRootApplyACL-01-800x373

Once they changed the value in registry to correct location, failover worked like a charm.

If it still doesn’t work for you, generate cluster log again and you should find some more folders errors. Check for the reference in registry key and you should be able to fix it.

Reference: Pinal Dave (http://blog.sqlauthority.com)

First appeared on SQL SERVER – Unable to Bring SQL Online – DoSQLDataRootApplyACL : Failed to Create Directory Tree at SQLDataRoot

SQL SERVER – Creating Clustered ColumnStore with InMemory OLTP Tables

$
0
0

When SQL Server 2016 was released, there were a number of enhancements that were discussed around how InMemory OLTP removed which were as limitations. I personally saw some real boot to some of the capabilities coming into InMemory OLTP especially around the concept called as Operational Analytics that Microsoft calls in this release.

In Memory OLTP when it was first introduced was an awesome capability for a latch free environment and fastest inserts without locking the table. This optimistic concurrency model was useful in specific areas. The use of clustered Columnstore inside SQL Server was the ability to store data in columnar format inside SQL Server. Though these two capabilities existed, there was no mashup of these features till SQL Server 2016.

Now inside SQL Server we have the ability to use a Clustered ColumnStore Index on top of an InMemory OLTP table. A typical example of the same is shown below.

SQL SERVER - Creating Clustered ColumnStore with InMemory OLTP Tables inmemory-cci-01-800x430

Here is the script I used in the above image for your reference.

CREATE TABLE tbl_my_InMemory_CCI (  
    my_Identifier INT NOT NULL PRIMARY KEY NONCLUSTERED,  
    Account NVARCHAR (100),  
    AccountName NVARCHAR(50),  
    ProductID INT,
	Quantity INT,  
    INDEX account_Prod_CCI CLUSTERED COLUMNSTORE  
    )  
    WITH (MEMORY_OPTIMIZED = ON);  
GO

Make sure you run this on a database that has InMemory capability turned on. If you try to run it on a system database, you are likely to get an error like:

Msg 41326, Level 16, State 1, Line 1
Memory optimized tables cannot be created in system databases.

I am sure you will be aware of this, but since I learnt this – thought this was worth a share. Do let me know if you are using any of the features of InMemory or ColumnStore inside SQL Server? What is your use case for the same? Do let me know via comments.

Reference: Pinal Dave (http://blog.sqlauthority.com)

First appeared on SQL SERVER – Creating Clustered ColumnStore with InMemory OLTP Tables

SQL SERVER – Unable to Attach Database – File Activation Failure – The Log Cannot be Rebuilt

$
0
0

SQL SERVER - Unable to Attach Database - File Activation Failure - The Log Cannot be Rebuilt log-rebuilt-01 Once I was in a situation where there was a disaster faced by my client. They lost the drive which was having transaction log file. Since they did not have effective monitoring, they realized that the backup jobs were failing. So essentially they only have MDF files for user databases and they were left with option to rebuild the log. Let us learn about how file activation failure can create an interesting error.

They tried below command.

CREATE DATABASE UserDB
ON (FILENAME = 'E:\DATA\UserDB.mdf')
FOR ATTACH_REBUILD_LOG

But, this was the error received while attaching the database.

File activation failure. The physical file name “E:\LOG\UserDB_log.ldf” may be incorrect.
The log cannot be rebuilt because there were open transactions/users when the database was shutdown, no checkpoint occurred to the database, or the database was read-only. This error could occur if the transaction log file was manually deleted or lost due to a hardware or environment failure.
Msg 1813, Level 16, State 2, Line 1
Could not open new database ‘UserDB’. CREATE DATABASE is aborted.

The error is very clear and interesting. So, I thought of reproducing it

CREATE DATABASE SQLAuthority
GO
USE SQLAuthority
GO
CREATE TABLE Foo (bar INT)
GO
BEGIN TRANSACTION
INSERT INTO Foo VALUES (1)

Yes, there is no rollback transaction because I wanted to leave open transaction, as mentioned in the error message. Once done, I stopped SQL Server, renamed MDF and LDF file for the database and started the SQL Server service. As expected, the database came to “Recovery Pending” State.

Here was the cause in ERRORLOG


2016-09-29 00:31:55.86 spid21s Starting up database ‘SQLAuthority’.
2016-09-29 00:31:55.87 spid21s Error: 17204, Severity: 16, State: 1.
2016-09-29 00:31:55.87 spid21s FCB::Open failed: Could not open file C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\DATA\SQLAuthority.mdf for file number 1. OS error: 2(The system cannot find the file specified.).
2016-09-29 00:31:55.87 spid21s Error: 5120, Severity: 16, State: 101.
2016-09-29 00:31:55.87 spid21s Unable to open the physical file “C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\DATA\SQLAuthority.mdf”. Operating system error 2: “2(The system cannot find the file specified.)”.
2016-09-29 00:31:55.87 spid20s [INFO] HkHostDbCtxt::Initialize(): Database ID: [4] ‘msdb’. XTP Engine version is 0.0.
2016-09-29 00:31:55.87 spid21s Error: 17207, Severity: 16, State: 1.
2016-09-29 00:31:55.87 spid21s FileMgr::StartLogFiles: Operating system error 2(The system cannot find the file specified.) occurred while creating or opening file ‘C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\DATA\SQLAuthority_log.ldf’. Diagnose and correct the operating system error, and retry the operation.
2016-09-29 00:31:55.87 spid21s File activation failure. The physical file name “C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\DATA\SQLAuthority_log.ldf” may be incorrect.

At this point, since I wanted to reproduce client situation, I dropped the database so that I should try to attach MDF file. I renamed file to “SQLAuthority_original.mdf’”

CREATE DATABASE SQLAuthority ON (FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\DATA\SQLAuthority_original.mdf')
FOR ATTACH
CREATE DATABASE SQLAuthority ON (FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\DATA\SQLAuthority_original.mdf')
FOR ATTACH_REBUILD_LOG

Both commands failed with the same error


File activation failure. The physical file name “C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\DATA\SQLAuthority_log.ldf” may be incorrect.
The log cannot be rebuilt because there were open transactions/users when the database was shutdown, no checkpoint occurred to the database, or the database was read-only. This error could occur if the transaction log file was manually deleted or lost due to a hardware or environment failure.
Msg 1813, Level 16, State 2, Line 1
Could not open new database ‘SQLAuthority’. CREATE DATABASE is aborted.

SOLUTION/WORKAROUND

There is an undocumented option called as ATTACH_FORCE_REBUILD_LOG. Here is the command which worked in my lab.

CREATE DATABASE SQLAuthority ON (FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\DATA\SQLAuthority_original.mdf')
FOR ATTACH_FORCE_REBUILD_LOG

Here was the message:

File activation failure. The physical file name “C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\DATA\SQLAuthority_log.ldf” may be incorrect.
New log file ‘C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\DATA\SQLAuthority_log.ldf’ was created.

Restoring from backup is always a best solution and above is the last resort. Have you even been in such situation?

Reference: Pinal Dave (http://blog.sqlauthority.com)

First appeared on SQL SERVER – Unable to Attach Database – File Activation Failure – The Log Cannot be Rebuilt

SQL SERVER – Cannot Show Requested Dialog – Property Size is Not Available for Database

$
0
0

Freelancing gives me a lot of opportunity to see issues which I have not seen earlier. Learning never stops for me and I love sharing what I learn every day. Let us learn about how to fix the error Property Size is Not Available for Database.

One of my clients reported that they are seeing errors opening tempdb database properties.

SQL SERVER - Cannot Show Requested Dialog - Property Size is Not Available for Database tempdb-er-01

Property Size is not available for Database ‘[tempdb]’. This property may not exist for this object, or may not be retrievable due to insufficient access rights. (Microsoft.SqlServer.Smo)

When I searched for similar error on internet and many posts pointed about owner of the database. So, I ran below

sp_changedbowner 'sa'

But since it was tempdb database, I received below message.

Msg 15109, Level 16, State 1, Line 1
Cannot change the owner of the master, model, tempdb or distribution database.

I noticed that when I open property, it takes some time. We looked into sys.dm_exec_requests and found that wait for PAGEIOLATCH on TempDB database. We checked the event viewer and there were disk related errors for the drive contains the TempDB database.

SOLUTION/WORKAROUND

If you are getting same error, then check database ownership first. If the owner is set correctly, check the health of the database by running DBCC CHEKDB on the database. In my case, it was the storage which was holding TempDB files. Windows team confirmed that storage was having corruption and we were not able to read/write to TempDB. We stopped SQL, deleted TempDB files and started SQL Server and as expected they were recreated. Later, we moved them to new drive and replaced the bad drive. Luckily this client was having separate drive for TempDB and nothing else was impacted.

Reference: Pinal Dave (http://blog.sqlauthority.com)

First appeared on SQL SERVER – Cannot Show Requested Dialog – Property Size is Not Available for Database

SQL SERVER – Fix Error Msg 10794, Level 16 – The operation ‘CREATE INDEX’ is not supported with memory optimized tables.

$
0
0

Whenever I write something as a new concept, I do see people reading the blog do give it a try. Many a times I get queries that the script didn’t work for them after they learnt the concepts about memory optimized tables. The blog I wrote on how In Memory OLTP was supporting ColumnStore – read it: SQL SERVER – Creating Clustered ColumnStore with InMemory OLTP Tables

After reading this blog, I saw a note on my Inbox that the feature was not actually working as expected. I was surprised that he wrote back. I asked what was the error to get more details. He was getting an Error 10794. And immediately I wanted to see the complete error because offlate I have seen this the error messages from Microsoft are elaborate in general, and I was not proved wrong.

Msg 10794, Level 16, State 13, Line 15
The operation ‘CREATE INDEX’ is not supported with memory optimized tables.

Now, as soon as the message was sent, I understood what he was doing. To replicate this error, I wrote the following script for reference:

--Create the table
CREATE TABLE tbl_my_InMemory (
	my_Identifier INT PRIMARY KEY NONCLUSTERED 
        HASH WITH (BUCKET_COUNT = 100000),  
    Account NVARCHAR (100),  
    AccountName NVARCHAR(50),  
    ProductID INT,
	Quantity INT  
)WITH
(
    MEMORY_OPTIMIZED = ON, DURABILITY = SCHEMA_ONLY
);
GO
-- Create a Clustered ColumnStore Index
CREATE CLUSTERED COLUMNSTORE INDEX CCI_tbl_my_InMemory 
ON tbl_my_InMemory

SQL SERVER - Fix Error Msg 10794, Level 16 - The operation 'CREATE INDEX' is not supported with memory optimized tables. error-cci-inmemory-800x264

As you can see clearly, based on the previous blog, the Clustered ColumnStore Index was created inline. Currently in this release of SQL Server, Microsoft has not given the capability to add the Clustered ColumnStore Index after the table has been created.

I am sure at this moment, there are some restrictions of use, but there is a lot to learn from each other too. Do share anything you face when working with these features. Would love to blog them too.

Reference: Pinal Dave (http://blog.sqlauthority.com)

First appeared on SQL SERVER – Fix Error Msg 10794, Level 16 – The operation ‘CREATE INDEX’ is not supported with memory optimized tables.

SQL SERVER – Added New Node in Windows Cluster and AlwaysOn Availability Databases Stopped Working

$
0
0

Almost all the time, whenever there is a wizard, it’s a human habit to go with the defaults and finally click finish. Once of my client sent below email to me. In this blog post we are going to learn about Added New Node in Windows Cluster and AlwaysOn Availability Databases Stopped Working.

Hi Pinal,
We are trying to add new node to the AlwaysOn Availability Group and for that we must add new node to Windows cluster. Before doing this in production, we are trying to our test environment and we ran into issues. We noticed that as soon as node is added in windows, our databases which were part of an availability group went to not synchronizing state. Later I noticed that local disks were added to the cluster under “available storage”.

Have you seen this issue? What is wrong with our setup?

Thanks!

I asked for any error in event log and they shared below.

Log Name: System
Source: Microsoft-Windows-FailoverClustering
Event ID: 1069
Task Category: Resource Control Manager
Level: Error
Description: Cluster resource ‘Cluster Disk 2’ of type ‘Physical Disk’ in clustered role ‘Available Storage’ failed. The error code was ‘0x1’ (‘Incorrect function.’)

I told them that they must have followed the wizard and must have forgotten to “uncheck” the highlighted checkbox.

SQL SERVER - Added New Node in Windows Cluster and AlwaysOn Availability Databases Stopped Working add-node-disk-01-800x547

This is the default setting and has caused issues for many, including me during the demo. They also confirmed the same. What is the solution now?

SOLUTION/WORKAROUND

To work around this problem, we must remove the disk resource from Failover Cluster Manager. Once done, we need to bring these drives online in Disk Management once they are removed from Failover Cluster Manager.

Have you run into the same issue? Anywhere default setting in the wizard has caused the problem?

Reference: Pinal Dave (http://blog.sqlauthority.com)

First appeared on SQL SERVER – Added New Node in Windows Cluster and AlwaysOn Availability Databases Stopped Working

Cloud Consulting Pre-Engagement Questionnaire – A Bookmark

$
0
0

The cloud phenomenon is no more a dream for many, but a reality for several customers I have been working with. Many of my customers are looking for guidance and from time to time I get an opportunity to have some deep constructive discussions. These discussions can range from should I be going to cloud or not, is this app cloud ready, can we do a lift-shift of this application directly to some cloud player etc. Though each of these discussions lead from one point to another, there is a lot of profiling I do with customers. In this blog, I want to talk about a conversation I had with one of my customers who was evaluating cloud for one of his applications. Let us see a Cloud Consulting Pre-Engagement Questionnaire.

You should BOOKMARK this blog post for future reference.

Cloud Consulting Pre-Engagement Questionnaire - A Bookmark cloudconsulting-800x670

Though the engagement was a short call, I had more questions to ask than answers. End of the session of one hour, the customer knew he had a lot of homework to do before coming to me for details. So, what are some of the considerations one needs to be aware when planning to migrate to cloud based deployment.

Understanding User base:

  • Can you define the roles of different users in the organization?
  • What is the number of users and users per role?
  • What is the number of users in the scope of the Solution under question?
  • What is the projected growth of the user base in the next three to five years?

Understanding application functionality:

  • What current applications perform the business functions of the Solution?
  • How do the applications assist in the business processes?
  • What functions are required for the business processes?
  • What functions are required by the different user groups?
  • What is the change management process in place for the messaging environment?
  • Are there documented governance and archiving policies for the organization?

Applications Availability / Backup requirements:

  • What are the current service level agreements (SLAs)?
  • What are the high availability requirements?
  • What are the business continuity or site availability requirements?
  • What is the current recovery point objective (RPO)?
  • What is the current recovery time objective (RTO)?

Double clicked Application Architecture:

  • What is the current state application environment?
  • What is each application’s function in relation to the business processes the Solution supports?
  • What monitoring solution is being used?
  • Does the current monitoring solution support the Solution to be deployed?

Knowing the Migration and Governance needs:

  • What are the specific information requirements?
  • Are there current data transformations?
  • Are there any data sets that need cleansing?
  • What data management systems are in place?

Technology Architecture needs:

  • What is the current server administration model (centralized, decentralized, or other)?
  • Who is currently managing the current infrastructure (internal, outsourced, centralized, decentralized, helpdesk, etc.)?
  • How is administration performed (scripted, fully automated, native tools etc.)?
  • Are there additional administrative tasks for which you require delegation?
  • Are you planning to centralize or consolidate the Solution?
  • In how many locations do you plan to deploy the Solution?
  • What are the hardware needs and existing servers and components?
  • What are the attributes and interactions of the hardware in relation to the business applications?
  • What are the existing hardware components for each application layer?
  • What is the overall topology of your network?
  • Choose an appropriate diagram and delete others.
  • What is the number of geographic sites?
  • What is the user distribution by region or site?
  • Can you provide link speed, utilization, latency, and available bandwidth between central and remote sites (if applicable)?
  • Which sites provide Internet connectivity for external user access?

By this time we were to end of the call. But I said, there are security needs, network needs, Directory understanding, Authentication topology etc. were missed out. All I can say the end of this session, the IT manager was confident on what needs to be done.

Have you done such assessments for your Cloud Consulting engagements? Do you think these are relevant and will help you? What are the questions you will add to the above? I must admit, only some that come to my mind have been listed above.

Reference: Pinal Dave (http://blog.sqlauthority.com)

First appeared on Cloud Consulting Pre-Engagement Questionnaire – A Bookmark


SQL SERVER – Unable to bring resource online. Error – Data source name not found and no default driver specified

$
0
0

One of my blog readers reported a strange issue to me. As per the issue described, they were unable to bring SQL Server resource in cluster online, only on one node of the cluster. I always use for error messages, but they said that SQL resource goes to online pending state and after some time, it goes to failed state. Let us learn how to fix the error where data source name not found.

As a part of troubleshooting, I asked them to generate and share cluster log with me. Here is an earlier blog to generate cluster log. SQL SERVER – Steps to Generate Windows Cluster Log?

Here is what we saw in the cluster log.

00000fd4.000002ac::2016/10/17-14:31:38.672 INFO [RES] SQL Server : [sqsrvres] Connect to SQL Server …
00000fd4.000002ac::2016/10/17-14:31:38.672 ERR [RES] SQL Server : [sqsrvres] ODBC Error: [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0)
00000fd4.000002ac::2016/10/17-14:31:38.672 INFO [RES] SQL Server : [sqsrvres] Could not connect to SQL Server (rc -1)
00000fd4.000002ac::2016/10/17-14:31:38.672 INFO [RES] SQL Server : [sqsrvres] SQLDisconnect returns following information
00000fd4.000002ac::2016/10/17-14:31:38.672 ERR [RES] SQL Server : [sqsrvres] ODBC Error: [08003] [Microsoft][ODBC Driver Manager] Connection not open (0)
00000fd4.00001030::2016/10/17-14:31:42.010 ERR [RHS] RhsCall::DeadlockMonitor: Call ONLINERESOURCE timed out for resource ‘SQL Server’.
00000fd4.00001030::2016/10/17-14:31:42.010 ERR [RHS] Resource SQL Server handling deadlock. Cleaning current operation.

Since the ERR is taking about “[Microsoft][ODBC Driver Manager]” and error is “Data source name not found and no default driver specified”, I asked them to check ODBC drivers available on the nodes. We can do this by going to Control Panel > Administrative Tools > ODBC Data Sources (as shown below)

SQL SERVER - Unable to bring resource online. Error - Data source name not found and no default driver specified ds-01

Here is what we saw on non-working node.

SQL SERVER - Unable to bring resource online. Error - Data source name not found and no default driver specified ds-02

And we see below on working node.

SQL SERVER - Unable to bring resource online. Error - Data source name not found and no default driver specified ds-03

We can see that SQL Server Native Client 11.0 is missing and may be that’s the reason is gives error about the driver.

SOLUTION / WORKAORUND

We downloaded “sqlncli.msi” from Microsoft SQL Server 2012 Feature Pack page and installed it on bad node. This MSI installed the software which was missing under the ODBC Admin tool. As soon as that is installed, failover worked fine.

Have you ever used cluster log for such troubleshooting?

Reference: Pinal Dave (http://blog.sqlauthority.com)

First appeared on SQL SERVER – Unable to bring resource online. Error – Data source name not found and no default driver specified

SQL SERVER – Analysis Services and the Network Performance

$
0
0

SQL Server Analysis Services (SSAS) is becoming increasingly popular as an OLAP platform for business analysts. There are many tools available for enhancing the analysts’ ability to process data and get meaningful insights. These vary from direct queries in Excel to custom applications. For example, using PowerPivot to extend Microsoft Analysis Services directly into an Excel Workbook, you can then use Excel to build and explore an OLAP model using pivot tables and other techniques. One thing you can generally be sure of is that this will result in processing very large sets across the network.

There are two primary areas where SSAS will generate a lot of network activity:

  1. When loading the warehouse, SSAS will communicate with MS SQL Server OLTP databases to bring up to date information in the OLAP database (SSAS Server).
  2. Like the PowerPivot Excel example, business analysts will connect to the SSAS Server to run their analyses and reports.

One example is a company that collects consumer data and makes it available for analysis of trends and buying patterns so that retailers can make decisions on products, product characteristics, prices, and timeframes for selling the products. This scenario takes transactional data such as customer purchases, product inventory, etc. from each store and then this data is moved and transformed into an OLAP (SSAS) Server. Now it is available for business analysts using tools like Excel connected via PowerPivot to analyze the data. The figure below depicts this scenario:

SQL SERVER - Analysis Services and the Network Performance ssasnetwork

In the case of SQL Server OLTP databases, they use the Tabular Data Stream (TDS) protocol to transfer the data from SQL Server to the SSAS Server. SSAS uses XML for Analysis (XMLA) over either TCP or HTTP for accessing the instance. This is a listener service that uses port 2383 as its default port.

In the scenario above, with the large amounts of data being moved across geographically dispersed locations, it can take a significant amount of time to 1) get the SSAS OLAP Server loaded, and 2) access the OLAP data from the SSAS clients. The last thing you want is a highly paid PhD-level business analyst losing productivity waiting for data to download. Of course, even if the analysts and all the databases, both OLTP and OLAP, are co-located, you may still suffer from network congestion with large data volumes.

Some companies address this performance issue by building data marts – which are effectively smaller data warehouses where data may be either categorized or re-summarized to reduce the data set. This is in effect a data warehouse on the analyst’s desktop. At this point, the primary performance constraint may be processor speed and memory on the analyst’s machine.

Another option is to try to reduce the network traffic between the OLTP-SSAS servers and between the SSAS Server and Clients. NitroAccelerator from Nitrosphere can accomplish this by, in the first case, optimizing the TDS protocol with compression and other techniques to speed the loading of the OLAP/SSAS server. In the second case, NitroAccelerator now supports the XMLA listener and optimizes the TCP/HTTP traffic between the SSAS Server and SSAS Clients. The example above is with a real life customer where they located their OLAP server in the cloud. They got two benefits from NitroAccelerator: 1) They significantly reduced data charges for downloading from the cloud-based OLAP server, and 2) They improved performance on the client side by 90%!

With increasing use of SSAS in conjunction with use of cloud-based databases (OLTP and OLAP) you will want to consider the network costs as well as performance when it comes to moving large amounts of data for data warehouse needs.

For more information on Nitrosphere and/or to try NitroAccelerator, please visit http://nitrosphere.com/trial/

If you have a performance problem, you can always hire me.

Reference: Pinal Dave (http://blog.SQLAuthority.com)

First appeared on SQL SERVER – Analysis Services and the Network Performance

SQL SERVER – Unable to Bring Resource Online – Error – Could Not Find Any IP Address that this SQL Server Instance Depends Upon

$
0
0

When it rains, it pours. In the last few days last few contacts from my customers were for cluster related issues. Once again, SQL Server resource was not coming online in failover cluster manager. I asked them to check if ERRORLOG is being generated and if yes, share the content. SQL SERVER – Where is ERRORLOG? Various Ways to Find ERRORLOG Location. Let us learn how to fix Unable to Bring Resource Online.

Here are the messaged reported in ERRORLOG.

2016-10-27 08:27:09.71 spid10s Error: 26054, Severity: 16, State: 1.
2016-10-27 08:27:09.71 spid10s Could not find any IP address that this SQL Server instance depends upon. Make sure that the cluster service is running, that the dependency relationship between SQL Server and Network Name resources is correct, and that the IP addresses on which this SQL Server instance depends are available. Error code: 0x103.
2016-10-27 06:28:11.72 spid10s Error: 17182, Severity: 16, State: 1.
2016-10-27 06:28:11.72 spid10s TDSSNIClient initialization failed with error 0x103, status code 0xa. Reason: Unable to initialize the TCP/IP listener. No more data is available.
2016-10-27 06:28:11.72 spid10s Error: 17182, Severity: 16, State: 1.
2016-10-27 06:28:11.72 spid10s TDSSNIClient initialization failed with error 0x103, status code 0x1. Reason: Initialization failed with an infrastructure error. Check for previous errors. No more data is available.
2016-10-27 06:28:11.73 spid10s Error: 17826, Severity: 18, State: 3.
2016-10-27 06:28:11.73 spid10s 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.
2016-10-27 06:28:11.74 spid10s Error: 17120, Severity: 16, State: 1.
2016-10-27 06:28:11.74 spid10s SQL Server could not spawn FRunCommunicationsManager thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.

I asked them the change which they made in this cluster and the informed that they changed virtual server name of SQL Server.

SOLUTION/WORKAROUND

Since resources were recreated and dependencies were not set properly. Here is the dependency tree.

  • SQL Server > Depends on All Disks and Network Name.
  • Network Name > Depends on IP Address.
  • IP Address > Depends on None.
  • Disks > Depends on None. If there are mount points, then they would have dependency on disk.
  • SQL Server Agent > Depends on SQL Server.

The easiest way to see dependency is by using inbuilt tools of the Cluster Manager as shown below.

SQL SERVER - Unable to Bring Resource Online - Error - Could Not Find Any IP Address that this SQL Server Instance Depends Upon Dependency-800x400

Once dependencies were corrected, SQL Server was able to come online.

Have you faced a similar error with some other solution?

Reference: Pinal Dave (http://blog.sqlauthority.com)

First appeared on SQL SERVER – Unable to Bring Resource Online – Error – Could Not Find Any IP Address that this SQL Server Instance Depends Upon

SQL SERVER – SQLPASS 2016 – Feedback and Rating – Kick Start! SQL Server 2016 Performance Tips and Tricks

$
0
0

Earlier this year, I presented at SQLPASS 2016, Seattle on SQL Server 2016 and I am very happy to see the feedback of my sessions. I have presented two sessions and I will write feedback of one session in this blog post and another one later this week. my session was about SQL Server 2016 Performance Tips and Tricks.

Session Title:

Kick Start! SQL Server 2016 Performance Tips and Tricks

Session Abstract:

Every new release of SQL Server brings a whole load of new features that an administrator can add to their arsenal of efficiency. SQL Server 2014 / 2016 has introduced many new features. In this 75 minute session we will be learning quite a few of the new features of SQL Server 2014 / 2016. Here is the glimpse of the features we will cover in this session.

  • Live plans for long running queries
  • Transaction durability and its impact on queries
  • New cardinality estimate for optimal performance
  • In-memory OLTP optimization of superior query performance
  • Columnstore indexes and performance tuning
  • Query Store

This 75 minutes will be the most productive time for any DBA and Developer, who wants to quickly jump start with SQL Server 2016 and its new features.

SQL SERVER - SQLPASS 2016 - Feedback and Rating - Kick Start! SQL Server 2016 Performance Tips and Tricks sqlpass2016_2-800x600

Session Feedback:

All feedback is on the scale of 3 (where 3 is Excellent)

Attendee ratings: (416 attendees, 57 responses)

Overall session – Did the title, abstract, and session level align to what was presented? 2.93 (out of 3)
Session content – Was the content useful and relevant? 2.93 (out of 3)
Presentation – Was the speaker articulate, prepared, and knowledgeable on the subject matter? 2.96 (out of 3)
Promotions – Was the session free from blatant sales material or self-promotion such as blogs, company, or services? 2.98 (out of 3)

SQL SERVER - SQLPASS 2016 - Feedback and Rating - Kick Start! SQL Server 2016 Performance Tips and Tricks sqlpass2016-feedback-800x321

Individual Comments:

  • Loved it.
  • One of the best speakers
  • Full of energy and fun! Thank you!
  • Pinal was a perfect post-lunch presenter. So much energy!!!
  • Great speaker. Not only was Pinal informative, but he is enjoyable to watch.
  • Energy passion humor and good content
  • In 20 years of Sql Server classes and presentations, user groups and summits this is the best session I have ever seen. Pinal is a hilarious, engaging, passionate genius!
  • Glad I attended! Pinal’s humor and the use of practical examples made this a well spent time.
  • The ABSOLUTE BEST session!!! I am so glad I attended. Really wish he’d taught ALL my other sessions.
  • Very good and entertaining
  • This was my first session with Pinal. Very lively entertaining presentation. I plan to look into in-memory oltp in conjunction with columnstore indexes
  • “Pinal, did a great job at keeping the audience awake and engaged”
  • Good session
  • Engaging and dynamic
  • Very little useful information. A colorful speaker but session was of very limiting value. Less comedy more content.
  • The timing was short it felt rushed. I think you need a longer time slot to present.
  • Got to attend the last 30 minutes. I enjoyed Pinal’s presentation (as usual) and on the fly troubleshooting query plan. Full house as expected!
  • Stellar presentation-will attend all of his presentations in future.
  • Very good speaker and keeps the audience entertained while providing useful information
  • Funny and able to capture audience attention by engaging discussion throughout the session. I expected to get more information from the session, though, this may be due to time constraints
  • Amazing speaker and he gives so much back to community. Thanks Pinal for amazing session
  • Great presentation and good examples. Good information to take back and use for upgrade and even checking current system. Also realized after that Pinal Dave is responsible for helping me learn TSQL with the joes 2 pros books. Thank you
  • Awesome, great info.
  • Pinal was fantastic! Best session today for sure. I learned and had fun at the same time. Thanks for taking selfies with all of us!!! Peace brother!
  • Very enthusiastic speaker
  • Perfect session and Speaker did perfect job. I really like it!!!
  • Been reading Pinal’s blog for a long time. Seeing him present was a great experience. Pinal is one of the best speakers I have ever listened to. thanks
  • Great Session!
  • Pinal’s session was perfect for after lunch. His humorous, engaging presentation style kept things lively as he delivered relevant content.
  • Educational and entertaining
  • I liked Pinal Dave a lot. I thought he was funny and I really appreciate his concise answers that I find in web searches. I thought this session was too short on substance in that I think only 2 tip topics were presented.
  • Pinal has fantastic energy. Does great interacting and involving the audience.
  • This was by far the best session i attended at the conference. I have been following Dave Pinal’s blog for sometime and I was very happy to be able to meet him in person and attend this session. He explained things very clearly
  • He was funny, the best presenter
  • One of the best speaker and session. I think in my 10 years career, this is one of the best session ever. I will attend SQLPASS just for Pinal
  • By far one of the most engaging and most prepared speakers. Great interaction with the audience and topic was fantastic. When you consider this was on the last day of the conf and the room was a standing room only
  • Best speaker ever
  • excellent presentation
  • The session was a hit. I know that a lot of English-as-a-first-language speakers/organizers/attendees have a peeve against speakers with foreign accents, but Pinal’s session proves all of them wrong. I am happy that Pinal has been selected to speak
  • Speaker is very interactive and good.
  • So far the best session I have attended in Summit 2016, it was a laughter riot along with the technical flow; speaker know the topic well and understand the audience level the content and demo was so relevant and people enjoyed it really, some (about 20)
  • :-) The session was fast paced and super cool. I laughed so much in the session, Pinal Dave is super funny.
  • Top notch. Equally entertaining and informative … of course …it’s Pinal!
  • A very enjoyable session for Friday afternoon
  • Need a larger room for Pinal!
  • Room was way too hot and should have been a bigger room given the speaker was Pinal Dave.
  • room was a bit small
  • There was a creaking sound on the stage that was a little distracting
  • late arrivals created tight standing area. seat mixed in were free but you’d have to disrupt a row to get a seat.
  • It was great he had a big room. It got packed!!! And everyone was engaged and participated
  • Room was full fir this session
  • The room could have been bigger. Pinal draws a crowd.
  • Probably need a bigger room for this one. Came late and left early because I couldn’t find a seat
  • He may need a bigger room next year.
  • Everything in the room was fine. The screens were clear and Dave spoke nice and clear and I could hear him perfectly.
  • For him might consider larger rooms.
  • Everything was perfect. Except that the engineer has to know a little more about switching to full screen. It is not the presenter’s laptop problem, rather the switch that has to be put on for the slides to show up in full screen.
  • Wow, I wish that room size would have some more space so that all people could have fitted.
  • Perfect accommodations.

I have not published comments which just say “Good”, “Great” or “Amazing”. There were many single worded positive comments.

SQL SERVER - SQLPASS 2016 - Feedback and Rating - Kick Start! SQL Server 2016 Performance Tips and Tricks session1-800x600

My Opinion:

I am extremely happy with the feedback of users. I truly appreciate it that people thought I was informative and funny. It is a huge compliment for me as I spent hours and hours in building this presentation and planning how I will keep audience awake/engaged after lunch on the last day of the event. Lots of people told me afterwards that they were not able to get into the room as it was already standing room in a few minutes of the session started. I hope to find a way to make this presentation available for everyone who missed it.

Reference: Pinal Dave (http://blog.sqlauthority.com)

First appeared on SQL SERVER – SQLPASS 2016 – Feedback and Rating – Kick Start! SQL Server 2016 Performance Tips and Tricks

SQL SERVER – Back to Basics – What is Azure?

$
0
0

Recently I was at a community session talking to a bunch of computer science students about databases and the type of work I have been doing lately in consulting. I wanted to talk about Performance tuning and why it is critical to understand the basics. Some of the fundamental concepts I have learnt in my college days are still helping me solve some of the complex problems I do at consulting. With that in mind, I started my talk about some of the recent assignments and how I have been troubleshooting performance for both SQL Server on a VM and even SQL Server as a service on Azure. It was about 10 mins into the talk that I realized something was totally wrong, I could see blank faces just like when a professor teaches a complex topic. I have been there and could see the reaction. I said I need a glass of water and paused. I asked one of the students to what was going on – He said, “You mentioned the word ‘Azure’ close to 4-5 times now in the past 3 minutes. Can you tell us what Azure is? Is this a new Database in the industry?”

SQL SERVER - Back to Basics - What is Azure? windows-azure-cloud-800x289

This was the moment of “Ah ha” for me. I told the group, before we can start talking about performance of SQL Server in Azure, we need to have a base understanding of what a cloud service, Azure, is and what it is not. So, the next 15 mins of my lecture were around that. I have brought a snapshot of it here so that I can use the same in future too.

Azure services are made up of networks, drives, servers, etc. all hosted by Microsoft to provide scalable, on-demand services. This architecture comes with many positive attributes, but there are trade-offs when compared to an on premise solution.

Azure has an advantage in cost, deployment time, reduction in administrative and management overhead and Azure can be used to easily scale up or down depending on the needed workload. However, as stated, the underlying infrastructure is hosted. As an administrator, you do not have the same level of control over the individual components and there is less opportunity for deeper performance tuning operations as there are four on premise servers. Azure hardware is commodity hardware meant for scaling out and handling many applications.

Due to these differences, performance tuning requires a slightly different approach. Some of the direct query tuning will be like a standard on-prem SQL Server install, but other aspects such as tuning IO is significantly different as the configuration of disks, HBAs, caching is all taken care of by Azure. Performance in Azure needs to be viewed from more architectural and design view to leverage the best aspects of Azure (cost, low maintenance) while continuing to have great performance with your solution.

Later, as the session expanded, I explained how the world has been moving from Packaged Software to IaaS (Infrastructure as a Service) to PaaS (Platform as a Service) to SaaS (Software as a Service). When I finished explaining these terms and taxonomies, it became clear to what the students wanted. They needed practical knowledge on what the industry trends are and what they need to be aware.

Reference: Pinal Dave (http://blog.sqlauthority.com)

First appeared on SQL SERVER – Back to Basics – What is Azure?

SQL SERVER – Database Mirroring Error -The Specified Network Name is No Longer Available

$
0
0

Have you ever seen a situation where SQL Server mirroring is impacted because of external factors? One of my customers reported several of the following errors in the SQL Server ERRORLOG SQL SERVER – Where is ERRORLOG? Various Ways to Find ERRORLOG Location. Let us learn about how to fix database mirroring error.

SQL SERVER - Database Mirroring Error -The Specified Network Name is No Longer Available fixmirroringerror

2016-11-10 07:05:27.90 Server Error: 1474, Severity: 16, State: 1.
2016-11-10 07:05:27.90 Server Database mirroring connection error 4 ’64(The specified network name is no longer available.)’ for ‘TCP://SQL1.sqlauthority.com:5022’.
2016-11-10 07:05:29.37 spid27s Error: 1474, Severity: 16, State: 1.
2016-11-10 07:05:29.37 spid27s Database mirroring connection error 4 ‘An error occurred while receiving data: ‘121(The semaphore timeout period has expired.)’.’ for ‘TCP://SQL2.sqlauthority.com:5022’.

As we can see above 1474 is a generic error. That can have many different OS errors. In above errors, it has come due to

  1. OS Error 64 = The specified network name is no longer available.
  2. OS Error 121 =The semaphore timeout period has expired.

Sometimes we can see error number, but not the message. Here is what you can do: I use net helpmsg command and pass the error number.

SQL SERVER - Database Mirroring Error -The Specified Network Name is No Longer Available dbm-err-01

As a DBA, we need to look at more data to see and check if we can figure out what’s going on with the machine.  In this customer’s scenario.

I reviewed Upon reviewing the System event log many networking warnings are being reported:

11/10/2016 07:05:27 AM Warning 27 e1rexpress HP Ethernet 1Gb 2-port 361T Adapter #3 Network link is disconnected.
11/10/2016 07:03:34 AM Warning 461 CPQTeamMP Team ID: 0 Aggregation ID: 1 Team Member ID: 0 PROBLEM: 802.3ad link aggregation (LACP) has failed. ACTION: Ensure all ports are connected to LACP-aware devices.
11/10/2016 07:03:10 AM Warning 27 e1rexpress HP Ethernet 1Gb 2-port 361T Adapter #3 Network link is disconnected.
11/10/2016 07:03:11 AM Warning 27 e1rexpress HP Ethernet 1Gb 2-port 361T Adapter #2 Network link is disconnected.

Above are at the same time when SQL is reporting errors. Error in the system event logs is indicating that there is something going on with the network cards which needs to be addressed. I informed my client that I am not familiar with this error but I am sure your hardware folks would be able to tell us what this is and how to fix it, if it is a problem.

When we contacted the hardware team for this customer they informed that NIC card drivers are very old and not compatible. As soon as NIC card drivers were upgraded, issues were resolved. Let me know if you have faced any similar error about – database mirroring error.

Reference: Pinal Dave (http://blog.sqlauthority.com)

First appeared on SQL SERVER – Database Mirroring Error -The Specified Network Name is No Longer Available

SQL SERVER – Rule “Windows Management Instrumentation (WMI) Service” failed

$
0
0

SQL SERVER - Rule "Windows Management Instrumentation (WMI) Service" failed wmi256 When I visit my client site for doing performance tuning consulting, I sometimes get trapped with some unrelated issue. Here is one of the situation where they were upgrading from SQL 2008 R2 to SQL 2014 on a two node cluster. During upgrade two rules were failing. In this blog post we will learn about how to fix when rule “Windows Management Instrumentation (WMI) Service” fails.

Failing Rule 1

Rule “Windows Management Instrumentation (WMI) service” failed.
The WMI service is not running on the cluster node.

Failing Rule 2

Rule “Not clustered or the cluster service is up and online.” failed.
The machine is clustered, but the cluster is not online or cannot be accessed from one of its nodes. To continue determine why the cluster is not online and rerun setup instead of rerunning the rule since the rule can no longer detect a cluster environment correctly.

As per MSDN documentation, I found Detail.txt file and here was the stack when error occurred

(06) 2016-11-19 19:59:09 Slp: Error while retrieving the cluster WMI namespace on machine NODE03; Error is as follows System.Management.ManagementException: Invalid class
at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
at System.Management.ManagementObject.Initialize(Boolean getObject)
at System.Management.ManagementBaseObject.get_Properties()
at System.Management.ManagementBaseObject.GetPropertyValue(String propertyName)
at Microsoft.SqlServer.Configuration.WMIInterop.Cluster.get_Name()
at Microsoft.SqlServer.Configuration.Cluster.Rules.WMIServiceFacet.ClusterWmiCheck()

I tried following test for WMI based on my internet search:

  • Start > Run > WBEMTest
  • The “Windows Management Instrumentation Tester” will launch
  • Select Connect
  • Namespace: Root\MSCluster
  • Select Connect

If we see more options available, it means you are connected and WMI is working. In my case, I received below error

Number: 0x80041010
Facility: WMI
Description: Invalid Class

WORKAROUND/SOLUTION

Since there was invalid class for cluster this means that cluster namespace missing in WMI. So, we need to compile the .mof file for cluster. Here is the magical command which fixed all above errors.

Mofcomp.exe ClusWMI.mof

Once above command had run it added the namespace back.

Did you see same error and found different solution? Please share with other readers.

Reference: Pinal Dave (http://blog.sqlauthority.com)

First appeared on SQL SERVER – Rule “Windows Management Instrumentation (WMI) Service” failed


SQL SERVER – Error – Disallowing page allocations for database ‘DB’ due to insufficient memory in the resource pool

$
0
0

Keeping SQL Server up-to-date is something I recommend my customers from time to time. One of the tasks I undertake is to check the current SQL Server version information as soon as I get started to work. Though this recommendation looks trivial at the first look, this is often something people don’t take it seriously. Almost in every environment that I have done this exercise, I see them being behind on the Service pack updates majority of the times. Let us learn in this blog post how to fix the error- Disallowing page allocations for database ‘DB’ due to insufficient memory in the resource pool.

I am currently running the latest version of SQL Server 2016 and I installed the SP1. In the recent past, I have seen the following message on my error logs. I have been ignoring this, but thought to investigate the same. The output is:

Message: Disallowing page allocations for database ‘AdventureWorks2016’ due to insufficient memory in the resource pool ‘default’. See ‘http://go.microsoft.com/fwlink/?LinkId=510837’ for more information.

A sample of how it looks inside SQL Server Error Logs is:

SQL SERVER - Error - Disallowing page allocations for database 'DB' due to insufficient memory in the resource pool insufficent-memory-01

On first look this looked like I had something wrong and I was not aware of what to do. I did exactly what the error message said. I went to MSDN for more information.

As suggested by the documentation, I went about Enabling Resource Governor and the error message disappeared. You can also enable the resource Governor capability using the SSMS UI as shown below.

SQL SERVER - Error - Disallowing page allocations for database 'DB' due to insufficient memory in the resource pool insufficent-memory-02

Do let me know if you error seen this error message on your servers? I am not quite sure why this is happening, but I am glad the solution for this is simple and well documented. Thought to share the same with you as I learnt something new recently.

Reference: Pinal Dave (http://blog.sqlauthority.com)

First appeared on SQL SERVER – Error – Disallowing page allocations for database ‘DB’ due to insufficient memory in the resource pool

SQL SERVER – Log Shipping Copy Job Failure – The Password for This Account Has Expired

$
0
0

Working as freelancer gives an opportunity to see various kinds of error and having fun to fix them. Recently, one of my blog readers sent an email and asked assistance on the log shipping issue. He said that log shipping copy job is failing.

As usual, I asked him error message and he shared below piece from copy job history.

Message
2016-09-27 17:22:23.33  *** Error: The password for this account has expired.
(mscorlib) ***
2016-09-27 17:22:24.01  *** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) ***

The error message was descriptive enough. I asked him to follow below blog and share the output. SQL SERVER – How to Find Out When Your SQL Login Will Expire?

As expected, the password was expired. I asked him to put the right password for the service account for Agent because SQL Agent is used to perform the copy operation.

Once he put the right password the issue was resolved, but as a follow-up he asked me ways to avoid this in future.

SOLUTION/WORKAROUND

  1. Put the right password for the service account for SQL Agent on secondary.
  2. Make sure below property is checked so that it is not expired next time.

SQL SERVER - Log Shipping Copy Job Failure - The Password for This Account Has Expired ls-copy-01

Have you encountered the same issue in production?

Reference: Pinal Dave (http://blog.sqlauthority.com)

First appeared on SQL SERVER – Log Shipping Copy Job Failure – The Password for This Account Has Expired

SQL SERVER – Fix Connection Error – [Microsoft][ODBC SQL Server Driver][DBNETLIB][ConnectionOpen(Connect())

$
0
0

SQL SERVER - Fix Connection Error - [Microsoft][ODBC SQL Server Driver][DBNETLIB][ConnectionOpen(Connect()) close As a part of my quick consultancy, I was contacted by a client who was having trouble where the application was not able to connect to SQL Server. We all joined the call and desktop sharing to learn more about the issue. We looked into the application and found that the SQL connection from the client application were constantly failing with the following connection error:

[Microsoft][ODBC SQL Server Driver][DBNETLIB][ConnectionOpen(Connect())

We tried below steps to narrow down the issue.

  1. SQL Server instance which we were trying to connect was a named instance, which was listening on non-default port 2433.
  2. SQL Browser was running.
  3. Ping was working fine and we could get the response.
  4. Telnet to port 2433 was working fine.
  5. If we connect using SQLMACHINE\INSTANCE_NAME then it fails.
  6. If we connect using SQLMACHINE,2433 then it works.

At this point we anticipated the UDP port is FILTERED for some reason and hence we are not able to get the instance names mapped to the port numbers.

SOLUTION / WORKAROUND

As a workaround, we went ahead and created the SQL alias for the TCP/IP protocol. Once the alias were created, we could connect to the SQL server successfully using SQLMACHINE\INSTANCE_NAME.

The ideal solution was to make sure the firewall is configured correctly as mentioned in books online Configure the Windows Firewall to Allow SQL Server Access

There could be many other issues of client connectivity and it all depends on error message. Have you encountered a similar error? If yes, what was the solution in your case?

Reference: Pinal Dave (http://blog.sqlauthority.com)

First appeared on SQL SERVER – Fix Connection Error – [Microsoft][ODBC SQL Server Driver][DBNETLIB][ConnectionOpen(Connect())

SQL SERVER – FIX Error – Cluster Network Name showing NETBIOS status as “The system cannot find the file specified”

$
0
0

Over a period, I have learned that fixing an issue is easier if we know which log we should look at and what we should search on google.  Here is the situation which I was into few days back. In this blog post we will learn how to fix the error Cluster Network Name showing NETBIOS status as “The system cannot find the file specified”.

I was at client site for performance tuning exercise and they asked me if I know Windows Clustering. Of course, I can’t call myself as an expert but I at least know whatever is needed for AlwaysOn availability groups. So, I asked them the issue. They told that they are seeing Cluster Network Name in failed state as below.

SQL SERVER - FIX Error - Cluster Network Name showing NETBIOS status as "The system cannot find the file specified" cluster-core-01

We tried to move the cluster group between the nodes and tried bringing CNO online but it failed. In the CNO parameters we see the NETBIOS status as “The system cannot find the file specified”. So, I asked them to capture cluster logs.

SQL SERVER – Steps to Generate Windows Cluster Log?

Here is the snippet from the error log.

548020 000022c8.00004208::2016/10/08-10:38:29.991 ERR [RES] Network Name: Agent: InitializeModule, Trying to initialize Module(fb729fe4-79ea-4a0d-857e-411636879e67,Identity) when there is one already in Initialized/Idle state
548064 000022c8.00000368::2016/10/08-10:38:29.991 ERR [RES] Network Name: [NNLIB] Unable to add server name WindowsCluster to transport \Device\NetBt_If1, status 2
548083 000022c8.000038b8::2016/10/08-10:38:29.991 ERR [RES] Network Name : Online thread Failed: ERROR_SUCCESS(0)’ because of ‘Initializing netname configuration for Cluster Name failed with error 2.’
548088 000022c8.000038b8::2016/10/08-10:38:29.991 ERR [RHS] Online for resource Cluster Name failed.
548102 00001cac.00002f94::2016/10/08-10:38:29.991 ERR [RCM] rcm::RcmResource::HandleFailure: (Cluster Name)

As seen above, status 2 indicates: The system cannot find the file specified”. My search for “NetBt” was pointing to issue with “NetBIOS over TCPIP” setting. When I verified the network adapters, I noticed under WINS section NETBIOS over TCP/IP has been disabled.

WORKAROUND/SOLUTION

Here is the screen where I changed the settings.

SQL SERVER - FIX Error - Cluster Network Name showing NETBIOS status as "The system cannot find the file specified" cluster-core-02

We have changed it to default and issue was resolved and we were able to bring the resource online.

Have you found any solution using cluster log?

Reference: Pinal Dave (http://blog.sqlauthority.com)

First appeared on SQL SERVER – FIX Error – Cluster Network Name showing NETBIOS status as “The system cannot find the file specified”

SQL SERVER – Errors When Disk Space is the Reason

$
0
0

In the past, I have written a number of blogs when it comes to working with errors pertinent to disk space running out. In this blog, I try to consolidate the common messages you are going to see in the Error logs when the database engine is not able to get the space that it needs from the disk subsystem. One of the common scenario’s where these are seen is while recovery operation (when SQL is restarted).

SQL SERVER - Errors When Disk Space is the Reason diskspaceissue-800x321

During recovery, the SQL Server Database Engine might require additional disk space for data files. When an operation lacks sufficient disk space, the Database Engine issues an 1101 or 1105 errors (depending on whether it is unable to allocate space for an extent or an object, respectively). If the disk fills while the database is online, the database remains online, but the data cannot be inserted. If the disk fills during recovery, the Database Engine marks the database as “resource pending.” In either case, user action is required to make disk space available.

Typical errors reported are listed here:

Error 1101:

Could not allocate a new page for database ‘%.*ls’ because of insufficient disk space in filegroup ‘%.*ls’. Create the necessary space by dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.

Error 1105:

Could not allocate space for object ‘%.*ls’%.*ls in database ‘%.*ls’ because the ‘%.*ls’ filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.

Error 9002:

The transaction log for database ‘%.*ls’ is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases

One of the following actions might make space available to the filegroup:

  • Free disk space on the full disk.
  • Move data files to another disk.
  • Add files on a different disk.
  • Enable autogrow or check if fixed size has been set.
  • If using SQL Express Edition, check if it exceeds the database size limits.

I am sure you have seen some of these, do let me know if I missed a scenario from the above list.

Reference: Pinal Dave (http://blog.sqlauthority.com)

First appeared on SQL SERVER – Errors When Disk Space is the Reason

Viewing all 594 articles
Browse latest View live