Showing posts with label SQLServer 2008. Show all posts
Showing posts with label SQLServer 2008. Show all posts

Friday, September 14, 2018

Exception: Length of LOB data (96550) to be replicated exceeds configured maximum 65536.

We got below exception recently as Lengh of LOB data to be replicated increased the configured limit 65536

Exception Thrown In InboundMessageProcessor ProcessExternalXML Method with [Error]: Internal Xml Parser Failed. Aborting Database Transaction. Current XML Node <FIInvocationSynchronousEvent>, Depth 1.

[InternalXMLParser Error]: Failed to execute business component method. Assembly: FlexNet.SVL.BusinessFacade.Utility, Version=1.0.0.0, Culture=neutral, PublicKeyToken=33f692327842122b, Class: FlexNet.SVL.BusinessFacade.Utility.TableAction, MethodName: TableUpdate, Exception: Length of LOB data (96550) to be replicated exceeds configured maximum 65536. Use the stored procedure sp_configure to increase the configured maximum value for max text repl size option, which defaults to 65536. A configured value of -1 indicates no limit, other that the limit imposed by the data type.
The statement has been terminated.

Run below command to find the falue

select * from sys.configurations
where name like 'max text repl size%';
GO

You can configure the ‘max text repl size’ to unlimited by using below command
EXEC sp_configure 'max text repl size', -1 ;
RECONFIGURE;
GO

You should be able to see updated value now.
select * from sys.configurations
where name like 'max text repl size%';
GO


I see few users complained that’s this setting lost, you can use ‘OVERRIDE’ option.
EXEC sys.sp_configure N'max text repl size (B)', N'-1'
GO
RECONFIGURE WITH OVERRIDE
GO

Regards
Satishbabu Gunukula
http://sqlserver-expert.com

Tuesday, May 1, 2018

How to determine SQLServer Edition

There are many ways you can find the SQLServer edition and version

Please find few methods

1. Connect to SQLServer Instance and run below command
Select @@version

2. Use a SQL Script
Refer link https://gallery.technet.microsoft.com/Determining-which-version-af0f16f6

3. Using Power Shell
Refer link
https://gallery.technet.microsoft.com/Determining-the-version-of-62136c05

4. Open SQL Server Configuration Manager
  • Highlight SQLServer Services 
  •  Go to Properties à Advanced 
  •  Brose to “Stock keeping unit name” and “Version” 
Thanks
Satishbabu Gunukula

Monday, March 5, 2018

java.sql.SQLException: Length of LOB data () to be replicated exceeds configured maximum 65536


We recently come across below database error when working with an application.

java.sql.SQLException: Length of LOB data (65594) to be replicated exceeds configured maximum 65536. Use the stored procedure sp_configure to increase the configured maximum value for max text repl size option, which defaults to 65536.

The maximum value for max text repl size defaults to 65536. We get this error when a truncation data size for any of the replicated text column exceeds the limit.

To check the current max text replication size run below command.

USE <DB Name>;
GO
EXEC sp_configure 'show advanced options', 1 ;
RECONFIGURE ;
GO
EXEC sp_configure 'max text repl size';
GO



Output:-
name                              minimum           maximum    config_value      run_value
max text repl size (B)     -1                      2147483647    65536                   65536

You can set the value to maximum by running below command.
EXEC sp_configure 'show advanced options', 1 ;
RECONFIGURE ;
GO
EXEC sp_configure 'max text repl size', -1 ;
GO
RECONFIGURE;
GO


Note that -1 indicates that there is no limit set for 'max text repl size' other than imposed by the data type.

You can do the same using SSMS
  1. Open SSMS and connect to Server/instance
  2. Right-click on the server/instance name and choose properties
  3. Select “Advanced” options on the properties page.
  4. Under  “Miscellaneous” header  you will see the current value of  
    “Max text replication Size”.
  5. Change the default value from 65536 to -1 or 2147483647 (depending on the SQLserver) and press OK.
 Regards
Satishbabu Gunukula

Wednesday, January 10, 2018

Cluster network name resource failed to create its associated computer object in domain

Users might receive below error during the SQLServer failover cluster installation.

Cluster network name resource SQLINST1' failed to create its associated computer object in domain ‘test.domain.com' for the following reason: Unable to create computer account.

The text for the associated error code is: Access is denied.

Please work with your domain administrator to ensure that:
- The cluster identity 'SQLCLUSTER$' can create computer objects. By default all computer objects are created in the 'Computers' container; consult the domain administrator if this location has been changed.
- The quota for computer objects has not been reached.
- If there is an existing computer object, verify the Cluster Identity 'SQLCLUSTER$' has 'Full Control' permission to that computer object using the Active Directory Users and Computers tool.


