European Windows 2019 Hosting BLOG

BLOG about Windows 2019 Hosting and SQL 2019 Hosting - Dedicated to European Windows Hosting Customer

SQL Server Hosting Italy - HostForLIFE.eu :: How to Fix "Error: 18456, Severity: 14, State: 38" on SQL Server

clock October 2, 2014 08:55 by author Peter

PROBLEM

Error: 18456, Severity: 14, State: 38
Login failed for user 'produser'. Reason:Failed to open the explicitly specified database. [CLIET: 192.168.10.10]

or
Error: 18456, Severity: 14, State: 16.
Login failed for user 'XXXXXX'. [CLIENT: xxx.xx.x.xxx]


This is one of the most frustrating login failure errors on SQL Server. It does not mention what database the login was trying to connect to. The windows event viewer logs do not give any further information.

SOLUTION

It seems that prior to SQL Server this meant the same as State 16. But in that case you would actually see the database name to which the login was trying to connect.
To troubleshoot state 38 you need to run a profiler trace and capture the following two events.

Errors and Warnings: User Error Message
Security Audit: Audit Login Failed.

Make sure you select all the columns and run the trace while the login attempt is made.
For the event “User Error Message” you should see the database name to which the connection is being attempted. Verify the database exists and verify that the user has been created in the database and has the permission to connect to the database. You should also check if this is an orphaned user and fix it.



Drupal 7 Hosting - HostForLIFE.eu :: How to enable Clean URL in Drupal 7

clock September 22, 2014 09:32 by author Peter

When you make a fresh installation of Drupal 7, your URL will look like the following:

http://localhost/~user/drupal7/?q=user

Information from Google's webmaster guidelines means that clean URLs are important: "If you decide to use dynamic pages (URL contains a "?" character), be aware that not every search engine spider crawls dynamic pages as well as static pages. It helps to keep the parameters short and the number of them few. This style of URLS can be hard to read and can prevent search engine indexing. If you want to avoid these types of URLs styles, you can use "Clean URL" feature of the Drupal. This will eliminate "?q=" from the URLs and will generate the clean URL.

Clean URL use the "mod_rewrite" feature of the Apache server which allow us to create a rules for rewriting the URLS for the all pages of the website.

Enabling clean url:
By default, when we install the Drupal, it check for compatibility with Clean URLs. If enviornment is found as compatible with Clean URLs, it will enable during the installation process. If we need to enable Clean URL after installation, we can manage this through admin section
1. Go to Configuration >> Search and Meta Data >> Clean URLs

2. Check the checkbox "Enable clean URLs" if this is not checked.
3. Click Save Configuration button in order to save your entry.



European SQL Server 2014 Hosting - HostForLIFE.eu :: How to Drop All Tables and Their Content, Views and Stored Procedures in MS SQL

clock September 17, 2014 09:32 by author Peter

Sometimes you may face a case where you want to completely remove all tables, views & stored procedures in a MS SQL 2014 database without removing the system views, system tables,  and system stored procedures or without having to delete the database as a whole and recreating it.

You can right-click on each table one by one and try to delete them, only to find out that a foreign key constraint prevents you from doing so, at which time you have to try and figure out how each table relates to the other, and remove them in the correct sequence. If you have a few hundred or even thousand database objects this could take a long time! Finally, We found the solution. The script below will take care of this for you in one shot and give you a clean database to work with.

/* Drop all non-system stored procs */
DECLARE @name VARCHAR(128)
DECLARE @SQL VARCHAR(254)
SELECT @name = (SELECT TOP 1 [name]
FROM sysobjects WHERE [TYPE] = 'P' AND category = 0 ORDER BY [name])
WHILE @name IS NOT NULL
BEGIN
    SELECT @SQL = 'DROP PROCEDURE [dbo].[' + RTRIM(@name) +']'
    EXEC (@SQL)
    PRINT 'Dropped Procedure: ' + @name
    SELECT @name = (SELECT TOP 1 [name] FROM sysobjects WHERE [TYPE] = 'P' AND category = 0 AND [name] > @name ORDER BY [name])
END
GO

/* Drop all views */
DECLARE @name VARCHAR(128)
DECLARE @SQL VARCHAR(254)SELECT @name = (SELECT TOP 1 [name] FROM sysobjects WHERE [TYPE] = 'V' AND category = 0 ORDER BY [name])
WHILE @name IS NOT NULL
BEGINSELECT @SQL = 'DROP VIEW [dbo].[' + RTRIM(@name) +']'
EXEC (@SQL)    PRINT 'Dropped View: ' + @name
SELECT @name = (SELECT TOP 1 [name] FROM sysobjects WHERE [TYPE] = 'V' AND category = 0 AND [name] > @name ORDER BY [name])
END
GO

