Difference between revisions of "Install database"

From Heureka Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 
{{Languages}}
 
{{Languages}}
  
<div>
+
==Create new or demo database==
;Note: PlanStart version 1.0.3 and later lets you [[Create Forest Database | create a database]] automatically.
+
PlanStart version 1.0.3 and later lets you [[Create Forest Database | create a database]] automatically.
</div>
+
 
 +
==Install existing database==
  
 
The input database must be installed, either locally on <code>localhost</code> or on a central server (like <code>server1.mycompany.com</code>). It is assumed that you have [[Install SQL Server | installed]] or have access to SQL Server.
 
The input database must be installed, either locally on <code>localhost</code> or on a central server (like <code>server1.mycompany.com</code>). It is assumed that you have [[Install SQL Server | installed]] or have access to SQL Server.
  
 
Instructions:
 
Instructions:
#Download an empty backup file (. Bak) of [ftp://salix.slu.se/Download/Heureka/Databases/ SLU FTP server] and save to your hard disk, for example, C:\TEMP\. If you are installing on a server, the file must be available locally on the server, and you must be logged on the server. You can also use another backup of a database that already contains data, for example the demo database called Heureka_Demo_Mini, also available at the ftp-server.
+
Prerequisite: A backup file (. Bak) from an existing database.
 
+
Use "Restore" function i SQL Server Management Studio to install the database:
# Use alternative 1 or 2 below
 
 
 
== Alternative 1: Use function in PlanStart to install database ==
 
[[Create a forest database | Create Forest Database]]
 
 
 
If this does not work, then try the options below.
 
 
 
== Alternative 2: Run the "Restore" in SQL Server Management Studio ==
 
 
# Open Management Studio. Enter the server name (localhost, localhost\SQLExpress, or the server name).
 
# Open Management Studio. Enter the server name (localhost, localhost\SQLExpress, or the server name).
 
# Right click on "Databases", select "New Database ..." and enter a name for the new database (no blanks or spaces)
 
# Right click on "Databases", select "New Database ..." and enter a name for the new database (no blanks or spaces)
Line 25: Line 18:
 
# In "Options", select "Overwrite ..." and change the "Restore as ..." to valid paths (folders must exist on your computer if you install locally, and on the server if you install on a remote server.
 
# In "Options", select "Overwrite ..." and change the "Restore as ..." to valid paths (folders must exist on your computer if you install locally, and on the server if you install on a remote server.
  
== Alternative. 3: Installing an .mdf file via the "Attach"-option in SQL Server Management Studio ==
+
'''Alternative:''' Installing an .mdf file via the "Attach"-option in SQL Server Management Studio ==
 
This alternative is available if you have an -mdf-file instead of a backup (.bak) file.
 
This alternative is available if you have an -mdf-file instead of a backup (.bak) file.
 
# Open Management Studio. Enter the server name (localhost, localhost\SQLExpress, or the server name).
 
# Open Management Studio. Enter the server name (localhost, localhost\SQLExpress, or the server name).

Revision as of 13:42, 3 March 2010

Create new or demo database

PlanStart version 1.0.3 and later lets you create a database automatically.

Install existing database

The input database must be installed, either locally on localhost or on a central server (like server1.mycompany.com). It is assumed that you have installed or have access to SQL Server.

Instructions: Prerequisite: A backup file (. Bak) from an existing database. Use "Restore" function i SQL Server Management Studio to install the database:

  1. Open Management Studio. Enter the server name (localhost, localhost\SQLExpress, or the server name).
  2. Right click on "Databases", select "New Database ..." and enter a name for the new database (no blanks or spaces)
  3. Right-click the new database, select "Tasks" > "Restore" > "Database ...".
  4. As the source, select "From device" and "..."-button. Click "Add", and locate the backup-file.
  5. Check "Restore" for both files (including log-file if it exists)
  6. In "Options", select "Overwrite ..." and change the "Restore as ..." to valid paths (folders must exist on your computer if you install locally, and on the server if you install on a remote server.

Alternative: Installing an .mdf file via the "Attach"-option in SQL Server Management Studio == This alternative is available if you have an -mdf-file instead of a backup (.bak) file.

  1. Open Management Studio. Enter the server name (localhost, localhost\SQLExpress, or the server name).
  2. Right click on "Databases", select "New Database ..." and enter a name for the new database (no blanks or spaces)
  3. Right click on "Databases" and select "Attach".
  4. Click "Add" and select the .ndf file.
  5. In the "Database details', check and if necessary edit the file path to valid ones.