Basic SQL Server operations



Similar documents
Video Administration Backup and Restore Procedures

How to Copy A SQL Database SQL Server Express (Making a History Company)

Installing LearningBay Enterprise Part 2

Moving the TRITON Reporting Databases

MS SQL Server Database Management

Migrating MSDE to Microsoft SQL 2008 R2 Express

Sage Intelligence Financial Reporting for Sage ERP X3 Version 6.5 Installation Guide

Upgrading from MSDE to SQL Server 2005 Express Edition with Advanced Services SP2

Migrating helpdesk to a new server

Monitoring SQL Server with Microsoft Operations Manager 2005

Microsoft SQL Server 2005 How to Create and Restore Database (GRANTH3) Manually

Setting Up ALERE with Client/Server Data

4cast Server Specification and Installation

MSSQL quick start guide

Notes Transfer instructions INTRODUCTION More information

Moving the Web Security Log Database

QUANTIFY INSTALLATION GUIDE

Avatier Identity Management Suite

Issue Tracking Anywhere Installation Guide

Microsoft SQL Server 2005 How to Create and Restore Database (GRANTH3) Manually

DigiVault Online Backup Manager. Microsoft SQL Server Backup/Restore Guide

Matisse Installation Guide for MS Windows

Microsoft Corporation. Project Server 2010 Installation Guide

HELP DOCUMENTATION E-SSOM BACKUP AND RESTORE GUIDE

SQL Server Setup for Assistant/Pro applications Compliance Information Systems

SQL Server 2008 R2 Express Edition Installation Guide

MICROSTRATEGY 9.3 Supplement Files Setup Transaction Services for Dashboard and App Developers

Backup/Restore Microsoft SQL Server 7.0 / 2000 / 2005 / 2008

Installation Guide for Microsoft SQL Server 2008 R2 Express. October 2011 (GUIDE 1)

InformationNOW SQL 2008 Database Backup and Restoration

Working with SQL Server Integration Services

NSi Mobile Installation Guide. Version 6.2

3 Setting up Databases on a Microsoft SQL 7.0 Server

HOW TO SILENTLY INSTALL CLOUD LINK REMOTELY WITHOUT SUPERVISION

SEER Enterprise Shared Database Administrator s Guide

e-business Suite Server Install Guide

NovaBACKUP xsp Version 15.0 Upgrade Guide

MONAHRQ Installation Permissions Guide. Version 2.0.4

1 of 10 1/31/2014 4:08 PM

Setting up an MS SQL Server for IGSS

How To Create An Easybelle History Database On A Microsoft Powerbook (Windows)

Matisse Installation Guide for MS Windows. 10th Edition

Portions of this product were created using LEADTOOLS LEAD Technologies, Inc. ALL RIGHTS RESERVED.

Database Assistant. Once Database Assistant is installed you must login to gain access to the database. Copyright 2009

Installing OneStop Reporting Products

INTRODUCTION: SQL SERVER ACCESS / LOGIN ACCOUNT INFO:

TECHNICAL NOTE. The following information is provided as a service to our users, customers, and distributors.

Table of Contents. CHAPTER 1 About This Guide CHAPTER 2 Introduction CHAPTER 3 Database Backup and Restoration... 15

Moving a Romexis Database to an Existing SQL Instance

SQL Tuning and Maintenance for the Altiris Deployment Server express database.

ilaw Installation Procedure

Technical Bulletin. SQL Express Backup Utility

Installation Guide Revision 1.0.

SQL EXPRESS INSTALLATION...

SonicWALL CDP 5.0 Microsoft Exchange InfoStore Backup and Restore

MS SQL Server Backup - User Guide

Proval LS Database & Client Software (Trial or Full) Installation Guide

TANDBERG MANAGEMENT SUITE 10.0

IMPORTANT: The person who installs and sets up the PCS Axis database on the central database server

Migrating TimeForce To A New Server

Crystal Reports Installation Guide

SonicWALL CDP 5.0 Microsoft Exchange User Mailbox Backup and Restore

How to Backup and FTP your SQL database using E2.