/* Drop all functions */
DECLARE @name VARCHAR(128)
DECLARE @SQL VARCHAR(254)
SELECT @name = (SELECT TOP 1 [name] FROM sysobjects WHERE [TYPE] IN (N'FN', N'IF', N'TF', N'FS', N'FT') AND category = 0 ORDER BY [name])
WHILE @name IS NOT NULL
BEGIN
    SELECT @SQL = 'DROP FUNCTION [dbo].[' + RTRIM(@name) +']'
    EXEC (@SQL)
    PRINT 'Dropped Function: ' + @name
    SELECT @name = (SELECT TOP 1 [name] FROM sysobjects WHERE [TYPE] IN (N'FN', N'IF', N'TF', N'FS', N'FT') AND category = 0 AND [name] > @name ORDER BY [name])
END
GO

/* Drop all Foreign Key constraints */
DECLARE @name VARCHAR(128)
DECLARE @CONSTRAINT VARCHAR(254)
DECLARE @SQL VARCHAR(254)
SELECT @name = (SELECT TOP 1 TABLE_NAME FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE constraint_catalog=DB_NAME() AND CONSTRAINT_TYPE = 'FOREIGN KEY' ORDER BY TABLE_NAME)
WHILE @name IS NOT NULL
BEGIN
 SELECT @CONSTRAINT = (SELECT TOP 1 CONSTRAINT_NAME FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE constraint_catalog=DB_NAME() AND CONSTRAINT_TYPE = 'FOREIGN KEY' AND TABLE_NAME = @name ORDER BY CONSTRAINT_NAME)    WHILE @CONSTRAINT IS NOT NULL
    BEGIN
        SELECT @SQL = 'ALTER TABLE [dbo].[' + RTRIM(@name) +'] DROP CONSTRAINT [' + RTRIM(@CONSTRAINT) +']'
        EXEC (@SQL)
        PRINT 'Dropped FK Constraint: ' + @CONSTRAINT + ' on ' + @name

        SELECT @CONSTRAINT = (SELECT TOP 1 CONSTRAINT_NAME FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE constraint_catalog=DB_NAME() AND CONSTRAINT_TYPE = 'FOREIGN KEY' AND CONSTRAINT_NAME <> @CONSTRAINT AND TABLE_NAME = @name ORDER BY CONSTRAINT_NAME)
    END
SELECT @name = (SELECT TOP 1 TABLE_NAME FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE constraint_catalog=DB_NAME() AND CONSTRAINT_TYPE = 'FOREIGN KEY' ORDER BY TABLE_NAME)
END
GO

/* Drop all Primary Key constraints */
DECLARE @name VARCHAR(128)
DECLARE @CONSTRAINT VARCHAR(254)
DECLARE @SQL VARCHAR(254)
SELECT @name = (SELECT TOP 1 TABLE_NAME FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE constraint_catalog=DB_NAME() AND CONSTRAINT_TYPE = 'PRIMARY KEY' ORDER BY TABLE_NAME)
WHILE @name IS NOT NULL
BEGIN
    SELECT @CONSTRAINT = (SELECT TOP 1 CONSTRAINT_NAME FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE constraint_catalog=DB_NAME() AND CONSTRAINT_TYPE = 'PRIMARY KEY' AND TABLE_NAME = @name ORDER BY CONSTRAINT_NAME)    WHILE @CONSTRAINT IS NOT NULL
    BEGIN
        SELECT @SQL = 'ALTER TABLE [dbo].[' + RTRIM(@name) +'] DROP CONSTRAINT [' + RTRIM(@CONSTRAINT)+']'
        EXEC (@SQL)
        PRINT 'Dropped PK Constraint: ' + @CONSTRAINT + ' on ' + @name
        SELECT @CONSTRAINT = (SELECT TOP 1 CONSTRAINT_NAME FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE constraint_catalog=DB_NAME() AND CONSTRAINT_TYPE = 'PRIMARY KEY' AND CONSTRAINT_NAME <> @CONSTRAINT AND TABLE_NAME = @name ORDER BY CONSTRAINT_NAME)
    END
SELECT @name = (SELECT TOP 1 TABLE_NAME FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE constraint_catalog=DB_NAME() AND CONSTRAINT_TYPE = 'PRIMARY KEY' ORDER BY TABLE_NAME)
END
GO
/* Drop all tables */

 