You will receive above error because the user that you are running the installation does not have proper privileages to create computer object in the domain.

Ask your system admin either grant the permissions or create the computer object in advance. Once your System admin creates the computer object, you retry the installation and It should work successfully.

Regards
Satishbabu Gunukula
http://sqlserver-expert.com

The action 'Move' did not complete

User might see below error when trying to failover the SQLServer instance from one node to another node. User might have recently installed a SQLServer cluster which has more than 1 node.

SQL Server cluster failover fails with Error Code: 0x80071398



The main reason for this error is the node where you are trying to failover might NOT the owner.

You need to verify all nodes in the Cluster are selected as Owenrs under “SQLServer Virtual Name” properties. As you see below screen shot, 2 nodes are not not part of the cluster . Once you check the box you will be able to failover SUCCESSFULLY without any issues.





Thanks
Satishbabu Gunukula
https://sqlserver-expert.com

Friday, December 23, 2016

error while loading shared libraries: libodbc.so.1

When working with UNIXODBC to connect to Microsoft SQLServer received following error

ERROR Database connection TEST: ADBC error 'Internal error         16  has occured'

I receive below error when using isql-v to test the connection

error while loading shared libraries: libodbc.so.1: cannot open shared object file: No such file or directory

I found that soft links are missing and after creating below links everything started working

Issue resolved after creating below soft links
# ln -s /usr/lib64/libodbc.so.2.0.0 /usr/lib64/libodbc.so.1
# ln -s /usr/lib64/libodbcinst.so.2.0.0 /usr/lib64/libodbcinst.so.1

Regards.
Satishbabu Gunukula

Monday, October 17, 2016

[01000][unixODBC][Driver Manager]Can't open lib

I was testing unixODBC configuration to connect to SQLServer Database and received below error message

$ isql -v test_ds test_username test_password
[01000][unixODBC][Driver Manager]Can't open lib '/u01/boxi/app/testsrv/sap_bobj/enterprise_xi40/linux_x64/odbc/lib/CRsqls24.so' : file not found
[ISQL]ERROR: Could not SQLConnect


It looks like path does not exists, lets verify

ls: cannot access /u01/boxi/app/testsrv/sap_bobj/enterprise_xi40/linux_x64/odbc/lib/CRsqls24.so: No such file or directory

The patch does not exist, so update the correct path in odbc.ini and ran “isql –v” to test the connectivity

$ isql -v test_ds test_username test_password
[01000][unixODBC][Driver Manager]Can't open lib '/u01/boxi/app/testsrv/sap_bobj/enterprise_xi40/linux_x64/odbc/7.0.1/lib/CRsqls26.so' : file not found
[ISQL]ERROR: Could not SQLConnect


After updating correct library path, I still see same error. It looks like the environment variables might not set properly. I have verified the LD_LIBRARY_PATH and I see that path does not have right lib info.

After updating LD_LIBRARY_PATH with right library path I was able to connect successfully.

$ isql -v test_ds test_username test_password 
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> quit

Regards,
Satishbabu Gunukula


Wednesday, February 17, 2016

VIEW SERVER STATE permission was denied on object ‘server’, database ‘master’.

With one of the application I have seen below error when working with SQL Server

VIEW SERVER STATE permission was denied on object ‘server’, database ‘master’ ( Microsoft SQL Server , Error: 300)

The issue is user don’t have VIEW SERVER STATE permission. Note that this will allow an auditing process to view all data or all database states on the instance of SQL Server.

The below command should solve the issue, but before you grant make sure you understand the implications of granting the below permission.

USE MASTER
GO
GRANT VIEW SERVER STATE TO <username>


Regards,
Satishbabu Gunukula



Wednesday, September 30, 2015

The cluster resource 'SQL Server (SQL2014)' could not be brought online due to an error bringing the dependency resource 'SQL Network Name (SQL2014)'


Users will face this common issue during SQL Server Failover Cluster installation. Note that SQL Server Engine service is always dependent on Network Name resource. The network resource failure can result the SQL Server resource not coming online.

User may see below messages in system log

Cluster network name resource 'SQL Network Name (SQL2014)' failed to create its associated computer object in domain sqlserver-expert.com' during: Resource online.

The text for the associated error code is: Access is denied.

