Running a script through SQL Server Management Studio


This support note applies to:

  • AO Practice Manager (NZ)

  • AO Practice Manager (AU)

  • AO Tax (AU)

  • AO Tax (NZ)

  • AO Statutory Reporter (NZ)

  • AO Document Manager (NZ)

  • AO Document Manager (AU)

  • AE Practice Manager (NZ)

  • AE Practice Manager (AU)

  • AE Tax Series 6 & 8 (AU)

  • AE Tax (AU)

  • AE Tax (NZ)

  • AE Tax Manager (NZ)

  • AE Statutory Reporter (NZ)

  • AE Statutory Reporter (AU)

  • AE Document Manager (NZ)

  • AE Document Manager (AU)

  • Workpapers (NZ)


Article ID: 23199

You may need to run SQL scripts when requested by MYOB Support or required by another knowledge base article to update data within the MYOB SQL databases. 

The following steps will show you how to run scripts using SQL Server 20xx where 20xx represents the version of SQL that you currently have installed/configured for MYOB.

  • All users must be logged out of the MYOB AE/AO.

  • You must be on the server where your database is located.

  • You must backup your database prior to running scripts. See

    Backing up an SQL database using Management Studio

    on how to backup your database.


You can run a script either:

  • from a file or

  • manually typing the commands into SQL Management studio


To open SQL Server Management Studio
  1. Follow the menu path: Start > Programs > Microsoft SQL Server 20xx > SQL Server Management Studio.

  2. In Connect to Server window, select Database Engine in the Server type field then enter the relevant details in the Server name field.

  3. In the Authentication, select SQL Server Authentication.

  4. Type sa in the Login field, then type the password in the Password field. Call Support if you don't know the password.

  5. Click Connect.


To run a script contained in a file

Use the following instructions only if you have a script provided to you in a file.

  1. From SQL Server Management Studio, follow the menu path: File > Open > File.

  2. From the Open File screen, navigate to and select the script file then click Open.

  3. Select the relevant database from the Available databases drop-down list.

  4. Press F5 or click Execute.



To run a script manually

Perform the following instructions only if you do not have a file containing the required script.

  1. Click New Query. The SQLQuery tab opens in the right-hand pane.

  2. Select the relevant database from the Available databases field.

  3. Type or paste the sql query in the right-hand pane and press F5 or click Execute.