Call Us! [visitorlocation]
Call Us! [visitorlocation]

MSSQL error


SQL server error 1639 – How to fix it

SQL server error 1639 occurs at the time of the SQL Server installation. It happens due to a number of reasons ranging from issues with folder name to SQL port.

As a part of our Server Management Services, we help our Customers to fix SQL related errors regularly.

Let us today discuss the possible causes and fixes for this error.

 

What causes the SQL error 1639?

Installation of SQL Server on windows machine fails due to a number of reasons. Some of them to list out are:

  • The name of the installation directory has space in it.
  • Remnants of the previous installation that leave orphaned entries in the windows installer registry.
  • Another service running in the SQL port.
  • The issue with the Windows temp folder.

As a result, the installation fails and users face the message that the SQL installation completed with failures. You can get the details of the exact error message from the Summary logs. The error message would look like:

SQL error 1639

Let us now look at the possible fixes for this error.

 

How to fix the SQL error 1639?

As we discussed earlier a major reason for this error is unwanted characters in the installation folder name. For instance space between the words in the folder name is not permitted. Therefore, if the installation folder name is SQL Server 2008, it is a good idea to change it to SQLServer2008 or SQL_Server_2008.

Next, we can remove the failed installation from the server using “Add and Remove Programs”. Finally, we can start the installation again by a right-click on the setup file and choosing “Run as administrator” option.

 

Unnregister and re-register Windows installer

Another reason for this error could be an issue with the Windows installer. We could solve this by an unregister and re-register of the Windows installer.

a) Click Start and the Run.

b) In the Run box type msiexec /unreg and then ENTER.

c) Click Start and the Run.

d) In the Run box type msiexec /regserver and then ENTER.

 

Stop the service running on the SQL port

By default, the typical ports used by SQL Server and associated database engine services are: TCP 143340221351434. If any other service is running in this port, it may cause a failure for the SQL installation. Thus we may need to stop the service running in that port. To find the service running in the port,

1.Open command prompt as administrator.
2.Use the command netstat -a -n -o and it shows the result in the order "protocol, local IP:local port, foreign IP:foreign port, port state, and pid".
3.View the local port and pid from the result in step 2.
4.Open task manager and navigate to details tab.
5.Search for the pid obtained in step 3 in the details tab to get the details of the service.

Now that we have the service name, we could either stop that service or change the port number of the service to complete the SQL installation

 
[Need help to fix SQL errors? We are available 24×7.]

 

Conclusion

In short, the SQL server error 1639 occurs at the time of the SQL Server installation. The major reasons for this error include extra spaces in the installation file name, another service using SQL port, etc. Today we saw how our Support Engineers fixes this error.

 

 

SQL error 5120 – How to fix it

The SQL error 5120 is a common error that is triggered when the account that runs the SQL service does not have the permission to use MDF files of a database.

As a part of our Server Management Services, we help our customers to fix MS SQL errors such as this one regularly.

Let’s today discuss the possible causes and fixes for this error.

(more…)

How to fix SQL error 4060

SQL error 4060 “Server rejected the connection; Access to the selected database has been denied” is a common error usually seen after website migration in Windows servers.

The reasons for this error include permission issues, firewall restrictions, etc.

As a part of our Server  Management Services, we help our customers to fix SQL related errors regularly.

Let’s today discuss the possible causes and fixes for this error.

 

What causes SQL error 4060?

Often after a migration, some users notice SQL error 4060 while applications or websites. This error states that the “Server rejected the connection; Access to the selected database has been denied“. As the error message states, access to the database was denied as the server rejected the connection.

 

SQL error 4060

To list out, the common reasons for this error include:

  • No permission to access the database using the credentials
  • Protocol not enabled
  • Firewall blocking access

Lets us now look into each of these reasons in detail and the possible fix for them.

 

Lack of Permission

The most common reason for the error 4060 is the lack of permission for the user to access the database. After migration, it is important to ensure that all the users in the previous environment are set up in the new environment as well with the required privileges. However, this is often a frequently missed point.

Correct permissions can be granted to the users with a proper TSQL command. A general format of the command is

GRANT <permission> [ ,...n ]
TO <database_principal> [ ,...n ] [ WITH GRANT OPTION ]
[ AS <database_principal> ]

 

