emerchant API guide MSSQL quick start guide

Similar documents
Gold. Blog. Prize. Bronze

Perform a Server Move for Junxure

Microsoft SQL Installation and Setup

Activant Prophet 21 SQL Server Management

2. Setup. Introduction. 2.1 How Do I Get a Copy of QC-CA.C. 2.2 SQ. Server. Enterprise Data Loader Page 2

Sql 2008 Copy Table Structure And Database To

The INSERT INTO Method

CREATING CUSTOMER MAILING LABELS

Developing SQL Databases

Installation Instructions MSSQL

Reliable High-Speed Connection to Publication Database for Synchronization

MAGIC THipPro - SQL Server Installation - using the example of

Basic database tasks using SQL 2005 and Controller 8.x

Installation and Getting Started

Copyright Tools4ever B.V. All rights reserved.

LiNC-NXG for Windows 8 Professional, Windows 7 Professional, Vista Business Edition and XP Professional

Installation of Actiheart Data Analysis Suite:

Quest Knowledge Portal Installation Guide

Setup and Reconfiguration Guide

SQL Server Deployment Installation Manual. Call a Hygiena representative for more information or support

INSTALLATION GUIDE Spring 2017

Database Creation & Setup for SQL Server

VMware AirWatch Database Migration Guide A sample procedure for migrating your AirWatch database

DOCUMENT REVISION HISTORY

University of North Dakota PeopleSoft Finance Tip Sheets. Utilizing the Query Download Feature

WebsitePanel User Guide

Millennium Expert/Enterprise Installation Guide Version Table of Contents

Querying with Transact-SQL

Using Attix5 Pro with EFS

Ektron Advanced. Learning Objectives. Getting Started

HR-Lite Database & Web Service Setup Guide

APS Installation Documentation

Knowledge Portal 2.6. Installation and Configuration Guide

DefendX Software Control-Audit for Hitachi Installation Guide

SMEC ASSET MANAGEMENT SYSTEM PMS Version 5.5. System Administrator s Guide

A guide to setting up and using your NOW: Pensions Trust bureau microsite. Bureau user guide v2 PM /5

Installation and Configuration Guide

CDR Database Copy or Migration to Another Server

MYOB Advanced Business

SYNTHESYS.NET INTERACTION STUDIO Database Output Actions

DOCUMENT TRACKING INSTALLATION GUIDE

One Schema In Sql Server 2005 Management >>>CLICK HERE<<<

NTP Software File Auditor for Hitachi

Sql Server 2005 Transfer Schema Ownership

SQL Server Express Installation Guide

WhatsUp Gold 2016 Installation and Configuration Guide

Managing the CaseMap Admin Console User Guide

Application Notes for Installing and Configuring Avaya Control Manager Enterprise Edition in a High Availability mode.

JUNE 2016 PRIMAVERA P6 8x, CONTRACT MANAGEMENT 14x AND UNIFIER 16x CREATING DASHBOARD REPORTS IN ORACLE BI PUBLISHER

Table of Contents DATA MANAGEMENT TOOLS 4. IMPORT WIZARD 6 Setting Import File Format (Step 1) 7 Setting Source File Name (Step 2) 8

DOCUMENT TRACKING INSTALLATION GUIDE

Module 2: Managing Your Resources Lesson 5: Configuring System Settings and Properties Learn

MASSTRANSIT DATABASE ANALYSIS. Using Microsoft Excel And ODBC To Analyze MySQL Data

Database Setup in IRI Workbench 1

Implementing and Maintaining Microsoft SQL Server 2008 Integration Services

Installation User Guide SMART ACCESS 2.0

Sage X3 Intelligence Financial Reporting. Installation and Upgrade Guide

Installation and Configuration Guide

HOW TO USE THE EXPORT FEATURE IN LCL

Guide to Installing DYNAMICS Security Pack

Database Table Schema Sql Server 2008 R2 Management Studio

Quick Start Guide. Microinvest Barcode Printer Pro

Oracle Application Express Users Guide

Installation Guide. Last Revision: Oct 03, Page 1-

Junxure Code Upgrade Instructions

Setting up a database for multi-user access

Business Process Procedures

Ticket Mail Merge Instructions for MS Word 2007 and 2010

Some (semi-)advanced tips for LibreOffice

CDR Database Copy or Migration to Another Server

Shelter Pro Installation Guide SQL Server Backend. Server Side Requirements Overview. Shelter Pro Installation Guide SQL Server Backend Page 1

ELODEA USER'S GUIDE HOW TO SETUP, CONFIGURE AND USE ELODEA

