Update June 2013 - How to use this migration script:

  1. Make a backup copy of your old Joomla website (1.5.x)

  2. Download and install the latest Joomla CMS
    • Go through the Joomla Web-based Installation GUI until the process deletes the Installation folder.
    • Avoid installing Sample Data if possible (there will be some but this script has been reworked to potentially accommodate).

  3. Download my migration script
    • Decide on which script to use:
      1. If you have a small site (less than 10'000 articles), then you will use the single script "migrate_j15_to_j25_new_v1_8.sql"
      2. For larger sites (~200'000 articles), then you will need to use the 3-part script "migrate_j15_to_j25_new_v1_6_pt1.sql", "migrate_j15_to_j25_new_v1_6_pt2.sql", "migrate_j15_to_j25_new_v1_6_pt3.sql". Part 2 is dedicated to content migration, the commands are split to do about 5000 articles on each iteration so as to avoid session timeouts and memory issues.
    • Edit the script, renaming the database and table names used (DO NOT CONFUSE THE FOLLOWING DATABASE NAMES OR YOU WILL END UP WITH NEITHER SITE WORKING!!!)
      1. Open the SQL file in your favorite text-editor
      2. Rename any instance of "my_old_database.jos_" to the name of your old Joomla 1.5 database or a copy of (note the "jos_" prefix to all J15 tables, if you have changed this then reflect this in the SQL file).
      3. Rename any instance of "my_new_database" to the name of your new Joomla 3.0 database (don't change the table prefix for the new Joomla and instead do this as the next step).
      4. Rename any instance of "my_new_database.my_prefix_" to the name of your new Joomla 3.0 database (note that we're reflecting the prefix to use but also the database name - by this step, "my_new_database" should have been renamed).
      5. Save the SQL file, this is now unique to your website and this process. It does not contain usernames or passwords but has the real database names and all website content, so do not redistribute without taking security measures.

  4. Run the SQL against your new database
    • Open your favorite database management tool (phpMyAdmin, workBench, navicat, sqlyog?) and connect to the new database.
    • This script will use both databases, reading from the old Joomla database and writing to the new one.
    • To run this script, your user needs SELECT, INSERT and UPDATE privileges on the new database (only SELECT on the old database will do). Special care has been made to avoid the use of functions, stored procedures, temporary tables, etc. This allows broader compatibility and customers who do not have DBAs to run this themselves. Personally I grant the user who will be executing the script full privileges or at least the same as needed to install Joomla CMS.
    • Cross your fingers and use your DB management tool to run the SQL file (or copy the contents of the SQL file into the input field)

  5. Re-build/Auto-correct some Joomla inconsistencies
    • Login to your Joomla Admin Panel using a System Administrator account ("Super User"?)
    • Go to Categories > click on the "REBUILD" icon (top right)
    • Go to Menus > click on the "REBUILD" icon (top right)

  6. Check your Joomla Admin User
    • Each new Joomla version is trying a different method making this very diffcult to maintain. Check that the "super administrators" for Joomla 1.5 are in your new Joomla site (as "Super Users").
    • Check that the system administrator for the new Joomla site (created on installation) is still a "Super User" (e-mail address, receives sys emails) and note their ID (identifier number).
    • See if elements created on install show as created by the admin user and not by one of your users who coincidentally has the same identifier.
    • Check that your OddUser (will be last user listed in users table) can login and their respective articles are still attributed to them.

  7. Prepare for Go Live
    • This migration script is not a silver bullet. It was created to take away the hours I know I would spend without it.
    • This is not an upgrade; it is likely that your client may reconsider the template they are using or may want to add new 3rd-party components.
    • If asked: "how long will it take", do not say 5 minutes. This script runs on average in 15 seconds. The remaining hours, days, weeks will be spent on bringing your website up to standard with all issues addressed and sporting the latest version of the Joomla CMS!


UPDATE 2012 - Valid for Joomla 2.5.x but only experimental for Joomla 3.0.x!
I still do not recommend using this for your site if you have no test environment, however... I have used this script continuously to migrate J1.5.x websites to J2.5.x without issue. I have managed to do whole migrations in under 2 hours (this script runs in about 20 seconds based on 1000 articles and 5000 users) and my clients are satisfied! I am so pleased I made this script; it has saved me so much time!

What does this do?
After many tweaks and corrections having upgraded multiple sites in the past few years with this script, the version below migrates the following:
  • Articles
  • Banners
  • Categories & Sections
  • Menus * NEW
  • Messages
  • Newsfeeds
  • Users * UPDATED
  • Weblinks

So this is fun. We've waited and waited and Joomla 1.6 is now stable... Exciting because this is not a simple 1.5.21 to 1.5.22 upgrade. But don't believe the drama across the web, the system introduces only a few new fundamental improvements (particularly Access Control and Groups) which actually only means some minor database alterations.

I've googled, yahood and binged, but still can't find a good way to upgrade my site from Joomla version 1.5 to 1.6 so as usual I find myself writing the first migration script. Why use a script? Well apps like jUpgrade didn't work for me. This is how to manually migrate using a MySQL database management tool like PhpMyAdmin. I'm not too bothered about upgrading my own personal site (Joomla 1.5), it's just the silly number of client websites I have to upgrade.

This I find a lot simpler, my day job involves working with SQL so this script was rather basic and quick to write. You have two databases, one with your Joomla 1.5 old content, and one following a fresh install of the latest Joomla (at time of last print: 2.5.6 - preferably no sample data pre-installed). Change the database names in this script (including the new random prefix for J2.5) and run it. 20 seconds later your Joomla 1.6-2.5.x website will have all your J1.5 articles and users...

DISCLAIMER:

This is to help ME migrate Joomla 1.5 sites to Joomla 1.6 automatically. I have also been using this happily for Joomla 2.5.x websites and more recently for an experimental Joomla 3.0.x website.

  • I do not work for Joomla!
  • This script is for my own use.
  • Joomla! are in no way liable for this script.
  • You can copy this script as long as you specify a link to its source.
  • You can use this script as long as you don't hold me responsible for the results.
  • If you don't understand what this script is doing, you shouldn't be running it. Please ask someone who does.


So I find myself searching the web for a way of producing an outlook-style calendar within Business Intelligence Development Studio (BIDS). Weekdays along the top and then dates inside. Additionally we would like this linked to events in a database.

I'm calling this project "Reinventing the Wheel" because the request was a report that was similar to an MS Outlook calendar which will display any room bookings for that month. This is "Reinventing" because we used to use MS Outlook to store these kind of things until the company implemented a software to deal with room bookings and said we shouldn't use Outlook for this...

Thought I'd add a note as I was getting confused with the built-in function "FormatDateTime()". The example is shown as:

copyraw
=FormatDateTime(Fields!BirthDate.Value, DateFormat.ShortDate)
  1.  =FormatDateTime(Fields!BirthDate.Value, DateFormat.ShortDate) 

The other formats are:
copyraw
=FormatDateTime(Fields!BirthDate.Value, DateFormat.GeneralDate)
=FormatDateTime(Fields!BirthDate.Value, DateFormat.LongDate)
=FormatDateTime(Fields!BirthDate.Value, DateFormat.ShortDate)
=FormatDateTime(Fields!BirthDate.Value, DateFormat.LongTime)
=FormatDateTime(Fields!BirthDate.Value, DateFormat.ShortTime)
  1.  =FormatDateTime(Fields!BirthDate.Value, DateFormat.GeneralDate) 
  2.  =FormatDateTime(Fields!BirthDate.Value, DateFormat.LongDate) 
  3.  =FormatDateTime(Fields!BirthDate.Value, DateFormat.ShortDate) 
  4.  =FormatDateTime(Fields!BirthDate.Value, DateFormat.LongTime) 
  5.  =FormatDateTime(Fields!BirthDate.Value, DateFormat.ShortTime) 

Unfortunately if you are using US dates and want the report to use a specific European date format and you spend as long as I did searching the web for a solution, then ignore all the above.

Another built-in function is the text-formatter
Category: Transact-SQL :: Article: 317

In standard SQL we can combine the contents of two tables with a CROSS JOIN, (BTW these are not instructions to create some table I'll never use again unlike the rest of the solutions I found on the web). In MySQL, I only know how to do this with a UNION ALL clause.

Scenario:
I have a Joomla module which should take the keywords from a specified number of different but similar tables. I'm looking to query the Title and the Introductions of any valid articles from BOTH tables and return one table with everything I want.

Once again I've spent a whole morning going in the wrong direction with a convincing SQL script. This article is just a note on when using Business Intelligence Development Studio (BIDS) or Report Builder 2.0 and when previewing the report, the parameters are not accounted for (ie. the SQL query creating the dataset does not use the parameters in its query).


Problems:
  • Given a date, the date format was reverting to US format as opposed to European
  • Given a Campus as a text value, the SQL query was ignoring this completely
  • Hardcoding the scalar local variables worked


Thought I'd put a note on this error. Bearing in mind that this is a general data type error and not just because I tried to convert a date in SQL format to a Month name.
copyraw
An error occurred during local report processing.
An error has occurred during report processing.
The Group expression used in grouping 'table1_month' returned a data type that is not valid.
  1.  An error occurred during local report processing. 
  2.  An error has occurred during report processing. 
  3.  The Group expression used in grouping 'table1_month' returned a data type that is not valid. 
Category: Transact-SQL :: Article: 313

Well I tried the SQL Server Management Studio solution to connect to a MySQL database then lost my way wondering what was I trying to achieve?

I've written this article because this is how I connected to a MySQL database from within the Business Intelligence Development Studio (BIDS) IDE from Microsoft.

Required:
  • Windows XP (ODBC Data Source Administrator)
  • MS Business Intelligence Development Studio 2008
  • Test/Sample MySQL Database to connect to (server and username + password).
  • Admin Access to the reporting server if you plan on deploying the report to it.
Scenario:
  • We want to report on a MySQL database
  • MySQL login information is a user who exists as a MySQL user and a server user.
  • Reporting server is remote as well as the MySQL database.
  • BIDS is on the client machine.


Download Connectors from dev.MySQL.com

MySQL Connector/Net

Type: .NET Framework Class Library
Usage: MySql.Data.MySqlClient.MySqlConnection
Manufacturer: MySQL

Standard
copyraw
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
  1.  Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword; 
Default port is 3306.

Specifying port
copyraw
Server=myServerAddress;Port=1234;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
  1.  Server=myServerAddress;Port=1234;Database=myDataBase;Uid=myUsername;Pwd=myPassword; 

Category: SQL Server :: Article: 310

Basically, I've started using so much more SQL in our new Business Intelligence projects that I've been revising all my scripts to see what SQL I can optimize.

One of my systems is a MediaWiki CMS which is used for the official Bournemouth University Knowledge Base. The skin itself is the index page loaded for any page in the Wiki system. It logs the IP address (VisitorIP), the URL (VisitorURL) entered via the browser useragent (VisitorUAgent), the User ID (VisitorID, 0 if not logged in) and of course the Timestamp (DateTimeStamp).


The following is a list of items I use to include on password checker pages:
  • A program called LC4 (formerly L0phtCrack) used by governments and the military boasts being able to crack 90% of user passwords in under 48 hours on a Pentium II/300. Additionally, it claims that it can crack 18% of the passwords in under 10 minutes (source: SpiesOnline.net 09/2006)

  • In the UK a worrying 3.7% use the password \"123\" (source: Pixelapes.com 05/2008)

  • 1 in 700 people choose 'qwerty' as their password (source: Modernlifeisrubbish.co.uk 08/2007)

  • Distributed.net's Project Bovine RC5-64, one of the fastest computers on earth, recently reached a speed of 76.1 billion passwords per second! (source: Lockdown.co.uk 01/2007)

  • By default, the Mozilla Firefox browser lists your stored passwords in plain text to anyone with access to your browser through the tools > options > security > Saved passwords > Show All. This includes a feature to search through your saved password information as well... You can opt to have these protected by a 'Master Password' but by default and without this, Firefox will display them all at a click of a button. (source: n/a 08/2008)

  • Password recovery tools for the majority of popular programs we use today are free to download and use. This includes but is not limited to: recovering all passwords stored in Internet Explorer or Firefox; most Messenging programs with auto-login features; account usernames and passwords from the majority of webmail and email programs; passwords in remote desktop sessions; and any wifi keys used in your wireless connections. All the software can run off a USB key needing only a few seconds to connect to your computer and to automatically download all the passwords. (source: NirSoft Recovery Tools 01/2008)

  • 4 main techniques used in getting your password: Steal It (by looking over someone's shoulder), Guess It, Brute Force (=try every combination), Dictionary Attack (=try every combination starting with words that exist). (source: Lockdown: Choosing a good password)


And some more which have become more popular in recent years:
  • There are loads of nightmare stories by security companies but one of my favourites is when the company hired to hack the client’s network simply drops loads of free nice USB flash drives in the parking lot. Employees pick them up and plug them into their machines at work which then sends the details over the internet. Apparently this has a 9 in 10 chance of working. Possibly the most notable in 2008 being the US Pentagon.

The following describes how to setup a database user with read-only access to the AdventureWorks database.

Using SQL Server Management Studio 2008:
  1. Connect to your database server.
  2. Expand Security > Logins.
  3. Right-click on the user who will be set as having read-only access (in this example "adventureworksro").
  4. Select Properties.
  5. Select User Mapping.
  6. Map the login to the database they will have access to.
  7. Tick the boxes for role membership next to public and db_datareader.
  8. Confirm by clicking OK.
You should get something like the following:
Login Properties - Adventureworksro

Credit where Credit is Due:


Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.

Disclaimer: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience in a commercial setting.

Thank you for visiting and, as always, we hope this website was of some use to you!

Kind Regards,

Joel Lipman
www.joellipman.com

RSS Feed

Related Articles

Joes Revolver Map

Joes Word Cloud

server   order   added   zoho   file   parameter   google   list   license   work   note   script   page   case   files   user   creator   first   source   deluge   form   following   version   display   time   using   windows   where   website   database   used   function   data   need   table   value   uploaded   name   client   create   date   field   report   joomla   error   would   code   system   find   mysql   JoelLipman.Com

Accreditation

Badge - Certified Zoho Creator Associate
Badge - Certified Zoho Creator Associate

Donate & Support

If you like my content, and would like to support this sharing site, feel free to donate using a method below:

Paypal:
Donate to Joel Lipman via PayPal

Bitcoin:
Donate to Joel Lipman with Bitcoin bc1qf6elrdxc968h0k673l2djc9wrpazhqtxw8qqp4

Ethereum:
Donate to Joel Lipman with Ethereum 0xb038962F3809b425D661EF5D22294Cf45E02FebF
© 2024 Joel Lipman .com. All Rights Reserved.