Showing posts with label Matlab. Show all posts
Showing posts with label Matlab. Show all posts

Tuesday, July 2, 2013

Installing the MCR in Silent Mode


Issue:

The installation fails because it cannot get past the license agreement.


Specifications:

Installing the MCR Non-Interactively (Silent Mode)

To install the MCR without having to interact with the installer dialog boxes, use one of the MCR installer non-interactive modes: silent or automated.

Version: MCR v8.1
Release: R2013a
Platform: win64


Solution:

Steps to test what is to be a future automated silent installation.
  1. Download the MCR compiler exe. The msi doesn't exist anymore.
  2. Rename to .zip and extract.
  3. Run setup from command prompt with admin privileges.
          setup.exe location:
          MCR_R2013a_win64_installer\bin\win64

          command:
          setup.exe -mode silent -agreeToLicense yes

          **you need the agreeToLicense command or it will get stuck and fail**

         logs:
         Logs can be found in C:\Users\YourUser\AppData\Local\Temp
         mathworks_YourUser.log


Log errors:

When running the installer with an input file, you must accept the license agreement by setting the agreeToLicense option to yes.
Exiting with status -1
End - Unsuccessful


For future automation:
  • Some folders are useless for placing the zip in storage, to unzip, and run your automated installation scripts. They include: help, utils, and files in the root called install_guides.

Side notes:

Location of mclmcrrt8_1.dll:
C:\Program Files\MATLAB\MATLAB Compiler Runtime\v81\runtime\win64

Wednesday, August 31, 2011

Connect to SQL Azure from Matlab

1. Download the SQL Server JDBC Driver 3.0, a Type 4 JDBC driver that provides database connectivity through the standard JDBC application program interfaces (APIs) available in Java Platform, Enterprise Edition 5 and above. This version of SQL Server JDBC Driver 4.0 adds support for SQL Azure.
2. Execute it, and it will be decompressed to the selected location

3. Create folder c:/SQLJDBC and place sqljdbc_3.0 inside it.

4. Start the Notepad application as administrator and open the file:

C:\Program Files\MATLAB\R2011b\toolbox\local\classpath.txt

5. Add a reference like this to the JDBC driver after the last line of that file:

c:/SQLJDBC/sqljdbc_3.0/enu/sqljdbc4.jar

6. After that you have to restart MATLAB and then you can test the connection:

dbConn = database('master', 'user', 'password', 'com.microsoft.sqlserver.jdbc.SQLServerDriver', 'jdbc:sqlserver://sqlazurepath;databaseName=master;');

7. To test the connection you can execute:

ping(dbConn);

Friday, June 3, 2011

Connect to SQL Server from Matlab

Alternatively you can create and use an ODBC connection, but if you would rather not do that for every database and server you wish to connect to, you can do the following using the JDBC driver.

1. Download the JDBC driver from Microsoft from:


2. Execute it, and it will be decompressed to the selected location

3. Create folder c:/SQLJDBC and place sqljdbc_2.0 inside it.

4. Start the Notepad application as administrator and open the file:

C:\Program Files\MATLAB\R2010a\toolbox\local\classpath.txt

5. Add a reference like this to the JDBC driver after the last line of that file:

c:/SQLJDBC/sqljdbc_2.0/enu/sqljdbc4.jar

6. After that you have to restart MATLAB and then you can test the connection:

dbConn = database('master', 'user', 'password', 'com.microsoft.sqlserver.jdbc.SQLServerDriver', 'jdbc:sqlserver://localhost:1433;databaseName=master;');

7. To test the connection you can execute:

ping(dbConn);

8. Please note that the local instance of SQL Server requires you to have the TCP/IP protocol network connections enabled.

----------------

Other references:   http://www.mathworks.com/help/toolbox/database/ug/database.html