Difference between revisions of "VT3000 - Scripting SQL Databases"

From Versacall Support
Jump to navigation Jump to search
m (Text replacement - "https://www.linkedin.com/company/versacall-technologies-inc-/mycompany/" to "https://www.linkedin.com/company/versacall/")
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Overview=
{|style="background:transparent; color:black" border="0" height="230" align="center" valign="bottom"
Use the instructions below to script an SQL database. This method is only needed when the user is attempting to use a newer version database in an older version. Example: Use a SQL Server 2017 database on an SQL 2012 Server.
|+style="background:transparent|
 
|-align="center"
=Requirements=
|
 
|[[Image:CallUsBtn.png|Call Now 858-677-6766]]
'''1.''' User must have direct access to both SQL Server Instances.
|
 
|[[Image:SubmitTckBtn.png|link=https://www.versacall.com/customer-support/service-ticket]]
'''2.''' User login must have admin rights.
|
 
|[[Image:EmailUsBtn.png|link=mailto:support@versacall.com?Subject=Help%20Needed%20Wiki&body=Type%20Message%20Here]]
'''3.''' Make a backup of all the databases on both systems before starting.
|}
 
<br>
 
----
=Instructions - Exporting/Scripting Database(s)=  
----
 
<br>
 
[[File:GeneralHeader.png]]
'''1.''' Use Windows Start button - open All Programs menu - select one of the following depending on your version of SQL Server.
<br>
 
{|style="margin:left; width: 100px; background:#eaf3ff; padding:5px; border:2px solid #000000;"
    SQL Server 2008 - SQL Server 2014
|-
 
|<big>'''Overview'''</big>
          '''a.''' Expand the SQL Server (your version) folder.
{|style="margin:left; width: 800px; background:#F0F0F0; padding:5px; border:2px solid #000000;"
          '''b.''' Select SQL Server Management Studio.
|valign="top" |
 
|-
<gallery widths=346 heights=226>
|Use the instructions below to script an SQL database. This method is only needed when the user is attempting to use a newer version database in an older version. Example: Use a SQL Server 2017 database on an SQL 2012 Server. This guide will explain how to create the script, there is another guide on running the script inside SQL Server.
File:script1.png
|}
</gallery>
|}
 
<br>
    SQL Server 2017
{|style="margin:left; width: 100px; background:#eaf3ff; padding:5px; border:2px solid #000000;"
 
|-
          '''a.''' Expand the SQL Server Tools (your version) folder.
|<big>'''Requirements'''</big>
          '''b.''' Select Microsoft SQL Server Management Studio.
{|style="margin:left; width: 800px; background:#F0F0F0; padding:5px; border:2px solid #000000;"
 
|valign="top" |
<gallery widths=351 heights=401>
{| class="wikitable mw-collapsible mw-collapsed" width="775px;"
File:script2.png
|-
</gallery>
|style="text-align: center;" | '''See Requirements Here'''
 
|-
 
|'''1.''' The VT3000 Core Software installed and running on your system.
'''2.''' Login to SQL Server instance. If this is a VersaCall system, the default username and password are shown below. If you are using your own SQL Server, contact your IT department for more information.
|-
 
|'''2.''' The Databases must already exist in your SQL Server Instance.
<gallery widths=477 heights=315>
|-
File:script3.png
|'''3.''' A backup file saved to the Computer/Server that the SQL Server Instance is running on.
</gallery>
|-
 
|'''4.''' SQL Server Management Studio installed on the Computer/Server running the SQL Server Instance or on a computer that can access the computer from your network.
 
|-
'''3.''' Expand the Database folder in SQL Server.
|'''5.''' SQL Server Instance name (IP Address/Computer Domain Name & SQL Server Instance Name).
 
|-
<gallery widths=367 heights=179>
|'''6.''' SQL Server Instance login (Username & Password).
File:script4.png
|}
</gallery>
|}
 
|}
 
<br>
'''4.''' Click on the VersaCall database that you want to script so that it is highlighted.
----
 
----
<gallery widths=253 heights=200>
<br>
File:script5.png
[[File:InstructionHeader.png]]
</gallery>
<br>
 
{|style="margin:left; width: 100px; background:#eaf3ff; padding:5px; border:2px solid #000000;"
 
|-
'''5.''' Right click on the selected database and select Tasks - Generate Scripts.
|<big>'''Step 1.'''</big>  
 
{|style="margin:left; width: 800px; background:#F0F0F0; padding:5px; border:2px solid #000000;"
<gallery widths=623 heights=383>
|valign="top" |
File:script6.png
|-
</gallery>
|Open the VT3000 web-interface - select VT3000 - select Administration - select System Settings - select Global.
 
{|style="margin:left;"
 
|valign="top" |
'''6.''' Select Next on the Generating Scripts Wizard Introduction window.
{|class="wikitable" style="background:white; align:center;"
 
|-
<gallery widths=715 heights=369>
|[[File:3114_1.png|center|93px]] || [[File:Icon_systemsettings.png|center|93px]] || [[File:Icon_globalsettings.png|center|93px]]
File:script7.png
|-
</gallery>
|style="text-align:center" | '''Administration''' || style="text-align:center" | '''System Settings''' || style="text-align:center" | '''Global'''
 
|}
 
|}
'''7.''' Ensure the "Script entire database and all database objects" is selected - click on the Next button.
|}
 
|}
<gallery widths=715 heights=369>
<br>
File:script8.png
----
</gallery>
<br>
 
{|style="margin:left; width: 100px; background:#eaf3ff; padding:5px; border:2px solid #000000;"
 
|-
'''8.''' Select "Save to File" and "Single File".
|<big>'''Step 2.'''</big>  
 
{|style="margin:left; width: 800px; background:#F0F0F0; padding:5px; border:2px solid #000000;"
<gallery widths=715 heights=499>
|valign="top" |
File:script9.png
|-
</gallery>
|Under the Database Locations heading, expand the details for one of the databases.
 
{|style="margin:left;"
 
|valign="top" |
'''9.''' In the File Name field - change the "script.sql" file name to the name of the database. Example below shows "VT3000Configuration.sql". Select the Advanced button.
{|class="wikitable" style="background:white; align:center;"
 
|-
<gallery widths=715 heights=499>
|[[File:Global2.png|center|316px]]
File:script10.png
|}
</gallery>
|}
 
|}
 
|}
'''10.''' Scroll down the list of options - click on the "Script for Server Version" option - click on it so that it is highlighted.
<br>
 
----
<gallery widths=465 heights=357>
<br>
File:script11.png
{|style="margin:left; width: 100px; background:#eaf3ff; padding:5px; border:2px solid #000000;"
</gallery>
|-
 
|<big>'''Step 3.'''</big>  
 
{|style="margin:left; width: 800px; background:#F0F0F0; padding:5px; border:2px solid #000000;"
'''11.''' Click on the down arrow in the version field - select the SQL Server version you will be moving the database to. Example shows SQL Server 2012.
|valign="top" |
 
|-
<gallery widths=465 heights=357>
|If the SQL Server Name field looks like the image below, you will need to access the VersaCall computer. User Name & Password will differ, we are representing it with (X).
File:script12.png
{|style="margin:left;"
</gallery>
|valign="top" |
 
{|class="wikitable" style="background:white; align:center;"
 
|-
'''12.''' Scroll down list of options - click on the "Types of data to script" option - click on it so that it is highlighted.
|[[File:Global3.png|center|500px]]
 
|}
<gallery widths=465 heights=357>
|}
File:script13.png
|}
</gallery>
|}
 
<br>
 
----
'''13.''' Click on the down arrow in the types field - select "Schema and data".
<br>
 
{|style="margin:left; width: 100px; background:#eaf3ff; padding:5px; border:2px solid #000000;"
<gallery widths=465 heights=357>
|-
File:script14.png
|<big>'''Step 4.'''</big>  
</gallery>
{|style="margin:left; width: 800px; background:#F0F0F0; padding:5px; border:2px solid #000000;"
 
|valign="top" |
 
|-
'''14.''' Click on the down arrow in the types field - select "Schema and data".
|If the SQL Server Name field has anything different from the image in Step # 3, you will need to access the Server that is storing the databases. You may need to contact your IT department for assistance.
 
|}
<gallery widths=465 heights=357>
|}
File:script14.png
<br>
</gallery>
 
 
'''15.''' Double check that both settings are correct - click on the OK button.
 
<gallery widths=465 heights=357>
File:script15.png
</gallery>
 
 
'''16.''' Click on the Next button on the Generating Scripts Wizard window.
 
<gallery widths=715 heights=499>
File:script16.png
</gallery>
 
 
'''16.''' On the Summary window - ensure that the Target is correct and that the file name has been changed - click on the Next button.
 
<gallery widths=715 heights=413>
File:script17.png
</gallery>
 
'''17.''' On the Summary window - ensure that the Target is correct and that the file name has been changed - click on the Next button.
 
<gallery widths=715 heights=622>
File:script18.png
</gallery>
 
 
'''18.''' Repeat the steps for all of the databases that you need to script. Close SQL Server Management Studio and move to the other system/instance.
 
 
=Instructions - Importing/Executing the Scripted Database(s)=
Save the ".sql" files, that you made in the section above, on the computer that you want to import them to. Place the files in a location that you can navigate to easily.
 
 
'''1.''' Use Windows Start button - open All Programs menu - select one of the following depending on your version of SQL Server.
 
    SQL Server 2008 - SQL Server 2014
 
          '''a.''' Expand the SQL Server (your version) folder.
          '''b.''' Select SQL Server Management Studio.
 
<gallery widths=346 heights=226>
File:script1.png
</gallery>
 
    SQL Server 2017
 
          '''a.''' Expand the SQL Server Tools (your version) folder.
          '''b.''' Select Microsoft SQL Server Management Studio.
 
<gallery widths=351 heights=401>
File:script2.png
</gallery>
 
 
'''2.''' Login to SQL Server instance. If this is a VersaCall system, the default username and password are shown below. If you are using your own SQL Server, contact your IT department for more information.
 
<gallery widths=477 heights=315>
File:script3.png
</gallery>
 
 
'''3.''' Expand the Database folder in SQL Server.
 
<gallery widths=367 heights=179>
File:script4.png
</gallery>
 
 
'''NOTE:''' Any database that you want to import/execute from a script must be removed. If you have not made a backup of the database you are replacing, please do so before proceeding.
 
 
'''4.''' Click on the VersaCall database that you want to replace.
 
<gallery widths=253 heights=200>
File:script5.png
</gallery>
 
 
'''5.''' Right click on the highlighted database - select Delete.
 
<gallery widths=331 heights=439>
File:script19.png
</gallery>
 
 
'''6.''' On the Delete Object screen - select "Delete backup and restore history information for databases" and "Close existing connections" - click on the OK button.
 
<gallery widths=690 heights=625>
File:script20.png
</gallery>
 
 
'''7.''' Under the Databases folder, the database you deleted will no longer be listed..
 
<gallery widths=253 heights=200>
File:script21.png
</gallery>
 
 
'''8.''' Select File - Open - File.
 
<gallery widths=524 heights=261>
File:script22.png
</gallery>
 
 
'''9.''' Navigate to the folder that you saved the ".sql" files to - double click on a database ".sql" file.
 
<gallery widths=105 heights=131>
File:script23.png
</gallery>
 
 
'''10.''' The Script will appear on the screen to the right of the Object Explorer. Go to the 5th line in the script and go to the FILENAME section. The file location address must be changed to match the system it is being imported into. Below are the default locations for SQL Express. Please contact your IT department if you are using a different SQL Server location.
 
          2008 R2 - FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA\VT3000_Configuration.mdf'
 
          2012 - FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\VT3000_Configuration.mdf'
 
          2014 - FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\VT3000_Configuration.mdf'
 
          2017 - FILENAME = N'C:\SQLServer2017Media\MSSQL14.SQLEXPRESS01\MSSQL\DATA\VT3000_Configuration.mdf'
 
 
<gallery widths=1190 heights=175>
File:script24.png
</gallery>
 
 
'''11.''' Change the File Name address to fit the version you are using. Example below shows this for a SQL Server 2012 instance.
 
<gallery widths=1190 heights=175>
File:script25.png
</gallery>
 
 
'''12.''' Go to the 7th line in the script and go to the FILENAME section. The log file location address must be changed to match the system it is being imported into. Below are the default locations for SQL Express. Please contact your IT department if you are using a different SQL Server location.
 
          2008 R2 - FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA\VT3000_Configuration_log.ldf'
 
          2012 - FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\VT3000_Configuration_log.ldf'
 
          2014 - FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\VT3000_Configuration_log.ldf'
 
          2017 - FILENAME = N'C:\SQLServer2017Media\MSSQL14.SQLEXPRESS01\MSSQL\DATA\VT3000_Configuration_log.ldf'
 
 
<gallery widths=1190 heights=175>
File:script26.png
</gallery>
 
 
'''13.''' Change the File Name address to fit the version you are using. Example below shows this for a SQL Server 2012 instance.
 
<gallery widths=1190 heights=175>
File:script27.png
</gallery>
 
 
'''14.''' Select Execute in the tools menu at the top of the screen.
 
<gallery widths=433 heights=104>
File:script28.png
</gallery>
 
 
'''15.''' A Message panel will appear below the Script. At the bottom of the panel you will see a Executing Query notification. This process can take some time to complete.
 
<gallery widths=230 heights=458>
File:script29.png
</gallery>
 
 
'''16.''' Once the Script is completed (database replaced), you will see a message showing all the rows that were affected and a Query Executed Successfully message.
 
<gallery widths=230 heights=458>
File:script30.png
</gallery>
 
 
'''17.''' Click on the Database folder so that it is highlighted - right click on the folder - select Refresh.
 
<gallery widths=369 heights=310>
File:script31.png
</gallery>
 
 
'''18.''' The database name for the script that you executed will now appear in the list.
 
<gallery widths=369 heights=310>
File:script31.png
</gallery>
 
 
'''19.''' Repeat the process for all the databases you need import.
 
 
 
----
----
<br>
{|style="margin:left; width: 100px; background:#eaf3ff; padding:5px; border:2px solid #000000;"
|-
|<big>'''Step 5.'''</big>
{|style="margin:left; width: 800px; background:#F0F0F0; padding:5px; border:2px solid #000000;"
|valign="top" |
|-
|Navigating to the Backup files can be difficult inside SQL Server. We suggest creating a new folder to place all the database files in. Open Windows File Explorer by selecting the icon on your computer.
{|style="margin:left;"
|valign="top" |
{|class="wikitable" style="background:white; align:center;"
|-
|[[File:SQL15.png|center|100px]]
|-
|style="text-align:center" | '''File Explorer'''
|}
|}
|}
|}
<br>
----
<br>
{|style="margin:left; width: 100px; background:#eaf3ff; padding:5px; border:2px solid #000000;"
|-
|<big>'''Step 6.'''</big>
{|style="margin:left; width: 800px; background:#F0F0F0; padding:5px; border:2px solid #000000;"
|valign="top" |
|-
|Select the C: Drive - right click in the drive and select Add New - select Folder. Name the folder SQL Backup.
{|style="margin:left;"
|valign="top" |
{|class="wikitable" style="background:white; align:center;"
|-
|[[File:SQL16.png|center|90px]] || [[File:SLQ51.png|center|413px]] || [[File:SQL17.png|center|100px]]
|-
|style="text-align:center" | '''C: Drive''' || style="text-align:center" | '''New Folder''' || style="text-align:center" | '''SQL Backup'''
|}
|}
|}
|}
<br>
----
<br>
{|style="margin:left; width: 100px; background:#eaf3ff; padding:5px; border:2px solid #000000;"
|-
|<big>'''Step 7.'''</big>
{|style="margin:left; width: 800px; background:#F0F0F0; padding:5px; border:2px solid #000000;"
|valign="top" |
|-
|Select the Windows Start button - find the Microsoft SQL Server 2008 R2 (or your version up to SQL Server 2016) folder - select the folder to expand it.
|-
|If you are using SQL Server 2017 or above you will select the SQL Server Tools (your version) folder.
{|style="margin:left;"
|valign="top" |
{|class="wikitable" style="background:white; align:center; width:775px;"
|-
|[[File:SQL18.png|center|border|100px]] || [[File:SQL19.png|border|center|268px]] || [[File:SQL22.png|border|center|221px]]
|-
|style="text-align:center" | '''Windows Start''' || style="text-align:center" | '''2008 to 2016 Versions''' || style="text-align:center" | '''Versions above 2016'''
|}
|}
|}
|}
<br>
----
<br>
{|style="margin:left; width: 100px; background:#eaf3ff; padding:5px; border:2px solid #000000;"
|-
|<big>'''Step 8.'''</big>
{|style="margin:left; width: 800px; background:#F0F0F0; padding:5px; border:2px solid #000000;"
|valign="top" |
|-
|Find the SQL Server Management Studio icon - select it.
{|style="margin:left;"
|valign="top" |
{|class="wikitable" style="background:white; align:center;"
|-
|[[File:SQL20.png|center|256px]]
|}
|}
|}
|}
<br>
----
<br>
{|style="margin:left; width: 100px; background:#eaf3ff; padding:5px; border:2px solid #000000;"
|-
|<big>'''Step 9.'''</big>
{|style="margin:left; width: 800px; background:#F0F0F0; padding:5px; border:2px solid #000000;"
|valign="top" |
|-
|On the Log In page enter the following for the Default VersaCall setup where SQL Express is being used - click on the Connect button. If you are accessing another server, please contact your IT department for the sign in information.
{|style="margin:left;"
|valign="top" |
{|class="wikitable" style="background:white; align:center; width:775px;"
|-
|[[File:SQL21.png|center|401px]]
|}
{|class="wikitable" style="background:white; align:center; width:775px;"
|-
|'''Server Name''' - 127.0.0.1\SQLEXPRESS
|-
|'''Login''' - sa
|-
|'''Password''' - SQLServer123
|}
|}
|}
|}
<br>
----
<br>
{|style="margin:left; width: 100px; background:#eaf3ff; padding:5px; border:2px solid #000000;"
|-
|<big>'''Step 10.'''</big>
{|style="margin:left; width: 800px; background:#F0F0F0; padding:5px; border:2px solid #000000;"
|valign="top" |
|-
|Expand the Databases folder - all of the VersaCall databases available will show.
{|style="margin:left;"
|valign="top" |
{|class="wikitable" style="background:white; align:center;"
|-
|[[File:ResSQL2.png|center|266px]]
|}
|}
|}
|}
<br>
----
<br>
{|style="margin:left; width: 100px; background:#eaf3ff; padding:5px; border:2px solid #000000;"
|-
|<big>'''Step 11.'''</big>
{|style="margin:left; width: 800px; background:#F0F0F0; padding:5px; border:2px solid #000000;"
|valign="top" |
|-
|Click on the Database you want to script so that it is highlighted.
{|style="margin:left;"
|valign="top" |
{|class="wikitable" style="background:white; align:center;"
|-
|[[File:ResSQL3.png|center|266px]]
|}
|}
|}
|}
<br>
----
<br>
{|style="margin:left; width: 100px; background:#eaf3ff; padding:5px; border:2px solid #000000;"
|-
|<big>'''Step 12.'''</big>
{|style="margin:left; width: 800px; background:#F0F0F0; padding:5px; border:2px solid #000000;"
|valign="top" |
|-
|Right click on the selected database and select Tasks - Generate Scripts.
{|style="margin:left;"
|valign="top" |
{|class="wikitable" style="background:white; align:center;"
|-
|[[File:Script6.png|center|623px]]
|}
|}
|}
|}
<br>
----
<br>
{|style="margin:left; width: 100px; background:#eaf3ff; padding:5px; border:2px solid #000000;"
|-
|<big>'''Step 13.'''</big>
{|style="margin:left; width: 800px; background:#F0F0F0; padding:5px; border:2px solid #000000;"
|valign="top" |
|-
|A Generate Scripts wizard will show on the screen - select the Next button.
{|style="margin:left;"
|valign="top" |
{|class="wikitable" style="background:white; align:center;"
|-
|[[File:Script7.png|center|715px]]
|}
|}
|}
|}
<br>
----
<br>
{|style="margin:left; width: 100px; background:#eaf3ff; padding:5px; border:2px solid #000000;"
|-
|<big>'''Step 14.'''</big>
{|style="margin:left; width: 800px; background:#F0F0F0; padding:5px; border:2px solid #000000;"
|valign="top" |
|-
|Ensure the "Script entire database and all database objects" is selected - click on the Next button.
{|style="margin:left;"
|valign="top" |
{|class="wikitable" style="background:white; align:center;"
|-
|[[File:Script8.png|center|715px]]
|}
|}
|}
|}
<br>
----
<br>
{|style="margin:left; width: 100px; background:#eaf3ff; padding:5px; border:2px solid #000000;"
|-
|<big>'''Step 15.'''</big>
{|style="margin:left; width: 800px; background:#F0F0F0; padding:5px; border:2px solid #000000;"
|valign="top" |
|-
|Select "Save to File" and "Single File".
{|style="margin:left;"
|valign="top" |
{|class="wikitable" style="background:white; align:center;"
|-
|[[File:Script9.png|center|715px]]
|}
|}
|}
|}
<br>
----
<br>
{|style="margin:left; width: 100px; background:#eaf3ff; padding:5px; border:2px solid #000000;"
|-
|<big>'''Step 16.'''</big>
{|style="margin:left; width: 800px; background:#F0F0F0; padding:5px; border:2px solid #000000;"
|valign="top" |
|-
|You will need to select the folder that you want to save the Script file to - select the '''...''' button next to the File Name field.
{|style="margin:left;"
|valign="top" |
{|class="wikitable" style="background:white; align:center;"
|-
|[[File:Scripting1.png|center|715px]]
|}
|}
|}
|}
<br>
----
<br>
{|style="margin:left; width: 100px; background:#eaf3ff; padding:5px; border:2px solid #000000;"
|-
|<big>'''Step 17.'''</big>
{|style="margin:left; width: 800px; background:#F0F0F0; padding:5px; border:2px solid #000000;"
|valign="top" |
|-
|If you created the SQL Backup folder explained in the previous steps - use the file tree to navigate to C:\SQL Backup - click on the folder so that it is highlighted. If you have a different folder that you want to use, navigate to its location.
{|style="margin:left;"
|valign="top" |
{|class="wikitable" style="background:white; align:center;"
|-
|[[File:ResSQL6.png|center|272px]]
|}
|}
|}
|}
<br>
----
<br>
{|style="margin:left; width: 100px; background:#eaf3ff; padding:5px; border:2px solid #000000;"
|-
|<big>'''Step 18.'''</big>
{|style="margin:left; width: 800px; background:#F0F0F0; padding:5px; border:2px solid #000000;"
|valign="top" |
|-
|You will need to rename the file. Click in the File Name field and edit the '''script.sql''' file name to be the name of the database you have selected.
|-
|For our example we will change the file name to '''VT3000_Configuration.sql'''.
{|style="margin:left;"
|valign="top" |
{|class="wikitable" style="background:white; align:center;"
|-
|[[File:Scripting2.png|center|431px]]
|}
{|class="wikitable" style="background:white; align:center;"
|-
|[[File:Scripting3.png|center|431px]]
|}
|}
|}
|}
<br>
----
<br>
{|style="margin:left; width: 100px; background:#eaf3ff; padding:5px; border:2px solid #000000;"
|-
|<big>'''Step 19.'''</big>
{|style="margin:left; width: 800px; background:#F0F0F0; padding:5px; border:2px solid #000000;"
|valign="top" |
|-
|Click on the Advanced button.
{|style="margin:left;"
|valign="top" |
{|class="wikitable" style="background:white; align:center;"
|-
|[[File:Script10.png|center|715px]]
|}
|}
|}
|}
<br>
----
<br>
{|style="margin:left; width: 100px; background:#eaf3ff; padding:5px; border:2px solid #000000;"
|-
|<big>'''Step 20.'''</big>
{|style="margin:left; width: 800px; background:#F0F0F0; padding:5px; border:2px solid #000000;"
|valign="top" |
|-
|An Advanced Scripting Options window will load. Scroll down the list of options until you get to the '''Script for Server Version''' option - click on it so that it is highlighted.
{|style="margin:left;"
|valign="top" |
{|class="wikitable" style="background:white; align:center;"
|-
|[[File:Script11.png|center|465px]]
|}
|}
|}
|}
<br>
----
<br>
{|style="margin:left; width: 100px; background:#eaf3ff; padding:5px; border:2px solid #000000;"
|-
|<big>'''Step 21.'''</big>
{|style="margin:left; width: 800px; background:#F0F0F0; padding:5px; border:2px solid #000000;"
|valign="top" |
|-
|Click on the down arrow in the version field - select the SQL Server version you will be moving the database to. Example shows SQL Server 2012.
{|style="margin:left;"
|valign="top" |
{|class="wikitable" style="background:white; align:center;"
|-
|[[File:Script12.png|center|465px]]
|}
|}
|}
|}
<br>
----
<br>
{|style="margin:left; width: 100px; background:#eaf3ff; padding:5px; border:2px solid #000000;"
|-
|<big>'''Step 22.'''</big>
{|style="margin:left; width: 800px; background:#F0F0F0; padding:5px; border:2px solid #000000;"
|valign="top" |
|-
|Scroll down the list of options until you find '''Types of data to script''' - click on it so that it is highlighted.
{|style="margin:left;"
|valign="top" |
{|class="wikitable" style="background:white; align:center;"
|-
|[[File:Script13.png|center|465px]]
|}
|}
|}
|}
<br>
----
<br>
{|style="margin:left; width: 100px; background:#eaf3ff; padding:5px; border:2px solid #000000;"
|-
|<big>'''Step 23.'''</big>
{|style="margin:left; width: 800px; background:#F0F0F0; padding:5px; border:2px solid #000000;"
|valign="top" |
|-
|Double check that both settings are correct - click on the OK button.
{|style="margin:left;"
|valign="top" |
{|class="wikitable" style="background:white; align:center;"
|-
|[[File:Script15.png|center|465px]]
|}
|}
|}
|}
<br>
----
<br>
{|style="margin:left; width: 100px; background:#eaf3ff; padding:5px; border:2px solid #000000;"
|-
|<big>'''Step 24.'''</big>
{|style="margin:left; width: 800px; background:#F0F0F0; padding:5px; border:2px solid #000000;"
|valign="top" |
|-
|Click on the Next button on the Generating Scripts Wizard window.
{|style="margin:left;"
|valign="top" |
{|class="wikitable" style="background:white; align:center;"
|-
|[[File:Script16.png|center|715px]]
|}
|}
|}
|}
<br>
----
<br>
{|style="margin:left; width: 100px; background:#eaf3ff; padding:5px; border:2px solid #000000;"
|-
|<big>'''Step 25.'''</big>
{|style="margin:left; width: 800px; background:#F0F0F0; padding:5px; border:2px solid #000000;"
|valign="top" |
|-
|On the Summary window - ensure that the Target is correct and that the file name has been changed - click on the Next button.
{|style="margin:left;"
|valign="top" |
{|class="wikitable" style="background:white; align:center;"
|-
|[[File:Script17.png|center|715px]]
|}
|}
|}
|}
<br>
----
<br>
{|style="margin:left; width: 100px; background:#eaf3ff; padding:5px; border:2px solid #000000;"
|-
|<big>'''Step 26.'''</big>
{|style="margin:left; width: 800px; background:#F0F0F0; padding:5px; border:2px solid #000000;"
|valign="top" |
|-
|On the Summary window - ensure that the Target is correct and that the file name has been changed - click on the Next button.
{|style="margin:left;"
|valign="top" |
{|class="wikitable" style="background:white; align:center;"
|-
|[[File:Script18.png|center|715 px]]
|}
|}
|}
|}
<br>
----
<br>
{|style="margin:left; width: 100px; background:#eaf3ff; padding:5px; border:2px solid #000000;"
|-
|<big>'''Step 26.'''</big>
{|style="margin:left; width: 800px; background:#F0F0F0; padding:5px; border:2px solid #000000;"
|valign="top" |
|-
|Repeat the steps to make scripts of any additional databases. Ensure that you name each one by the database name. Once you have scripted all of the databases that are required, your SQL Backup folder should look similar to the image below. Close all open windows.
{|style="margin:left;"
|valign="top" |
{|class="wikitable" style="background:white; align:center;"
|-
|[[File:Scripting4.png|center|284px]]
|}
|}
|}
|}
<br>
----
----
<br>
{|style="margin:auto;"
{|style="margin:auto;"
|valign="top" |
|+
{| class="article-table mw-collapsible mw-collapsed" data-expandtext="&#9660;" data-collapsetext="&#9650;"
[[File:RelatedHowTos.png|center]]
!<span style="font-size:150%; color:#0645ad">Related - Step by Step Guides</span>
|align="center" |
{| class="wikitable mw-collapsible mw-collapsed" width="400px;"
|-
|style="text-align: center;" | '''Select a Guide Here'''
|-
|-
|[[VT3000 - Back Up Database - SQL Server|Backup VersaCall Databases using SQL Server]]
|[[VT3000 - Back Up Database - SQL Server|Backup VersaCall Databases using SQL Server]]
Line 346: Line 608:
|-
|-
|[[VT3000 - Errors - Database Connection is Closed|How to Fix the "Database Connection Closed" Error]]
|[[VT3000 - Errors - Database Connection is Closed|How to Fix the "Database Connection Closed" Error]]
|}
|valign="top" |
{| class="article-table mw-collapsible mw-collapsed" data-expandtext="&#9660;" data-collapsetext="&#9650;"
!<span style="font-size:150%; color:#0645ad">Additional Help</span>
|-
|'''Submit a Ticket''' - https://www.versacall.com/customer-support/service-ticket
|-
|'''Training Videos''' - https://www.versacall.com/training
|}
|}
|}
|}
<br>
----
----
{|style="margin:auto;"
{|style="margin:auto;"
|+
[[File:SearchHeader.png|center]]
|align="center" |
|align="center" |
{|class="wikitable"
{|class="wikitable"
!<span style="font-size:150%; color:#0645ad">Search</span>
|-
|-
|<inputbox>type=search</inputbox>
|<inputbox>type=search</inputbox>
|}
|}
|}
<br>
----
----
 
<br>
 
[[File:VC Footer.png|center]]
{|style="background:transparent; color:black" border="0" height="200" align="center" valign="bottom" cellpadding=10px cellspacing=10px
|+style="background:transparent|
|-align="center"
|
|[[File:LinkedIn.png|Follow Us On LinkedIn|link=https://www.linkedin.com/company/versacall/]]
|
|[[File:BlogIcon.png|View our Blog|link=https://www.versacall.com/blog/]]
|}
<br>
[[Category:External Software]]
[[Category:External Software]]
[[Category:SQL Server]]
[[Category:SQL Server]]
[[Category:Database]]
[[Category:Database]]

Latest revision as of 19:28, 20 April 2023

Call Now 858-677-6766 SubmitTckBtn.png EmailUsBtn.png





GeneralHeader.png

Overview
Use the instructions below to script an SQL database. This method is only needed when the user is attempting to use a newer version database in an older version. Example: Use a SQL Server 2017 database on an SQL 2012 Server. This guide will explain how to create the script, there is another guide on running the script inside SQL Server.


Requirements
See Requirements Here
1. The VT3000 Core Software installed and running on your system.
2. The Databases must already exist in your SQL Server Instance.
3. A backup file saved to the Computer/Server that the SQL Server Instance is running on.
4. SQL Server Management Studio installed on the Computer/Server running the SQL Server Instance or on a computer that can access the computer from your network.
5. SQL Server Instance name (IP Address/Computer Domain Name & SQL Server Instance Name).
6. SQL Server Instance login (Username & Password).





InstructionHeader.png

Step 1.
Open the VT3000 web-interface - select VT3000 - select Administration - select System Settings - select Global.
3114 1.png
Icon systemsettings.png
Icon globalsettings.png
Administration System Settings Global




Step 2.
Under the Database Locations heading, expand the details for one of the databases.
Global2.png




Step 3.
If the SQL Server Name field looks like the image below, you will need to access the VersaCall computer. User Name & Password will differ, we are representing it with (X).
Global3.png




Step 4.
If the SQL Server Name field has anything different from the image in Step # 3, you will need to access the Server that is storing the databases. You may need to contact your IT department for assistance.




Step 5.
Navigating to the Backup files can be difficult inside SQL Server. We suggest creating a new folder to place all the database files in. Open Windows File Explorer by selecting the icon on your computer.
SQL15.png
File Explorer




Step 6.
Select the C: Drive - right click in the drive and select Add New - select Folder. Name the folder SQL Backup.
SQL16.png
SLQ51.png
SQL17.png
C: Drive New Folder SQL Backup




Step 7.
Select the Windows Start button - find the Microsoft SQL Server 2008 R2 (or your version up to SQL Server 2016) folder - select the folder to expand it.
If you are using SQL Server 2017 or above you will select the SQL Server Tools (your version) folder.
SQL18.png
SQL19.png
SQL22.png
Windows Start 2008 to 2016 Versions Versions above 2016




Step 8.
Find the SQL Server Management Studio icon - select it.
SQL20.png




Step 9.
On the Log In page enter the following for the Default VersaCall setup where SQL Express is being used - click on the Connect button. If you are accessing another server, please contact your IT department for the sign in information.
SQL21.png
Server Name - 127.0.0.1\SQLEXPRESS
Login - sa
Password - SQLServer123




Step 10.
Expand the Databases folder - all of the VersaCall databases available will show.
ResSQL2.png




Step 11.
Click on the Database you want to script so that it is highlighted.
ResSQL3.png




Step 12.
Right click on the selected database and select Tasks - Generate Scripts.
Script6.png




Step 13.
A Generate Scripts wizard will show on the screen - select the Next button.
Script7.png




Step 14.
Ensure the "Script entire database and all database objects" is selected - click on the Next button.
Script8.png




Step 15.
Select "Save to File" and "Single File".
Script9.png




Step 16.
You will need to select the folder that you want to save the Script file to - select the ... button next to the File Name field.
Scripting1.png




Step 17.
If you created the SQL Backup folder explained in the previous steps - use the file tree to navigate to C:\SQL Backup - click on the folder so that it is highlighted. If you have a different folder that you want to use, navigate to its location.
ResSQL6.png




Step 18.
You will need to rename the file. Click in the File Name field and edit the script.sql file name to be the name of the database you have selected.
For our example we will change the file name to VT3000_Configuration.sql.
Scripting2.png
Scripting3.png




Step 19.
Click on the Advanced button.
Script10.png




Step 20.
An Advanced Scripting Options window will load. Scroll down the list of options until you get to the Script for Server Version option - click on it so that it is highlighted.
Script11.png




Step 21.
Click on the down arrow in the version field - select the SQL Server version you will be moving the database to. Example shows SQL Server 2012.
Script12.png




Step 22.
Scroll down the list of options until you find Types of data to script - click on it so that it is highlighted.
Script13.png




Step 23.
Double check that both settings are correct - click on the OK button.
Script15.png




Step 24.
Click on the Next button on the Generating Scripts Wizard window.
Script16.png




Step 25.
On the Summary window - ensure that the Target is correct and that the file name has been changed - click on the Next button.
Script17.png




Step 26.
On the Summary window - ensure that the Target is correct and that the file name has been changed - click on the Next button.
Script18.png




Step 26.
Repeat the steps to make scripts of any additional databases. Ensure that you name each one by the database name. Once you have scripted all of the databases that are required, your SQL Backup folder should look similar to the image below. Close all open windows.
Scripting4.png





RelatedHowTos.png
Select a Guide Here
Backup VersaCall Databases using SQL Server
Update VersaCall Databases using SQL Server
Backup VersaCall Databases using VT3000 - Download Files
Backup VersaCall Databases using VT3000 - Make a Local Backup
Backup VersaCall Databases using VT3000 - Send the Backup to VersaCall
Update VersaCall Databases using VT3000
Restore VersaCall Databases using VT3000
How to Fix the "Database Connection Closed" Error



SearchHeader.png




VC Footer.png
Follow Us On LinkedIn View our Blog