Akana API Platform: Upgrade Guide

Visualizing Venice Historic Environment Record (Geospatial Database)

Microsoft Access 2010

Restoring data from a backup

Follow all of the steps indicated below for each process. Some steps may require IT assistance.

Universal Archiving Module. Installation Guide

NTP Software Defendex (formerly known as NTP Software File Auditor) for NetApp

IBM Security SiteProtector System SecureSync Guide

GETTING STARTED. A Step-by-Step Guide to Using MarketSight

QTD and Supporting Files Installation Instructions

PST for Outlook Admin Guide

Server Manager User and Permissions Setup

Microsoft Access 2013

Microsoft Access 2013

User Guide. BlackBerry Workspaces for Windows. Version 5.5

Sedao Ltd. Content User Manual. User Manual to cover all basic functions of Content Manager version 1.5.4

Imagine. Create. Discover. User Manual. TopLine Results Corporation

Installing Dolphin on Your PC

Copyright SolarWinds. All rights reserved worldwide. No part of this document may be reproduced by any means nor modified, decompiled,

Quick Guide to Installing and Setting Up MySQL Workbench

Banner XE Faculty Grading

Winshuttle STUDIO 11 TRANSACTION Developer Advanced Training 1. Copyright ADSOTECH Scandinavia Oy

Setup Guide. Page 0

Microsoft Access 2010

Shopping Cart: Queries, Personalizations, Filters, and Settings

Microsoft Office 365 for Education

Sedao Ltd. QuickChange PROject. User Manual for QuickChange PROject version 2.1.5

BW C SILWOOD TECHNOLOGY LTD. Safyr Metadata Discovery Software. Safyr User Guide

Transcription:

C CU us st toomme er r SUu Pp Pp Oo Rr tt www.fasthosts.co.uk emerchant API guide MSSQL quick start guide This guide will help you: Add a MS SQL database to your account. Find your database. Add additional users. Set your user permissions Upload your database Back up your database You ll also find links to further information that will help you make the most of your database. If you have printed this guide you may find it useful to make a note of your database details here. Database server IP address: Database name: Database username: Version 1

Introduction SQL databases provide many benefits to the web designer, allowing you to dynamically update your web pages, collect and maintain customer data and allowing customers to contribute to your website with content of their own. In addition many software applications, such as blogs, forums and content management systems require a database to store their information. SQL stands for Structured Query Language, which is a standard interactive programming language used for many popular databases. We offer two types of database: MySQL and Microsoft SQL Server. Most popular web applications require one of these database types. You can find out which database type you need on your chosen application's website. MS SQL is a database designed by Microsoft to be compatible with standard SQL commands. Before you start Microsoft have developed SQL Server Management Studio Express 2008 to help you manage your database easily and quickly. Some of the tasks described within this guide require the installation of this software on your local machine. Through the Graphical User Interface (GUI) you are able to create tables, schema, objects and users. You can also set permissions and run scripts directly on your database. SQL Server Express 2008 is available as a free download at: http://www.microsoft.com/express/sql/download/ Page 1 of 23

Important: Previous Microsoft database software, such as SQL Server Management Studio Express 2005, Enterprise Manager and Query Analyzer, will not work with MS SQL 2008 databases. However SQL Server Management Studio 2008 has all the features of these early tools, with extra functionality to make administering your database easier than ever before. Fasthosts database management screen From the database management screen you are able to create and edit your databases. Step 1 Log into your Fasthosts control panel and click on the Email & Web Hosting tab. Step 2 Click on your domain name in your domains list. Step 3 Click on the Databases icon. You will see a list of all MSSQL and MySQL databases associated with the hosting package. Add an MS SQL database to your account When you add a database to your account, it is created on one of our dedicated database servers but you can easily access it from your web space. Step 1 Follow the steps above to navigate to Fasthosts database management screen Page 2 of 23

Step 2 Click Add a new database. Step 3 Choose MSSQL Server as the database type, and enter a name for the new database. This name must be unique on our system, so you may be asked to try again if another customer has already chosen that name. Quick tip: The username must be unique, so try using your domain name in the user name. For example, if your domain is myonlineshop.com, then you could call your database myonlineshopdb and the user could be myonlineshopdbuser. Note: Database names are case sensitive. Click Add Database when you ve entered a name for your database. Step 4 Confirm your order, if necessary, by clicking the Order Now button. The database will be added to your package, and you will see an on-screen confirmation message. Find your database Your MS SQL database is hosted on a specialised server optimised for MS SQL databases. To connect to your database you must use the database server s IP address. Page 3 of 23