Spain SQL 2012 Hosting - HostForLIFE.eu :: How To Solve: “Cannot open user default database. Login failed. Login failed for user 'xx'”

clock September 9, 2014 07:33 by author Peter

If you are sysadmin, Your default database set to one of the user database. If you decide to take offline for your default database before you set default to another database.  You will get the following error:

Cannot open user default database. Login failed. Login failed for user 'xx'

There are the steps below login to server to access master database and then you can set your default database.

PROBLEM           
1. Connected as a sysadmin (windows authentication domain\username)
2. Connect to database server
3. Take offline  your database DB_WH_Report
-- I connected
4. Disconnect to Server
When you try to connect back

ERROR
Cannot open user default database. Login failed. Login failed for user 'xx'

SOLUTION                          
1. Connect to Server
2. Click Option to expand  Connection Propertise
3. Connect to Database Type master
4. Click Connect button

 



European .NET Framework 4.5.1 Hosting - UK :: Update and Feature Overview .Net Framework 4.5.1

clock September 1, 2014 09:21 by author Onit

.NET Framework 4.5.1 was released on 17-10-2013 along visual studio 2013, it’s required windows vista SP2 or later. in this article I will telling you what new in this .Net Framework 4.5.1 Version.

 


So this version of .NET had bunch of good updates some of them are listed below:

  • Update Portable Class Library Templates: Since I had mentioned about visual studio 2013,and this is included updates to the portable class library templates. This will allow you to using Windows Runtime APIs in portable libraries that target windows 8.1, windows phone 8.1 and windows phone Silverlight 8.1. you can also include XAML (Windows.UI.XAML types) in portable libraries, you can create a portable windows runtime component, for use in store apps. And also you can retargeted windows store or windows phone store class library like a portable class library
  • Documentation for .NET Native, is a precompilation technology for building and deploying windows store apps. And .Net native will compiles your apps directly to native code, for a better performance
  • .net Framework Reference Source, you can now browse through the .NET Framework source code online.


New Features and enhancements in the .NET Framework 4.5.1:

  • Automatic binding redirection for assemblies.
  • Collect diagnostics information: this feature is really help the developer to improve the performance of server and cloud application.
  • Explicitly compact the large object heap during garbage collection.
  • Additional performance improvements such as ASP.NET app suspension, multi-core JIT improvements and faster app startup after a .NET Framework updates.


Improvements when debugging your .NET Framework

  • Return Value in the visual Studio Debugger, when you debug a managed app in VS 2013, the autos windows displays return types and values for method this information is available not only for desktop, and windows stro but also in windows phone apps.
  • 64-Bit Edit and Continue support in Visual Studio 2013
  • Inspecting Method return value while debugging using Autos Window as well as a pseudo variable $ReturnValue
  • ADO.NET Connection Resiliency
  • Async Debugging Enhancements : To make it easier to debug asynchronous apps in Visual Studio 2013, the call stack hides the infrastructure code provided by compilers to support asynchronous programming, and also chains in logical parent frames so you can follow logical program execution more clearly
  • Better exception In Windows 8.1, exceptions that arise from Windows Store apps preserve information about the error that caused the exception, even across language boundaries
  • Those are some sort list of what’s new in .NET Framework 4.5.1 you may want to updated your .NET Framework for since they updating much especially in the debugging parts.

 

 



European HostForLIFE.eu Proudly Launches WordPress 4.0 Hosting

clock September 1, 2014 08:57 by author Peter

HostForLIFE.eu proudly launches the support of WordPress 4.0 on all our newest Windows Server environment. On WordPress 4.0 hosted by HostForLIFE.eu, you can try our new and improved features that deliver extremely high levels of uptime and continuous site availability start from €3.00/month.

WordPress is a flexible platform which helps to create your new websites with the CMS (content management system). There are lots of benefits in using the WordPress blogging platform like quick installation, self updating, open source platform, lots of plug-ins on the database and more options for website themes and the latest version is 4.0 with lots of awesome features.

WordPress 4.0 was released in August 2014, which introduces a brand new, completely updated admin design: further improvements to the editor scrolling experience, especially when it comes to the second column of boxes, better handling of small screens in the media library modals, A separate bulk selection mode for the media library grid view, visual tweaks to plugin details and customizer panels and Improvements to the installation language selector.

HostForLIFE.eu is a popular online WordPress 4.0 hosting service provider catering to those people who face such issues. The company has managed to build a strong client base in a very short period of time. It is known for offering ultra-fast, fully-managed and secured services in the competitive market.

