| Connecting to Our SQL Server
SQL Server 7.0 is the industry standard high-performance,
reliable, scalable database solution for all of your Internet and e-business
needs. SQL support is only available for Developer Advanced plans or InstAccount
customers. There is a one-time $50 set up fee for a database, which is waived
for InstAccount customers.
A SQL database includes a 100MB database and a 20MB transaction
log. Any database over this size is $20 per month per 100 mb. You may also have a
full-text index set up for an additional $25 fee.
You only need to follow these instructions if you want to
directly connect to our SQL server from your SQL Enterprise Manager. To display
or update SQL database information on your website, you should use a DSN.
You have complete remote control of your database using familiar
Microsoft® management tools, and your SQL Server database is maintained and
monitored 24 hours a day by our staff of Microsoft® Certified engineers for 100%
reliability. You have enough things to worry about. The reliability and
performance of your data shouldn't be one of them.
Mavweb Hosting SQL Server FAQs
This page answers three commonly asked questions:
How do I set up my PC to connect to my SQL
Server database at Mavweb Hosting?
Setting up your PC to connect to your SQL Server database at
Mavweb Hosting is necessary before you can do anything else with your
SQL Server database from your PC. Please note that you must have already
installed the Client Connectivity portion of SQL Server 7.0 on your local
machine before continuing.
1) Make sure that you are connected to the Internet and have the
TCP/IP protocol enabled.
2) Run the Client Network Utility program, found in the
Microsoft® SQL Server 7.0 program group. If you do not have this program group,
then you have not installed at least the Client Connectivity portion of SQL
Server 7.0 on your local machine, which is necessary to connect to your SQL
Server database at SQL2.
3) Click the "Add..." button to add a new SQL Server entry.
Enter the settings in the screenshot below and click "OK".

4) Click "OK" again to exit the Client Network
Utility.
5) To test your connection to your SQL Server database at SQL2
from your PC, you should run the Query Analyzer, also found in the Microsoft®
SQL Server 7.0 program group, and perform the following steps:
a) In the "Connect to SQL Server" dialog box that appears,
select "SQL2" as the SQL Server to connect to. If SQL2 isn't listed in the
drop-down box, click the ellipse (...) button and select SQL2.
b) Select the "Use SQL Server authentication" connection option,
and enter your SQL Server username and password supplied to you by Mavweb
Hosting (see screenshot below). Click "OK" to connect to the Mavweb SQL Server
database.

c) After you're connected, enter the following query and click
the green arrow in the toolbar to execute it:
SELECT COUNT(*) FROM SYSCOLUMNS
The query should return a single number as a result, usually 391
for a new database. If you are able to successfully execute this query, then
you have verified your client connection to your database, as well as your SQL
Server username and password.
NOTE: If your connection to your SQL Server database
failed in step (b) above, verify that you entered the client network information
correctly in step (3) above. Also, verify that you are not trying to
connect to the Mavweb SQL Server database from behind a firewall. Many firewalls
by default do not allow TCP/IP traffic on port 1433, which is the default port
for SQL Server. If you are attempting to connect from work, or some other
location that may have a firewall installed, you may want to try connecting to
your Mavweb SQL Server database from your home, or some other location where you
are certain you are not behind a firewall. If you are still not able to
connect, and you are certain you have entered the client network information
correctly and you are not behind a firewall, please e-mail sql@Mavwebhosting.com for further
assistance.
How do I add my Mavweb database to my SQL
Server Enterprise Manager?
To administer your SQL Server database, you will most likely
want to use the SQL Server Enterprise Manager. This is installed in the
Microsoft® SQL Server 7.0 program group. If you do not see this option
available, you may need to re-install the SQL Server client on your machine,
making sure you select "Management Tools" under the options during
setup.
Follow these steps to add your Mavweb SQL Server database to
Enterprise Manager:
1) Verify that you able to successfully connect to you SQL
Server database by performing step (5) in the FAQ section "How do I set up my PC to connect to my SQL Server database at
Mavweb Hosting?"
2) Run the Enterprise Manager, located in the Microsoft® SQL
Server 7.0 program group.
3) Click the "Action" menu item and select "Add New SQL Server
Registration" to continue. You can also right-click on the "Microsoft® SQL
Servers" node on the server tree and select the same thing.
4) In the "Registered SQL Server Properties" dialog box that
appears, select "SQL2" as the Server to connect to. If SQL2 isn't listed in the
drop-down box, click the ellipse (...) button and select SQL2. Select the "Use
SQL Server authentication" connection option, and enter your SQL Server username
and password supplied to you by Mavweb Hosting (see screenshot below). Click
"OK" to register your Mavweb SQL Server database.