Please work with your domain administrator to ensure that:
- The cluster identity 'SQL2014$' has Create Computer Objects permissions. By default all computer
objects are created in the same container as the cluster identity 'SQL2014$'.
- The quota for computer objects has not been reached.
- If there is an existing computer object, verify the Cluster Identity 'SQL2014$' has 'Full Control' permission to that computer object using the Active Directory Users and Computers tool.

The main cause for this error is insufficient permission to create computer objects. You have two options to resolve this error.

1. Ask your Windows Admin to grant permission “Read all properties” and “Create Computer Objects to the CNO via the container.

Or

2. Ask your Windows Admin to create required computer objects.

You can refer below link for more info

http://blogs.msdn.com/b/psssql/archive/2013/09/30/error-during-installation-of-an-sql-server-failover-cluster-instance.aspx

Regards,
Satishbabu Gunukula

Monday, September 14, 2015

User domain\user does not have required permissions during SSRS configuration

I have installed SQL Server Reporting Services and configuration went smoothly. But I have received below error while trying to open the Repots URL i.e http://servername/Reports

User domain\user does not have required permissions. Verify that sufficient permissions have been granted and Windows User Account Control (UAC) restrictions have been addressed

Below posts helped me to resolve the issue.

https://social.msdn.microsoft.com/forums/sqlserver/en-US/9b5a8763-84ce-46d0-b011-067ad39223d1/does-not-have-required-permissions

https://social.technet.microsoft.com/Forums/systemcenter/en-US/313e2166-1956-4dd0-a694-0b506e1ddba9/srs-reporting-permission-error

I hope this will help for you.

Regards,
Satishbabu Gunukula



Tuesday, September 1, 2015

There are no SQL Server instances or shared features that can be updated on this computer


Recently I have installed a new instance (SQL Server 2008 ) on a 2 node SQL Server cluster. When I am trying to apply Cumulative update 7 for SP2, the check box is grayed out and not able to select the check box for newly created instance and received following error

There are no SQL Server instances or shared features that can be updated on this computer.

I didn’t not receive any error during the instance creation, didn’t see any error messages in the event viewer. It looks the issue is with version, need to find the version information.

When I click on the instance to find the version information, I see a version miss match message in the description.

The version of SQL Server instance TEST does not match the version expected by the SQL Server upgrade. The installed SQL Server product version is 10.1.2531.0, and the expected SQL Server version is 10.2.4000.0


 It is very clear that before installing the Cumulative update 7 for SP2, we need to bring the version up to 10.2.4000.0.

I have installed SP2 first and I was able to apply Cumulative update 7 for SP2 successfully.

Regards,
Satishbabu Gunukula

Thursday, May 7, 2015

Backup failed with the following error: "xp_create_subdir() returned error 161


Users might receive below error when executing backup.

Executed as user: NT Service\SQLAgent$SQLTEST. Microsoft (R) SQL Server Execute Package Utility Version 12.0.2000.8 for 64-bit Copyright (C) Microsoft Corporation. All rights reserved. Started: 1:50:45 PM Progress: 2015-05-07 13:50:46.22 Source: {2FEF4D33-99C5-4CC6-9ECC-85EDDACC8E9E} Executing query "DECLARE @Guid UNIQUEIDENTIFIER EXECUTE msdb..sp...".: 100% complete End Progress Error: 2015-05-07 13:50:46.41 Code: 0xC002F210 Source: Back Up Database Task Execute SQL Task Description: Executing the query "EXECUTE master.dbo.xp_create_subdir N'\\SQLbackup\db..." failed with the following error: "xp_create_subdir() returned error 161, 'The specified path is invalid.'". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. End Error

Error: 2015-05-07 13:50:46.60 Code: 0xC002F210 Source: Back Up Database Task Execute SQL Task Description: Executing the query "BACKUP DATABASE [master] TO DISK = N'\\ SQLbackup \db..." failed with the following error: "Cannot open backup device '\\SQLbackup\SQLTEST\\Full_Backup\master\master_backup_2015_05_07_135046_3323057.bak'. Operating system error 5(Access is denied.). BACKUP DATABASE is terminating abnormally.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.


If you see highlighted messages there are two reasons error

1. failed with the following error: "xp_create_subdir() returned error 161

First check SQL server or SQL Server Agent service running using the local or service account and the account should have enough privileges on the backup folder

2. Cannot open backup device. Operating system error 5(Access is denied.)

Check whether the account have read/write privileges on the backup folder.

In my case I see that SQL Server Agent running using a local account and that account don’t have permission on the backup folder. I have changed the SQL Server Agent “Log on As” account to service account which has permission and restarted the service.

Regards
Satishbabu Gunukula
http://www.sqlserver-expert.com