For instance, to grant SHOWPLAN permission on the Example database to application role Moderator, TSQL command to be used is:

USE Example;
GRANT SHOWPLAN TO Moderator;
GO.

Similarly, we could grant the required privileges to the user after comparison with that of the permission in the old environment.

 

Protocol not enabled

To connect to SQL Server Database Engine you must have a network protocol enabled. If those are not enabled, it may trigger the error 4060.

The steps to enable them are:

  • First, select Start, and in your list of programs, select SQL Server Configuration Manager.

  • Next, navigate to SQL Server Configuration Manager > SQL Server Network Configuration > Protocols for <machine instance>.

    SQL error 4060

  • Then, double-click Named Pipes. The Named Pipes Properties screen appears.

  • From Enabled, select Yes. Then click OK.

    SQL error 4060

 

  • Similarly to enable TCP/IP, we can select TCP/IP as in step 2. The TCP/IP Properties screen appears.

  • Next, on the Protocol tab, ensure Yes is selected for Enabled. On the IP Addresses tab, ensure that Yes is selected for the appropriate IP Address. Also, ensure that the appropriate TCP Port is indicated. Then click ok.error 4060

  • Finally, from SQL Server Management Studio, restart the server instance.

    SQL error 4060

 

Firewall blocking Access

Firewall restrictions can also trigger the error 4060. To fix it, we need to allow access in firewall. Generally, a closed port is the most common restriction that Firewall places. To fix it, we need to open the port in the firewall for the client.

Apart from the common reasons mentioned above, some other reasons can also trigger this error. In a rare case scenario, this error could also indicate that the corresponding database is not copied over to the new environment. Thus it is not a bad idea to cross-check if the database is actually copied over before we go for any other complex fixes.

&nbsp;

[Need help to fix SQL errors? We are available 24×7]

&nbsp;

Conclusion

In short, lack of permission for users to access database, firewall restriction etc trigger the error 4060. Today, we discussed how our Support Engineers fix the error “Server rejected the connection; Access to the selected database has been denied”.

 

Fix Microsoft SQL error 18452

Are you receiving a Microsoft SQL error 18452 while connecting to the database?

Incorrect authentication mode commonly causes this error.

Here at Bobcares, we routinely resolve SQL errors such as this as part of our Server Management Services.

Today we’ll cover the most effective fix and alternate solutions for Microsoft SQL error 18452.

 

What leads to Microsoft SQL error 18452?

SQL Server supports two authentication modes:

Windows authentication is the default mode. Specific Windows user and group accounts are trusted to log in to SQL Server.

Mixed-mode supports authentication by both Windows and SQL Server. SQL server maintains the User name and password pairs.

As Windows authentication mode is the default authentication mode enabled after installing the Microsoft SQL Server, users may face issues while connecting to the server.

[Need help to fix Microsoft SQL error 18452? We are available 24×7]

 

How to fix Microsoft SQL error 18452?

Switching to the Mixed-mode authentication can fix the Microsoft SQL error 18452.  This can be done easily with the steps below:

  • From Start >> click All Programs >> click Microsoft SQL Server 20xx (where xx is the version of SQL)>>and then click SQL Server Management Studio.
  • In the SQL Server Management Studio, right-click the server, and then click Properties.

 

Microsoft SQL error 18452

 

  • On the Security page, under Server authentication, click the SQL Server and Windows Authentication
    mode option button, and then click OK.

 

  Microsoft SQL error 18452

 

  • In the SQL Server Management Studio dialog box, click OK to restart SQL Server.

 

Alternative Fixes

At times, this error occurs when users try to connect by using SQL Server Authentication but the login used does not exist on SQL Server
To resolve this issue, verify that the SQL Server login exists.

Also, this error can occur if the login may use Windows Authentication but the login is an unrecognized Windows principal. An unrecognized Windows principal means that Windows can’t verify the login. This might be because the Windows login is from an untrusted domain. To resolve this issue, verify that you are logged in to the correct domain.

 

[Need help to fix Microsoft SQL error 18452? We are available 24×7]

Conclusion

In short, the common cause for SQL error 18452 is the Windows authentication mode. Today, we discussed how our support engineers fix this error easily.