Jolly Server Getting Started Guide

Installing GFI Network Server Monitor

Installation Guide v3.0

SELF SERVICE RESET PASSWORD MANAGEMENT BACKUP GUIDE

ecopy ShareScan 5.0 SQL installs guide

SQL Server 2005 Advanced settings

Omgeo OASYS Workstation Installation Guide. Version 6.4 December 13, 2011

Application Note 116: Gauntlet System High Availability Using Replication

Restoring Sage Data Sage 200

DocAve 6 Service Pack 1 Job Monitor

HELP DOCUMENTATION E-SSOM BACKUP AND RESTORE GUIDE

Insight Video Net. LLC. CMS 2.0. Quick Installation Guide

ibaan ERP 5.2a Configuration Guide for ibaan ERP Windows Client

Microsoft SQLServer Restore / Redirected Restore Procedure

USING MYWEBSQL FIGURE 1: FIRST AUTHENTICATION LAYER (ENTER YOUR REGULAR SIMMONS USERNAME AND PASSWORD)

File Share Navigator Online 1

Published. Technical Bulletin: Use and Configuration of Quanterix Database Backup Scripts 1. PURPOSE 2. REFERENCES 3.

MS SQL Express installation and usage with PHMI projects

Migrating MSDE to Microsoft SQL 2005 Express SP4

Configuration Guide. Remote Backups How-To Guide. Overview

Installing SQL Express. For CribMaster 9.2 and Later

MS SQL 2000 Server with CDR DICOM 3.5 and Recommended WAN Configuration

Portions of this product were created using LEADTOOLS LEAD Technologies, Inc. ALL RIGHTS RESERVED.

1. Open the License Manager either via the Start Menu or from C:\Keri\DoorsNET directory.

Install SQL Server 2014 Express Edition

Bitrix Site Manager ASP.NET. Installation Guide

Web Service for Observer. Installation Manual. Part No Revision A

GO!NotifyLink. Database Maintenance. GO!NotifyLink Database Maintenance 1

E-Notebook SQL 12.0 Desktop Database Migration and Upgrade Guide. E-Notebook SQL 12.0 Desktop Database Migration and Upgrade Guide

Bosch ReadykeyPRO Unlimited Installation Guide, product version 6.5. This guide is item number DOC , revision 2.029, May 2012.

DOCUMENTATION MICROSOFT SQL BACKUP & RESTORE OPERATIONS

9. Database Management Utility

Tool Tip. SyAM Management Utilities and Non-Admin Domain Users

Database Back-Up and Restore

TIGERPAW EXCHANGE INTEGRATOR SETUP GUIDE V3.6.0 August 26, 2015

Transcription:

Basic SQL Server operations KB number History 22/05/2008 V1.0 By Thomas De Smet CONTENTS CONTENTS... 1 DESCRIPTION... 1 SOLUTION... 1 REQUIREMENTS...13 REFERENCES...13 APPLIES TO...13 KEYWORDS...13 DESCRIPTION This document describes some basics on how to manage and use SQL Server in conjunction with Voxtron software. Focus is on the SQL server versions used by agentel 6 and Axxium 6. SOLUTION Concepts Database server: A pc running the SQL Server database engine. Example: MyAgentelServer Instance: An isolated SQL Server database engine, a database server can be running several named instances, possible running different SQL Server versions. Instances are referenced in the following format: ServerName\InstanceName. Example: MyAgentelServer\AGENTEL or MyAgentelServer\AXXIUM Database: A database engine contains at least one database. For example: ContactCenter60 Table: Combination of columns that contains data in organized in rows SQL Command: Order for the SQL server to execute, like Select * From Tuser. This would return all records and all columns from a table called Tuser. Script: Combination of SQL commands often saved as.sql file. A script can be run manually or automatically. For example AGT60CCDbServicePackInstall.sql runs as part of the service pack installation. Stored Procedure: Specific construct of SQL commands that accepts input parameters Extended Stored Procedure: Stored procedure that is linked to a DLL file SQL Agent: Service that performs additional tasks like time based routines and sending of emails. This is required by agentel. Authentication: There are two ways of logging in to a SQL server. By using your windows user and password, called windows authentication or by supplying a user and password combination that is defined within SQL server itself, this is called SQL authentication. To view and manipulate elements of a database the specified user should have enough rights within SQL server itself. Sa: Default database administrator user under SQL authentication Page 1 of 13