Another wonderful feature of WordPress 4.0 is that it uses vector-based icons in the admin dashboard. This eliminates the need for pixel-based icons. With vector-based icons, the admin dashboard loads faster and the icons look sharper. No matter what device you use, whether it’s a smartphone, tablet, or a laptop computer, the icons actually scale to fit your screen.

WordPress 4.0 is a great platform to build your web presence with. HostForLIFE.eu can help customize any web software that company wishes to utilize. Further information and the full range of features WordPress 4.0 Hosting can be viewed here http://hostforlife.eu/European-WordPress-4-Hosting

About Company
HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.



European VirtoCommerce Hosting - UK :: How to Install VirtoCommerce with Plesk Control Panel?

clock August 26, 2014 06:53 by author Scott

In today tutorial, we will share how to install VirtoCommerce in our windows shared hosting environment. In this article, we also use Plesk Control Panel to manage the database. Our assumption here, that you have configured the latest ASP.NET on your server and configure your Control Panel correctly.

Ok, let’s begin the installation.

Download the VirtoCommerce source

You can download the source on http://virtocommerce.codeplex.com/releases/view/126088. The new release is version 1.11

Extract The Files

Once you have download the source, then please kindly extract all the files to your root folder. We have stored our files on C:/……/ourdomain.com/httpdocs

Create MSSQL Database

Please make sure that you create the database via your Control Panel. We use Plesk Control Panel here.

Please make sure you create MSSQL database via your Control Panel as VirtoCommerce requires MSSQL database.

Begin the VirtoCommerce Installation

Then browse your site and fill all your details. Please just see the figure below:

Opps… When you click Finish Setup, we got issue on the database. Please make sure that your db user have the full permission to alter the database. Please tick db_owner, it will fix your problem.

Then, try again to click Finish Setup. It will fix all your problem

VirtoCommerce Installation Complete

Well done, now you can browse your VirtoCommerce site. It is easy, right?

Conclusion

If you need VirtoCommerce hosting, no need to look further as our hosting environment support the latest VirtoCommerce hosting. You can always start from as low as €3.00/month to get this application installed on your site. What are you waiting for?



Comparison of Windows ASP.NET Hosting between HostForLIFE.eu Hosting Platform and Windows Azure Platform

clock August 25, 2014 11:12 by author Peter

Given the length of this review and the number of plans, it is unrealistic to compare everything of them one by one. As usual, the review focuses on price, features, uptime & speed as well as customer support. Before starting our detailed comparison, we’d like to share with you the overall ratings of the plans based on our first-hand hosting experience and large-sampled customer reviews.

Please refer to this table for more differences and similarities.


HostForLIFe.EU

Windows Azure

 

 

 

Price

€3.00/month

$76 / month

Website

Unlimited

100

Disk Space

Unlimited

1 GB

Bandwidth

Unlimited

Unlimited

1 SQL Server Size

Include 50MB

0 to 100 MB = $ 5.041/mo

Server Features

Include 4 GB RAM or higher

768 MB = $16/month

SLA

99.90%

99.90%

ASP.NET 4.5.2 / ASP.NET 4.5.1

Yes

Yes

ASP.NET 4.5 / ASP.NET 4.0

Yes

Yes

ASP.NET 3.5 / ASP.NET 2.0 / ASP.NET 1.1

Yes

Yes

Classic ASP

Yes

Yes

ASP.NET MVC 6.0 / 5.2 / MVC 5.1.2 / MVC 5.1.1 / MVC 5.0

Yes

Yes

ASP.NET MVC 4.0 / MVC 3.0 / MVC 2.0

Yes

Yes

WordPress

Yes

Yes

Umbraco

Yes

Yes

Joomla

Yes

Yes

Drupal

Yes

Yes

Node.js

Yes

Yes

PHP 5

Yes

Yes

Conclusion
Both companies are able to provide brilliant Windows hosting service. If a choice has to be made, we recommend HostForLIFE.eu as your web host because the price is more reasonable, features more complete and the performance and our technical support are awesome.To learn more about HostForLIFE.eu web hosting, please visit http://www.hostforlife.eu



European Reporting Services 2008 Hosting :: How to Troubleshoot The Timeout Error in MS SQL Reporting Services

clock August 18, 2014 06:27 by author Onit

This article will guide you how to solve timeout error in MSSQL Reporting Service. This error happened in SSRS 2008 R2 you may got error such System.Web.HttpException:Maximum request length Exceeded, so in this article I will show you the steps to solved this kind of error.


