Skip to main content

Posts

A network-related or instance-specific error occurred while establishing a connection to SQL Server - microsoft sql server error 2

SSMS Error: "A network-related or instance-specific error occurred while establishing a connection to SQL Server" When you are trying to connect to a SQL Server using Microsoft SQL Server Management Studio, you may see the following message: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that the SQL Server is configured to allow remote connections. (provided: Named Pipes Provider, error: 40- Could not open a connection to the SQL Server) (Microsoft SQL Server, Error: 2). While the message tells you to check some of the items that can cause this issue, it fails to mention that if your SQL Server Service is not started, then you cannot connect. One of the first things that you should check is that the SQL Server (MSSQLSERVER) is started. You can go to the Services Console (services.msc) and look for SQL Server (MSSQLSERVE...

WooCommerce Order Cancelled After Successful Payment: Unpaid Order Cancelled – Time Limit Reached

After upgrading to WooCommerce 2.0 and Above, you have experienced the issue  that all the purchased order changes to the “canceled” status.  In the admin area, all the orders appear as “canceled”  with the message “ Unpaid order canceled – time limit reached “. When this happens, you need manually change the statuses of all the canceled orders. The problem arises due to the Hold Stock feature in WooCommerce Inventory management. In this feature, you can set a certain period of time to hold the stock for an unpaid order. To Resolve the issue, Go to the admin side of your WordPress store, and navigate to   WooCommerce > Settings > Products > Inventory . From this page, you can see that the Hold Stock field is set to 60 minutes by default. If you are using WooCommerce stock management, you can disable this feature by leaving the field blank. Simply delete the value in the field and then save the changes.

Sql Server - Create a copy of database and Renaming it

Steps to attach a database with different name: Detach database from local PC Copy the mdf and ldf files and rename them. Copy\Move the files to the server directory where the original Database is stored. Use the below code USE [ master ] GO CREATE DATABASE [example_db] ON ( FILENAME = N 'D:\Data\example_db.mdf' ), ( FILENAME = N 'E:\Logs\example_db_log.ldf' ) FOR ATTACH GO you can also copy by using the Sql-server Management studio: go to database and tasks->Copy Database Select the source and destination server (same if you wants to make a copy on the same server) change the destination database name to required. Done

Wordpress - How to revert to classic editor / old editor?

How to revert to classic editor / old editor? if you wants to move back to the old Classic Editor By WordPress Contributors, please install the Plugin https://wordpress.org/plugins/classic-editor/ Classic Editor is an official plugin maintained by the WordPress team that restores the previous (“classic”) WordPress editor and the “Edit Post” screen. It makes it possible to use plugins that extend that screen, add old-style meta boxes, or otherwise depend on the previous editor. This plugin also gives you an option to keep both Gutenberg and the Classic editor at the same time. You can configure this in the plugin’s settings. Simply go to the Settings » Writing page in your WordPress admin area. You will see the option to do this under “Classic editor settings”. Don’t forget to click on the save changes button to store your settings. You will now be able to see a new link under the Posts menu to create new posts using the classic editor. You will also be able to ed...

How to transfer logins and passwords between SQL Server

Transfer logins and passwords to destination server (Server A) using scripts generated on source server (Server B) To create a script on the source Server, follow these steps: On server A, start SQL Server Management Studio, and then connect to the instance of SQL Server from which you moved the database. Open a new Query Editor window, and then run the following script. USE master GO IF OBJECT_ID ('sp_hexadecimal') IS NOT NULL DROP PROCEDURE sp_hexadecimal GO CREATE PROCEDURE sp_hexadecimal @binvalue varbinary(256), @hexvalue varchar (514) OUTPUT AS DECLARE @charvalue varchar (514) DECLARE @i int DECLARE @length int DECLARE @hexstring char(16) SELECT @charvalue = '0x' SELECT @i = 1 SELECT @length = DATALENGTH (@binvalue) SELECT @hexstring = '0123456789ABCDEF' WHILE (@i <= @length) BEGIN DECLARE @tempint int DECLARE @firstint int DECLARE @secondint int SELECT @tempint = CONVERT(int, SUBSTRING(@binvalue,@i,1)) SELECT @firstint = FLO...

Amazon AWS, Create Access Key and Secret Key

AWS Amazon, Create Access Key and Secret Key Creating, Disabling, and Deleting Access Keys for Your AWS Account Root User Use your AWS account email address and password to sign in to the AWS Management Console as the AWS account root user.   Choose your account name in the navigation bar, and then choose My Security Credentials.   If you see a warning about accessing the security credentials for your AWS account, choose Continue to Security Credentials   Expand the Access keys (access key ID and secret access key) section.   Choose Create New Access Key. If this feature is disabled, then you must delete one of the existing access keys before you can create a new key. For more information, see IAM Entity Object Limits in the IAM User Guide.   A warning explains that you have only this one opportunity to view or download the secret access key. It cannot be retrieved later.   Choose Show Access Key to copy the access key ID and secret key from yo...

IIS, Registering the ASP.Net with IIS server

You need to start command prompt by typing cmd at the Run command and then execute the command prompt with Administrator rights by right clicking and choosing Run as administrator from the context menu.   Then on the command prompt you need to navigate to the Directory that has the aspnet_regiis.exe file for that you need to type   CD C:\Windows\Microsoft.NET\Framework64\v4.0.30319\   Then you need to type the following command and hit enter to register ASP.Net with IIS   aspnet_regiis -i  

IIS, There was an error when trying to connect. Do you want to retype your credentials and try again?

IIS 8 error on windows server 2012 insufficient permission There was an error when trying to connect. Do you want to retype your credentials and try again? Details: Filename: \?\C:Windows\system32\inetsrv\config\redirection.config Error: Cannot read configuration file due to insufficient permissions screenshot: Solution: Steps to short out this issue: go to C:\Windows\Microsoft.Net\Framework64\v2.0.50727\CONFIG\machine.config here you got the redirection tag like the below <configurationredirection enabled="true" password="[enc:IISCngProvider:X0ObCWwZ4+PrTHiFVPtzFeCcL8u5P6KUOYfo1/0QrgZWATA5pKWqHvD8nL2crNJKyyqr4z/rBdLPjdRcaLxAMMj4l+lvp5EXXKSXueolvyGa34F4QZfbBVCM6oVNcq3M368TOTVjJv4POVFQWvu0MDVlGgReglXB+Lw5BRI4Htw=:enc]" path="C:\Windows\System32\inetsrv\config\import\" username="Administrator"> </configurationredirection"></li"> you need to change this to <configurationRedirection /> Th...

Tortoise SVN move SVN Repository To Another Server

How to take Backup and Restore of Tortoise SVN on window? Back SVN Go to Run with Administrator privilege and then type cmd and open command prompt Run the following command svnadmin dump c:\Repositories\RepositoryName > c:\Repositories\svnbackup.dump Here c:\Repositories\RepositoryNam e is the source path of the repository c:\Repositories\ is the destination where the dump will create svnbackup.dump name of dump file Restore SVN Go to Run with Administrator privilege and then type cmd and open command prompt Run the following command svnadmin load c:\Repositories < c:\Repositories\svnbackup.dump Here c:\Repositories  is the destination path of the repository c:\Repositories\ svnbackup.dump  name of dump file that will be loaded

C# - Copy DataTable from one DataSet to another

When we trying to add a DataTable (that is inside of a different DataSet) to new DataSet ds. If I add it directly, we will get the following error:                     DataTable already belongs to another DataSet. DataTable.Copy use DataTable.Copy to create a copy of your data table; then insert the copy into the target DataSet: dataSetX.Tables.Add( dataTableFromDataSetY.Table[0].Copy() ); DataSet.Merge You could also use DataSet.Merge for this: dataSetX.Merge(dataTableFromDataSetY); Note, however, that if you are going to use this method, you might want to make sure that your target DataSet doesn't already contain a table with the same name: If the target DataSet doesn't contain a table by the same name, a fresh copy of the table is created inside the data set; If a table by the same name is already in the target data set, then it will get merged with the one passed to Merge, and you end up with a mix of the two.