Important: You cannot connect to your database using localhost. Once you have created a database the Database name and IP address are shown on the Database management screen. Follow the steps shown in the section entitled Fasthosts database management screen to view your database details. Add users to your database Once you have added your new database, you need to create at least one user to connect to it. If you'd like to give other people, or software, access to your database, but want to restrict what they can do, create a new database user with different permissions. Step 1 Follow the steps shown in the section entitled Fasthosts database management screen Step 2 In the list of databases, click the database name. Step 3 Click the Add User button. Page 4 of 23

Step 4 Choose a username for this user and enter it into the Username text box. Select the Give this user DBO access box if you want this user to be a Database Owner. Database Owners have full permission to add, modify, and remove tables and data within the database. If you do not tick this box you can modify the user s permissions later. You also need to choose a password, and confirm it in the boxes provided. Note: The username must be unique on our system. Click Add Database User to create the new user. You will receive on-screen confirmation that the user has been created. Setting your user permissions It is good practice to create additional users with limited permissions to connect to your database for day to day use. In the following example we have already created a new user, which our website will use to connect to our database with. For this reason, we will limit the access this user will have to our database. Step 1 Open SQL Server Management Studio Express. Step 2 Enter your database IP address in the text box marked Server name. Page 5 of 23

Step 3 Select Use SQL Server authentication from the list, enter your database owner (DBO) username and password in the text boxes provided, then click Connect. Step 4 In the left hand Object explorer window, open your database, then double click on the user you want to set permissions on. Important: You should not change the permissions of the DBO user. Step 5 A new window will open. To change the role of the user across the entire database select Page 6 of 23

the box appropriate to the new role of your user. In this example we will give our website user the db_datareader role. So they can read all the data in the database, but are unable to make changes. There are 9 different roles available, these being: db_owner: Can perform any activity in the database. db_accessadmin: Can add or remove users or SQL Server users in the database. db_datareader: Can see any data from all user tables in the database. db_datawriter: Can add, delete, or change data in all user tables. db_ddladmin: Can make any data definition language commands in the database. db_securityadmin: Can manage statement and object permissions in the database. db_backupoperator: Can back up the database. db_denydatareader: Can deny permission to select data in the database. db_denydatawriter: Can deny permission to change data in the database. Page 7 of 23

Quick tip: Permissions errors are often caused by assigning users more than 1 database role. It is good practice to restrict each user to a single role. Now we may want to enable this user to make changes to a particular table within the database. Step 6 To set custom permissions to specific areas of your database, click Securables in the top left corner of the screen. Step 7 Click the Search button to find the objects within your database to set permissions for. In this example we will set the permissions on two tables within the database. Step 8 Select Specific objects then click OK. Step 9 Click Object Types, select the objects that you want to edit and click OK. Step 10 Enter the object names in the text box provided, or click Browse to choose your objects from a list. When you have selected all the tables and objects you want to modify the users permissions for, click OK. Page 8 of 23

Step 11 You should now be back on the Securables window, so select the object you want to modify to highlight it, and use the check boxes in the lower pane (on the Explicit tab) to set the permissions for your user Quick tip: You can set specific permissions for columns within a table by clicking the Column Permissions button. Connect to your database Step 1 Open SQL Server Management Studio Express. Step 2 Enter your database IP address in the text box marked Server name. Step 3 Select Use SQL Server authentication from the list, enter your database username and password in the text boxes provided, then click Connect. Page 9 of 23

Step 4 Your database can be found in the list titled Object Explorer. Note: Because your database is hosted on a dedicated database server, you will see the names of other user s databases in the list. You will not be able to view or modify any database other than your own, and other users won t have any access to your database and the data held within it. Page 10 of 23

Move an existing Database to Fasthosts If you already have an existing database, either with another hosting company, or on a development server on your own network, you can move your existing database to Fasthosts directly using Microsoft SQL Server Management Studio Express 2008. The software will allow you to import data directly from another SQL database, a Microsoft Access database, a Microsoft Excel spreadsheet, or a flat text file.. This example will show you how to transfer the data from another Microsoft SQL database. Step 1 Open SQL Server Management Studio Express. Step 2 Connect to your database using the database owner username and password (see the section Connect to your database earlier in this guide for assistance). Step 3 Right-click on your database and select Tasks > Import Data from the popup menu. Step 4 The Import and Export Wizard will open, click Next. Page 11 of 23

