Difference between revisions of "Install database"
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
| Line 9: | Line 9: | ||
| '''Prerequisite''': A backup file (. Bak) from an existing database. | '''Prerequisite''': A backup file (. Bak) from an existing database. | ||
| − | Use "Restore" function i SQL Server Management Studio to install the database: | + | Use the "Restore" function i SQL Server Management Studio to install the database: | 
| # 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 17: | Line 17: | ||
| # 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:'''  | + | '''Alternative:''' Install 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 12:45, 3 March 2010
Create new or demo database
PlanStart version 1.0.3 and later lets you create a database automatically.
Install existing database
You can install an existing database 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.
Prerequisite: A backup file (. Bak) from an existing database. Use the "Restore" function i SQL Server Management Studio to install the database:
- 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 the new database, select "Tasks" > "Restore" > "Database ...".
- As the source, select "From device" and "..."-button. Click "Add", and locate the backup-file.
- Check "Restore" for both files (including log-file if it exists)
- 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: Install 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.
- 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" and select "Attach".
- Click "Add" and select the .ndf file.
- In the "Database details', check and if necessary edit the file path to valid ones.