Versions & editions A quick rundown of common SQL Server versions and their editions SQL Server 2000 (SQL 8.0) o MSDE: light weight database server based on the full SQL server engine can be delivered free as part of a software solution Database files have a fixed upper size limit of 2GB Does not include any graphical management tools Used by agentel up to version 6 o SQL Server 2000: Full featured database server Includes the management tool Enterprise Manger No limitations SQL Server 2005 (SQL 9.0) o o Connecting SQL Server 2005 Express light weight database server based on the full SQL server engine Can be freely obtained from the Microsoft website Database has a fixed upper size limit of 2GB on the database itself Additional, but free, management tool available called SQL Server Management Studio Express Used by Axxium 6 SQL Server 2005 Standard Edition: Full featured database server Includes the SQL Server Management Studio tool Start SQL Server Management Studio (Express) by clicking its shortcut in the start menu under Microsoft SQL Server 2005. Figure 1 Connecting with SQL Server Management Studio Enter the server\instance, select it from the drop down or select browse to get a list of available SQL servers. Note that even when connecting to a local server the server\instance combination will be used. SQL Server Management Studio makes no deference between a local or remote server. Select the authentication type. When selecting SQL Server Authentication you have to supply the login and password. Windows Authentication passes the current logged on user information on to the server. Local administrators have local access to the installed databases by default through Windows Authentication. Page 2 of 13

See the table below for some users and passwords used by Voxtron software. Instance name Version Username Password AGENTEL Up to 5 sa (blank) AGENTEL 6 sa C@llC3nt3r AGENTEL Up to 6 agenteladmin agentel AXXIUM 6 release version sa voxtron AXXIUM 6 SP1 and up sa V@xtr@n01 AXXIUM 6 and up Runtime voxtron Basic actions When authentication succeeds the SQL Server Management Studio opens. The left part or object explorer contains all server items in a tree structure. The panes in the right contain the open table, scripts or results. In the Object Explorer to open the Databases container, all elements below the Database container are part of one specific database, all other containers like Security and Server Objects are system wide for this instance. In the databases Container all databases on the instance. Open up a database to show the components. Open the Tables container to get a list of all tables inside this database. Right click a table and choose Open Table. The table is opened in the right pane and all records are shown. Note that the right pane allows to edit or enter records. Figure 2 Retrieving data in a table Right clicking on a table gives you some nice options. Choose design (not edit!) to change the table definition, the columns, their data types and other properties. Page 3 of 13

Figure 3 Modifying a table Again right click on a table, choose Script Table as then choose Select to and finally New Query Editor Window. A new tab opens in the right pane containing a SQL script already filled with a basic SELECT statement FROM the current table. Figure 4 Creating a select script Press the execute button to execute the command. The command is executed and the result is shown below the script. In this way you can create SQL commands and test them. Page 4 of 13

Figure 5 Executing the script Commands that work can be adapted to the FreeSQL rules and copied to an Axxium ODBC state to be used inside the project. Figure 6 Usage of FreeSQL inside Axxium or Telebutler Executing scripts Sometimes it might be required to run a special script against the database. For some specific cases Voxtron might supply you with such a script in the form of a *.sql file. Double click this file on any system with SQL Server Management Studio installed to open the script. You will be asked to enter the connection information. Supply the right information to connect to the intended target database. The script opens in a readable format. Some scripts require a manual adaptation before running. If this is the case, this will be indicated in the comment at the beginning of the script. Make the necessary adaptations. Check that the database selector on the left side of the execute button points to the right database and then press the execute button. When you have trouble executing a Voxtron supplied script send the error message to Voxtron Support and if possible also add database backup. It is highly advisable to backup the database before running any scripts or possible destructive actions against the database. Inside the agentel 6 database ContactCenter60 there is a special table called TDBVersion, here the system keeps track of all major database changes. Either done by automatically run scripts Page 5 of 13

