FotoWeb uses a SQL database for storing activity logs and user albums. The topic deals with how to configure a working connection to the database.
Database settings are configured under Settings - Services - Database server in the site configuration.
You must specify the server and database connection information for the SQL Server you want to use. The various options are explained below.
Server: This is the server where the SQL Server runs. If you run FotoWeb with the included SQL Express 2008, the name of the server is ‘MACHINENAME\FOTOWARE’.
Failover server: Lets you specify a failover SQL server in case the main SQL server is unavailable. You must set up database mirroring according to Microsoft guide lines. For details, see following resources:
http://technet.microsoft.com/en-us/library/ms189047.aspx (How to prepare a mirror database for mirroring)
http://technet.microsoft.com/en-us/library/ms188712.aspx (How to configure a database mirroring session)
Database name: This is the name of the database you want to use for this site. You must have separate databases for each site in your system. When FotoWeb creates a new database, it is placed in the default location of the database server. If you are using a full version of Microsoft SQL Server and want to control the database location, you should manually create an empty database, and then specify that database name here.
Username: This is the name of the account FotoWeb should use to connect to the database.
Password: This is the password FotoWeb should use to connect to the database. The password is stored in FotoWeb configuration files in encrypted form.
Use Trusted Connection: You can use trusted connections with full versions of SQL Server. FotoWeb will automatically grant access to the FotoWare process account to the database, and configure them to use Windows authentication. This is a more secure way of connecting to SQL Server.
When you change the connection information for the database, you should always use the Test Connection button to verify that the connection operates correctly.
When connecting FotoWeb to an existing SQL server in your organization you may need to enable some ports in your firewall.
Important information about the FotoWare process account:
If you specify a domain account as the server's process account in the Operations Center and fill in the Domain field as yourcompany.com, yourcompany.net or something similar using a suffix, you will not be able to use a trusted connection when connecting to the SQL database. That's because the SQL database stores the windows user with only the short form of the domain name, omitting the three-letter suffix (.net, .com etc.) so that the SQL server will not be able to find the user.
For an in-depth explanation of database settings, user accounts and authentication methods, please refer to the Database settings in detail reference article.
Default account and password for the SQL Express instance
The default username and password for the SA account set by FotoWeb on the SQL Express instance is:
In FotoWeb versions prior to 8.0 Feature Release 3 the password is GgCP6127 (without the # at the end)
Test Connection / Create and verify database
The Test Connection button will verify that the connection to the main database is working. If you want to create the database also, you must click on the Create and verify database button. This will require you to fill in the account info for the database SA account (see above for default settings with SQL Express instance) This will also make sure that the database schema is correct and up to date. If the tables required by FotoWeb do not exist, you will be asked if you want to create them. FotoWeb will also create the database and the user accounts if they do not exist.
If you want to create a new database, simply enter a new name in the Database name field and click Create and verify database. FotoWeb will connect to the SQL server, create the new database and set up the database schema for you.
Scripts to create the database
Complete scripts to create the database and the necessary tables can be found in C:\ProgramData\FotoWare\FotoWeb\Server Settings\Database
Run scripts 1 through 4 to set everything up. You will need to modify the scripts slightly to define the user accounts for sa and the database user. Note that this should only be done by someone proficient in SQL server scripting.
The information panel on the right shows information about your SQL server and database after clicking the Test Connection button.
SQL server version: This is the version of the SQL server.
Database size: This is the current size of the database in megabytes.
Database maintenance options
FotoWeb has a built in task scheduler that performs various background administration tasks. Maintenance of the database logs is built in and runs every night at midnight (00:00 local server time). This maintenance routine will remove all outdated log entries in the search and activity logs, and also remove albums that have been deleted by the users. It will also run other consistency checks on the database to verify that the information is correct and up to date.
The database will also be shrunk during this procedure. This ensures that the database files do not occupy more disk space than necessary. FotoWeb will allocate 10% more disk space than actually used by the data.
As an optional step you can instruct FotoWeb to make a backup of the database. This will back up the Master database and the database for the site to the site's 'Backup' folder. The file will be named according to the time when the backup was executed. You must manually copy these files to a permanent backup location, or let a backup program handle that. You must also manually remove old backup files; otherwise your disk will eventually be filled with the database backups. The backup procedure is only available if the SQL server runs on the same server as FotoWeb. If you have a full version of Microsoft SQL Server running on a separate server, use its Enterprise Manager application to configure a backup plan.
The database backup is run every night at 00:00 local server time. The FotoWeb system will be available for requests while the operation runs.
Days to keep log entries: This setting defines how old log entries and report data can be before they're flushed (deleted) permanently. Log data includes information such as which users have downloaded files, logged in, performed a search etc. The FotoWeb reports module uses this information when generating reports.
Note that while the data that is used as the basis for reports is purged, already created reports and the data within them will remain intact. Hence, you can still access previously generated reports, but you will not be able to create new reports using data that has been purged.
Important: Report data is also flushed along with log data.