Well  I’ve found this error while trying to deploy the project:

System.Web.Services.Protocols.SoapException: There was an exception running the extensions specified in the config file. —> System.Web.HttpException: Maximum request length exceeded.    at System.Web.HttpRequest.GetEntireRawContent()    at System.Web.HttpRequest.get_InputStream()    at System.Web.Services.Protocols.SoapServerProtocol.Initialize()    — End of inner exception stack trace —    at System.Web.Services.Protocols.SoapServerProtocol.Initialize()    at System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response)    at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)

What makes this error?

This error caused by exist a property MaxRequestLength under the httpRuntime elementin the file web.config (ssrs folder\Reporting Services\ReportServer) its default value is 4096 Kb only 4Mb) it makes reporting services cannot upload a report successfully while the report size is higher than this value.

How to solve this error?

  1. Go to Example-> (C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER*\Reporting Services\ReportServer) (*your SSRS installation folder)
  2. Open web.config file
  3. On that file change the line
    <httpRuntime executionTimeout=”9000″/>
    To
    <httpRuntime executionTimeout=”9000″ maxRequestLength = “16384” />

By default, the property maxRequestLength doesn’t exist in the config file and the default value is 4096 KB so you have to increase that value. In example above I am increasing the value to 16384 KB.



European SQL 2014 Hosting - UK :: How to Join The First Row in SQL

clock August 14, 2014 12:41 by author Onit

To easily making report, we need a list of users and the most recent widget each user has created. We have a users table and a widgets table, and each user has many widgets. users.id is the primary key on users, and widgets.user_id is the corresponding foreign key in widgets.

To solve this problem, we need to join only the first row. There are several ways to do this. Here are a few different techniques and when to use them.

Use Correlated Subqueries when the foreign key is indexed

Correlated subqueries are subqueries that depend on the outer query. It's like a for loop in SQL. The subquery will run once for each row in the outer query:

select * from users join widgets on widgets.id = (
    select id from widgets
    where widgets.user_id = users.id
    order by created_at desc
    limit 1
)

Notice the where widgets.user_id = users.id clause in the subquery. It queries the widgets table once for each user row and selects that user's most recent widget row. It's very efficient if user_id is indexed and there are few users.

Use a Complete Subquery when you don't have indexes

Correlated subqueries break down when the foreign key isn't indexed, because each subquery will require a full table scan.

In that case, we can speed things up by rewriting the query to use a single subquery, only scanning the widgets table once:

select * from users join (
    select distinct on (user_id) * from widgets
    order by user_id, created_at desc
) as most_recent_user_widget
on users.id = most_recent_user_widget.user_id

This new subquery returns a list of the most recent widgets, one for each user. We then join it to the users table to get our list.

We've used Postgres' DISTINCT ON syntax to easily query for only one widget peruser_id.

Use Nested Subqueries if you have an ordered ID column

In our example, the most recent row always has the highest id value. This means that even without DISTINCT ON, we can cheat with our nested subqueries like this:

select * from users join (
    select * from widgets
    where id in (
        select max(id) from widgets group by user_id
    )
) as most_recent_user_widget
on users.id = most_recent_user_widget.user_id

We start by selecting the list of IDs repreenting the most recent widget per user. Then we filter the main widgets table to those IDs. This gets us the same result as DISTINCT ON since sorting by id and created_at happen to be equivalent.

Use Window Functions if you need more control

If your table doesn't have an id column, or you can't depend on its min or max to be the most recent row, use row_number with a window function. It's a little more complicated, but a lot more flexible:

select * from users join (
    select * from (
        select *, row_number() over (
            partition by user_id
            order by created_at desc
        ) as row_num
        from widgets
    ) as ordered_widgets
    where ordered_widgets.row_num = 1
) as most_recent_user_widget
on users.id = most_recent_user_widget.user_id
order by users.id

The interesting part is here:

select *, row_number() over (
    partition by user_id
    order by created_at desc
) as row_num
from widgets
over (partition by user_id order by created_at desc

specifies a sub-table, called a window, per user_id, and sorts those windows by created_at desc.row_number() returns a row's position within its window. Thus the first widget for each user_id will have row_number 1. 

In the outer subquery, we select only the rows with a row_number of 1. With a similar query, you could get the 2nd or 3rd or 10th rows instead.



About HostForLIFE

HostForLIFE is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.

We have offered the latest Windows 2019 Hosting, ASP.NET 5 Hosting, ASP.NET MVC 6 Hosting and SQL 2019 Hosting.


Month List

Tag cloud

Sign in