Skip to main content

Posts

How to fix "Microsoft SQL Error SQL71564: Error validating element [USERNAME]: The element [USERNAME] has been orphaned from its login and cannot be deployed."

I needed to export a database in BACPAC format today in order to restore it somewhere else, and I encountered the following error. To resolve this issue, I deleted all of the users mentioned in the error log. After successfully creating the BACPAC file, I used it to create a new database with no problems. Error: TITLE: Microsoft SQL Server Management Studio ------------------------------ One or more unsupported elements were found in the schema used as part of a data package. Error SQL71564: Error validating element [USER1]: The element [USER1] has been orphaned from its login and cannot be deployed. Error SQL71564: Error validating element [USER2]: The element [USER2] has been orphaned from its login and cannot be deployed. Error SQL71564: Error validating element [USER3]: The element [USER3] has been orphaned from its login and cannot be deployed. Error SQL71564: Error validating element [USER4]: The element [USER4] has been orphaned from its login and cannot be deployed. Error SQL71
Recent posts

How to upgrade a Umbraco v4 website to the latest version of v7

Why upgrade to v7? A few months ago, I was asked to work on upgrading a Umbraco v4 (4.5.1) project to the latest version of v7 (7.15.10).  My first reaction was to question the requirement as v7 is fast approaching its End of Life , in the end, I realised that the client simply didn't have the budget for a v10 upgrade, hence, my colleagues and I started working on a solid plan as this was still a big upgrade.  Solid plan When we did our research to see if anybody had written anything about the upgrade path from v4 to v7, we didn't find much except this good blog post . This was a very old article, but the explanation made sense. So, we decided to follow a similar approach.  We created a new feature branch, and for each upgrade work, we created a new branch of this feature branch and then created PRs from those upgrade branches into this feature branch. After doing the code reviews, we merged each upgrade branch into this same feature branch. After going live, we merged this &qu

How to improve the availability and performance of a Umbraco v10+ website by storing 3rd party data in a database

I have a Umbraco v10.3.2 that consumes multiple (old) SOAP API web services to get details like Chartered Flights, Arrivals and Departures Flights etc, and these flights have details like Airport IATA codes, Airline ICAO or IATA codes but not Airport names or Airline names and I needed to get these names for my front-end website.  Now, in my Umbraco project, I have got sections to create airports and airline data, when I create an airport, I create details like name and IATA code and for an airline, I create details like name, ICAO code and IATA code. I could potentially get the name details from Umbraco but for this, I first needed to create a lot of airport and airline details in Umbraco (I'm talking about 6168 airlines and 9070 airports), and then for each web service result, I needed to get the name details from Umbraco (as the web services returned only the codes but not names) - this just didn't make sense! Solution - Excel comes to the rescue When was the last time easyJ

MS SQL - How to find all tables in a database by a column name

Sometimes you might need to find all your MS SQL database tables by a column name.  This could be because you might want to investigate a database error and here is how you can do it - all credit goes to AdaTheDev on StackOverflow ; Error SQL Script to Find All Tables by a Column Name --Search Tables SELECT       COLUMN_NAME AS 'ColumnName'             , TABLE_NAME AS   'TableName' FROM         INFORMATION_SCHEMA . COLUMNS WHERE        COLUMN_NAME LIKE '%preventCleanup%' ORDER BY     TableName             , ColumnName ;     --Search Tables and Views SELECT       c . name   AS 'ColumnName'             , t . name AS 'TableName' FROM         sys . columns c JOIN         sys . tables   t   ON c . object_id = t . object_id WHERE        c . name LIKE '%preventCleanup%' ORDER BY     TableName             , ColumnName ; Final Result