Installation of the App Control Server installs all of the above-mentioned database files to the default location specified in the SQL Server.

Once a brand new installation of App Control Server is completed, you should move these files to the new locations, based on storage configuration and guidelines in previous section.

Before moving database files, you must stop the following App Control services:

  • App Control Server
  • App Control Reporter

You can move files through the SQL Management Studio, using the query window.

To move the App Control database files:

  1. Locate current database files using following query:
    SELECT Db_Name(database_id) as database_name, name, physical_name FROM sys.master_files 
    WHERE Db_Name(database_id) IN ('das', 'tempdb')

    This will return the location of all files. For example:

    database_name name physical_name
    tempdb tempdev E:\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\tempdb.mdf
    tempdb templog E:\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\templog.ldf
    Das das E:\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\das.mdf
    Das das_log E:\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\Das_log.LDF
    Das das_events E:\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\Das_events.ndf
    Das das_abinst E:\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\Das_abinst.ndf
    Das das_abtemp E:\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\das_abtemp.ndf
  2. Next, use the following command to move each file:
    ALTER DATABASE <database_name> MODIFY FILE (NAME = <file_name>, FILENAME = <location>);

    For example, suppose that the F: drive is PCIe flash storage and the D: drive is DAS storage. We want to move all index file to F:\SQL drive and all other files to D:\SQL. This is what we would do:

    ALTER DATABASE Das MODIFY FILE (NAME = das, FILENAME = 'D:\sql\das.mdf');
    ALTER DATABASE Das MODIFY FILE (NAME = das_log, FILENAME = 'D:\sql\das_log.ldf');
    ALTER DATABASE Das MODIFY FILE (NAME = das_abinst, FILENAME = 'D:\sql\das_abinst.ndf');
    ALTER DATABASE Das MODIFY FILE (NAME = das_events, FILENAME = 'D:\sql\das_events.ndf');
    ALTER DATABASE Das MODIFY FILE (NAME = das_abtemp, FILENAME = 'F:\sql\das_abtemp.ndf');
    ALTER DATABASE tempdb MODIFY FILE (NAME = tempdev, FILENAME = 'D:\sql\trempdb.mdf');
    ALTER DATABASE templog MODIFY FILE (NAME = tempdev, FILENAME = 'D:\sql\tremplog.ldf');
    
  3. Once all database files are moved in SQL, stop the SQL Server service.
  4. From Windows Explorer, move all the database files to their new locations. There will be 5 files from the App Control “das” database, and also 2 files from the System “tempdb”.
  5. Start the SQL Server service. Make sure that the database is started successfully by opening it from SQL Management Studio.
  6. Start both App Control services