Friendly People.
Professional Support.
24 hours 7 days a week.
We're here for you.
MS SQL
Database Usage (optional)
If you have ordered MS SQL databases, ie. separately from mySQL databases, then the ability to administer them is available in your myCP.
Setting up your database
If you would like to use a MS SQL database, you must first create it by using your myCP Control
Panel. After logging into the MS SQL area, click on "create database".
Database and login name naming scheme
The database naming scheme is automated in myCP. The database name is based on your primary domain name. The first database
you setup will be called: abc_com_1. If you request a second DB, it
will be called abc_com_2, and so on. Because we use dedicated MS SQL servers, for all clients we
need to know the database owners, therefore there can be no exceptions
regarding the naming scheme.
If you have 2 different accounts, abc.com and def.com, the databases
for abc.com must be abc_com_1, abc_com_2, etc, and the databases for
def.com must be def_com_1, def_com_2, and so on.
The login name will be the same as the database name abc_com_1: The
user has full control over the database. It can create, modify and
drop tables, add and drop indexes, insert, modify and delete records
from a table, etc.
Logging into your database
You can now login to the database in myCP my clicking on the Admin link to create your tables, and do all of your MS SQL work. Usually however, you will not need to do this, as this work will be handled by the software you are installing on your site. You may also login to your database with the MS Enterprise Manager (select SQL Server Group, and then Add
New SQL Server Registration). The database hostname/server was given to you when you ordered your MS SQL database, for example mssql1.superb.net. You can determine database name by looking at the entry under "database" in the main MS SQL screen in myCP. The database username is the same as the database name.
Database size
Each MS SQL database is allocated
20 MB plus 20 MB for its logfile. Additional 10 MB blocks can be purchased
for $5 each.
Changing the MS SQL user password and user permissions
You may want change the password and the user permissions for security reasons. The user created for your database is initially set-up with full permissions for the newly created database.
Click the link User for the database you want
Change the Permissions you would like for that User, and if you don't want to change the password, just leave both password fields blank.
If you would like to change the password, but not the permissions, just type in the Password (in both fields) and don't change any of the permissions.
Click on Submit Query .
Note: if you are not sure why
you should change the user permissions, don't do it. You can make your
scripts stop working.
Using the MS SQL Admin Suite
Logging in:
Click in the link Admin for the database in question
You will be prompted to enter the database login and password
After logging in, you can begin working with the Admin Suite.
Description:
The Admin Suite For MS SQL Server is a web-based SQL Server Database administration tool that has been incorporated into our myCP. It is intended to handle the administration of SQL Server databases via your browser. It allows you to fully manage your databases as an alternative to MS Enterprise Manager. Best of all, we provide this free for our clients.
MS SQL Admin suite allows you to:
o create, drop, alter, copy, rename tables
o create, drop indexes
o add, drop, alter fields
o create, drop and display stored procedures
o create, drop and display triggers
o create, drop and display views
o create, drop and display rules object
o create, drop and display default objects
o add, delete, modify, duplicate records
o execute any SQL command (including stored procedures)
o build a select SQL command using a wizard
o export the result of a SQL query as a CSV file
o export the result of a SQL query as an XML file
o import a CSV file into database
o display, export and query view content
o and much more ......
Tables:
List all tables in your database and provide the links to manage those tables.
o Table Content: List records in a table. You can add/modify/duplicate/drop records or build a select to select records here. You can also export your records as a CSV or XML file or import a CSV file into your table. There are two icons ASC and DESC at the right of every field name. Click on them will sort the records by the field.
o Table Structure: Display the structure of a table. It will list all columns, indexes and triggers for you to manage.
Indexes in databases are similar to indexes in books. In a book, an index allows you to find information quickly without reading the entire book. In a database, an index allows the database program to find data in a table without scanning the entire table. An index in a book is a list of words with the page numbers that contain each word. An index in a database is a list of values in a table with the storage locations of rows in the table that contain each value. Indexes can be created on either a single column or a combination of columns in a table and are implemented in the form of B-trees. An index contains an entry with one or more columns (the search key) from each row in a table. A B-tree is sorted on the search key, and can be searched efficiently on any leading subset of the search key. For example, an index on columns A, B, C can be searched efficiently on A, on A, B, and A, B, C.
Triggers are executed when a specified data modification, such as an attempt to delete a row, is attempted on the table on which the trigger is defined. With the Trigger object, you can:
+ Create a SQL Server trigger on an existing SQL Server table.
+ Remove an existing SQL Server trigger from a SQL Server table.
+ Generate a Transact-SQL script to use in other tools to recreate an existing SQL Server trigger.
+ Change ownership of an existing SQL Server trigger.
The Name property of a Trigger object is a character string. The value of the property identifies a SQL Server trigger by name and must conform to the rules for trigger naming. The Name property is required when creating a SQL Server trigger.
o Select Content: Using the convenient set of tools provided, you can build a sophisticated instruction to select the records from the current table. For example, if you wish to achieve results produced by:
select [id],[name] from table where [id]=1 AND [id]=2
1. select "=" from the first dropdown menu.
2. input 1 in the first text field.
3. select AND from the second dropdown menu.
4. input 2 in the second text field.
5. Check the Checkbox for the columns you want to display. In this example, you should check the checkbox of columns "id" and "name".
6. Check on button Select to run the select.
o Copy Table: Here, you can copy the content or the structure of current table to another table.
o Rename Table: Rename your current table to another name.
o Empty Table: Empty all contents in current table. There will be an alert window for you to confirm the operation.
o Drop Table: Click on it will drop the table. There is an alert box window to confirm it.
Views:
It will list all views you have and you can create new views here. You need to input the SQL syntax into textarea to create a view.
A view is a virtual table whose contents are defined by a query. Like a real table, a view consists of a set of named columns and rows of data. However, a view does not exist as a stored set of data values in a database. The rows and columns of data come from tables referenced in the query defining the view and are produced dynamically when the view is referenced.
Stored Procedure:
Here, you will find all your stored procedures and give you the ability to manage them.
Stored procedures in SQL Server are similar to procedures in other programming languages in that they can:
o Accept input parameters and return multiple values in the form of output parameters to the calling procedure or batch.
o Contain programming statements that perform operations in the database, including calling other procedures.
o Return a status value to a calling procedure or batch to indicate success or failure (and the reason for failure).
Rules:
You can manage rules of current database.
A SQL Server rule is a Transact-SQL condition_expression syntax element that defines a data-integrity constraint. A rule can be bound to a column or user-defined data type. condition_expression is executed to validate data for a single column when a value is inserted into the column bound by the rule.
With the Rule object, you can:
o Create a SQL Server rule that defines an integrity constraint.
o Bind an existing SQL Server rule to a column or user-defined data type.
o Remove the constraint from a column or user-defined data type by unbinding a SQL Server rule.
o Remove a SQL Server rule definition from a SQL Server database.
o Generate a Transact-SQL script to create the rule represented by the object.
Defaults:
You can manage default settings of the current database.
Creates an object called a default. When bound to a column or a user-defined data type, a default specifies a value to be inserted into the column to which the object is bound (or into all columns, in the case of a user-defined data type) when no value is explicitly supplied during an insert. Defaults, a backward compatibility feature, perform some of the same functions as default definitions created using the DEFAULT keyword of ALTER or CREATE TABLE statements. Default definitions are the preferred, standard way to restrict column data because the definition is stored with the table and automatically dropped when the table is dropped. A default is beneficial, however, when the default is used multiple times for multiple columns.
SQL Query:
You can type any SQL query in the text area in SQL Query table. The SQL query will run immediately.