5) Once your Mavweb SQL Server database is registered, you will be
able to connect to the SQL Server and administer your database. Please note
that you will be able to see all databases on the SQL Server, but you will only
have permissions to view and modify your own database.
NOTE: When you connect to your SQL Server database with
Enterprise Manager, you may see a popup dialog box with the following: "The SQL
Server \\SQL2 is not know to be running. Do you wish to connect?" This is
displayed because Enterprise Manager does not attempt to verify the state of a
remote SQL Server registration before trying to connect. This does not cause
any problems, nor does it indicate an existing problem. Click "Yes" to continue
and you will be connected to your database.
What's the best way to transfer data that I
already have to my Mavweb Hosting SQL Server database?
If you have data you want to transfer to your new database, the
best way to do this is by using the "Import and Export Data" program, found in
the Microsoft® SQL Server 7.0 program group. This runs the Microsoft® Data
Transformation Services (DTS) Wizard, which will guide you step-by-step through
transferring your data to your SQL Server database at Mavweb. If you do not see
this option available, you may need to re-install the SQL Server client on your
machine, making sure you select "Management Tools" under the options during
setup.
While the DTS Wizard will transfer data from a large number of
formats to SQL Server, we recommend that you get your data in the format you
want it in either an Access database or a local SQL Server database before
transferring it to your Mavweb SQL Server database. This will help ensure that the
resulting database is in the format you expect.
A NOTE ABOUT THE MICROSOFT® ACCESS UPSIZING WIZARD: the upsizing
wizard has a number of known compatibility and scalability issues that make it
unreliable when transferring data over a slow (i.e. dial-up) connection, or
transferring large amounts of data, among other scenarios. The DTS Wizard is as
easy (if not easier) to use as the upsizing wizard, and works very well with SQL
Server 7.0 over a remote connection. Therefore, we do offer technical support
for problems transferring data with the DTS Wizard, but not for
transferring data with the Access upsizing wizard. If you are having problems
transferring data using the upsizing wizard, we strongly recommend using the DTS
Wizard.
Follow these steps to transfer data using the DTS
Wizard:
1) Verify that you able to successfully connect to you SQL
Server database by performing step (5) in the FAQ section "How do I set up my PC to connect to my SQL Server database at
Mavweb Hosting?"
2) Run the "Import and Export Data" program, located in the
Microsoft® SQL Server 7.0 program group.
3) Click "Next" from the introduction screen, and on the "Choose
a Data Source" screen, select the source where your data currently resides. The
screenshot below illustrates selecting the Northwind.mdb Access
database:

The options you will have to fill in will vary depending on the
data source type you select in the "Source" drop-down list box. For example,
you'd select the default "Microsoft® OLE DB Provider for SQL Server" if you were
transferring data from a local SQL Server.
4) Click "Next" to continue.
5) On the "Choose a Destination" screen, leave the default
"Microsoft® OLE DB Provider for SQL Server" as the source. Select "SQL2" for
the Server to copy data to. Select the "Use SQL Server authentication"
connection option, and enter your SQL Server username and password supplied to
you by Mavweb Hosting. Then click the "Refresh" button to retrieve a list of
databases from the Mavweb SQL Server, and select your database from the "Database"
drop-down list box. See the screenshot below for an example.

6) Click "Next" to continue.
7) On the "Specify Table Copy or Query" screen, select "Copy
table(s) from the source database" and click "Next" to continue.
8) If you see the "Select Source Tables" screen, you can specify
which tables you would like to copy to your Mavweb SQL Server. Unless you are an
expert user, leave the defaults for the "Destination Table" and "Transform"
columns. Click "Next" to continue.
9) On the "Save, Schedule, and Replicate Package" screen, leave
the default "Run Immediately" selection checked, and click "Next" to
continue.
10) Lastly, on the summary screen, review your selections and
click "Finish" to execute the data transfer.
How do I connect to my database from my ASP
scripts using a DSN?
To connect to your SQL database using a DSN, you'd do something
like the following. Be sure to replace DSNName with your DSN name, User ID with
your user name, and Password with your password. You must specify a UserID and
Password when using All of this information should be sent to you when you sign
up for a SQL Server database.
|
<%
Dim MyConn ' Connection Name Dim RS ' Recordset
Variable Dim SQL ' Variable for SQL statement
Set MyConn =
Server.CreateObject("ADODB.Connection") Set RS =
Server.CreateObject("ADODB.Recordset") MyConn.Open
"DSN=DSNName;UID=UserID;PWD=Password;"
SQL="Select fieldname1, fieldname2 From tablename "
|
|