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

Thursday, February 8, 2018

The multi-part identifier "syncobj_" could not be bound


We recently got the below error while executing the a procedure on SQLServer

The multi-part identifier "syncobj_0x3946443335424338.DF_286" could not be bound. (Tested Started By)
Processing...           TAB(13) Complaints 2 - V_TAB_13
The multi-part identifier "syncobj_0x3946443335424338.DF_455" could not be bound. (Test Completed By)
Processing...           TAB(14) Complaints 3 - V_TAB_14
The multi-part identifier "syncobj_0x3946443335424338.DF_280" could not be bound. (Test Submitted By)
Processing...           TAB(15) ASR - V_TAB_15
The multi-part identifier "syncobj_0x3946443335424338.DF_445" could not be bound. (Test Approved By)

The error is confusing becoz the “syncobj_” are related to replication snapshot. Why the procedure calling those objects.

After investigation found that user querying column info from  information_schema.columns in the procedure and there is no filter.

We have added a filter “table_name not like 'syncobj%' " to exclude the “syncobj_” and the procedure is working fine without any issues.

The issue has been resolved.

Thanks,
Satishbabu Gunukula
http://sqlserver-expert.com



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