during service pack or hot fix installation or when such a script is run manually. You can always use this table to check for the consistency and version of the agentel database. Figure 7 TDBVersion inside ContactCenter60 Backup & Restoring Taking a manual backup is rather easy: right click on the database you wish to backup and choose tasks, backup. Default settings should do it. Only thing you might like to change is the destination. Page 6 of 13

Figure 8 Backup options Remove the current backup destination and add a new one. Browse to the directory where you wish to store the backup and enter a file name + extensions. Choose Ok until the backup starts. Figure 9 Selecting the destination Figure 10 Browsing for the backup destination Page 7 of 13

To restore a database from a backup: Right click on a database or on the databases container and select tasks, restore. Figure 11 Restoring Select from device to restore from a file. Then choose Add and browse to select the file containing the backup. Specify the database where it should be restored to. Note that you can change this name to create a new database or duplicate. Click OK. Figure 12 Selecting the restore source When restoring databases between servers all users with access to the database are not automatically restored! This should be done manually. See the section on authentication below. Under options some more settings can be specified. One set of options that is noteworthy is the database file paths. When restoring to a new database instance these point to the default SQL Server Data path. In agentel 60 this should be \program files\voxtron\data\agentel60\database and for Axxium 60 SP2 this is \program files\voxtron\data\axxium60\database. Page 8 of 13

Figure 13 Restore options Authentication Connect to your database server and inside the object explorer you will find a logins entry as part of the security container. Here all users with specific rights on the server level are defined. If you wish to add a user, click right on the logins container and choose new login. To modify an existing user, click right on the user name and choose properties. Figure 14 The logins container Inside the properties window you can set the password if this is an SQL server user. If the selected user is a Windows account then you can only reference the account and no password can be set on SQL level. Page 9 of 13

Figure 15 SQL User properties Under the server roles option you can specify a general security level, for example administrator. Figure 16 Server role More importantly however is the user mapping entry. Here the databases on the instance are enumerated and the access level for the selected user on each of them is displayed. To have read access to a database it suffices to have the public role. Notice that some users might require access to the system databases to perform certain tasks. The agenteladmin user for example that is used by agentel requires this to manage the database jobs that are used to Page 10 of 13

generate scheduled statistics. Figure 17 User Mapping Notice that in the object explorer under the database itself you also have a security and logins container. Here all users that have specific rights on this database are listed. This excludes the inherited from the general user role because of their overall server access like administrators. One common issue is that after a database restore the users listed here are not correct. Although the usernames can be identical the SQL users listed on the database level might be deferent then those configured on the server level. In these cases no access is granted. To resolve this it suffices to remove all user entries on the database level to repopulate the database with the right user references. Figure 18 Security on the database level Jobs SQL Server Jobs are scripts that are scheduled to run at a specific date and time. For this to work the SQL Server Agent service should be running. This feature is used by agentel to schedule the automatic creation of statistic reports. In the object explorer go to the SQL Agent node, below you will find the jobs container where all jobs (past and present) are stored. Page 11 of 13

More interesting information can be found by double clicking on the Job Activity Monitor. Here you can view job status, job settings and manually start jobs. Figure 19 Job Activity Monitor Double clicking on the error log node opens up the SQL server log file viewer. Some common problems like authentication issues leave a clear error indication in these logs. Page 12 of 13

Figure 20 SQL Agent logging REQUIREMENTS SQL Server Enterprise Manger SQL Server Management Studio SQL Server Management Studio Express REFERENCES See MS SQL Book Online, the SQL online help reference for in depth syntax and feature discussion http://msdn.microsoft.com/nl-nl/library/bb545450%28en-us%29.aspx Download SQL Server Express http://msdn.microsoft.com/en-us/express/bb410792.aspx APPLIES TO agentel 6 Axxium 6 Telebutler 6 KEYWORDS SQL, MSDE, express, sql backup, database Page 13 of 13