Step 5 Select SQL Server Native Client 10.0 from the list, and enter the database server and connection details required to connect to the source database. Once you have entered these, select the source Database from the list, then click Next. Step 6 Enter the details of your MSSQL database, as follows: Data source: Select SQL Server Native Client 10.0 from the drop down menu. Server name: Enter the IP address of your MSSQL database. This information is shown within your Fasthosts control panel. Authentication: Select Use SQL Server Authentication and enter your database username and password. This is the same username and password you chose when you created your database. Database: Select your database from the drop down menu. When you've entered the information, click Next. Page 12 of 23

Step 7 Select the option Copy data from one or more tables or views and click Next. Step 8 Select the tables you wish to import, and then click Next. Step 9 Click Next, then Finish to import your data. You will receive confirmation that your data has been imported to your database. Back up your Microsoft SQL database Page 13 of 23

It is highly recommend that you make regular backups of your database, and this process is easier than ever using SQL Server Management Studio Express 2008. Back up your database content Step 1 Open SQL Server Management Studio Express. Step 2 Connect to your database using the database owner username and password (see the section Connect to your database earlier in this guide for assistance). Step 3 Right-click on your database and select Tasks, then Export Data from the popup menus. Important: You will not be able to use the Back up option from this menu. Step 4 The Import/Export wizard will open, click Next. Page 14 of 23

Step 5 In the form provided, enter the following details: Data source: Select SQL Server Native Client 10.0 from the drop down menu. Server Name: Enter the IP address of your database server. This is shown within your Fasthosts control panel. Authentication: Select Use SQL Server Authentication, then enter your database username and password. This is the username and password you chose when you created your database. Database: Enter the name of your database from the drop down menu. Click Next once you have entered all the required information. Step 6 You will be asked where to export the database contents to. Select Flat File Destination from the drop down menu and choose a filename and location for your backup. In the example below we have also changed the Locale to English (United Kingdom) and selected the option marked Column names in the first data row. Page 15 of 23

Click Next when you are done. Quick tip: This example shows you how to back up your content to a.txt file. If you would like to back up your data to a separate database, select SQL Server Native Client 10.0 from the drop down menu and enter your database details in the text boxes provided. Step 7 Select Copy data from one or more tables or views and click Next. Step 8 Finally, choose which tables or views you want to export and select how you would like the file to be formatted. Once done click Next. Page 16 of 23

Step 9 Click Next, then Finish to export your file. You will receive confirmation that your database content has been backed up. Backing up stored procedures and functions Step 1 Open SQL Server Management Studio Express. Step 2 Connect to your database using the database owner username and password (see the section Connect to your database earlier in this guide for assistance). Step 3 Navigate to your stored procedures in the Object Explorer, and then highlight any stored procedures that you want to back up. Quick tip: The information below shows you how to back up stored procedures, but the principle is exactly the same if you want to back up any functions. Step 4 Right-click on Stored Procedures and select Script Stored Procedure as > CREATE To > File from the expanded menu. Page 17 of 23

Step 5 Choose a location to save your stored procedure and a file name for this backup. Then click Save. The selected stored procedures will now be saved on your computer. Importing Microsoft SQL database content Step 1 Open SQL Server Management Studio Express. Step 2 Connect to your database using the database owner username and password (see the section Connect to your database earlier in this guide for assistance). Step 3 Right-click on your database and select Tasks > Import Data from the popup menu. Page 18 of 23

Step 4 The Import and Export Wizard will open, click Next. Step 5 Choose a data source for the data you wish to import from the Data source list. Page 19 of 23

Quick tip: In this example we are importing data from a.txt file on our computer, however if you would like to import content from a separate database, select SQL Server Native Client 10.0 from the drop down menu and enter the connection details for this database in the text boxes provided and skip to step 7. Step 6 Define the formatting of your data source, then click Next. Page 20 of 23

Step 7 Enter the details of your MSSQL database, as follows: Destination: Select SQL Server Native Client 10.0 from the drop down menu. Server name: Enter the IP address of your MSSQL database. This information is shown within your Fasthosts control panel. Authentication: Select Use SQL Server Authentication and enter your database username and password. This is the same username and password you chose when you created your database. Database: Select your database from the drop down menu. Page 21 of 23

Click Next when you have entered all the required information. Step 8 Select the tables you wish to import, then click Next. Step 9 Click Next, then Finish to import your data. The import process may take a few minutes, and you will receive a confirmation that the data has been successfully imported. Page 22 of 23

Further reading Download Microsoft SQL Server Management Studio Express 2008 http://www.microsoft.com/express/sql/download/ Microsoft SQL Server 2008 Express information http://www.microsoft.com/express/sql/default.aspx Page 23 of 23