When using asp + Sql Server 2000 website, if you modify the instance name, or if you have multiple instances and want to use one of them, you can use the following method
DataServer = [ip address/computer name]/[instance name] Feifei Asp Technology, Technology Paradise
-------------------------------------------------- -
Link to SQL Server 2000 Multiple Instances:
For example:
Computer name: ComputerName
Computer IP: 192..168.1.1
Instance name of Sql Server 2000: SQLSERVER2000
Database name: test_db
Database user: sa
Database password: test
<%
dim conn
dimdb,dbpath
dbpath=driver={SQL Server};Server=ComputerName/SQLSERVER2000;DataBase=test_db;Uid=sa;Pwd=test
response.write dbpath&<br>
Set conn = Server.CreateObject(ADODB.Connection)
'conn.Properties(Connect Timeout) = 30 'in seconds
conn.Open dbpath
response.write link successful!
conn.close
set conn=Nothing
%>
How to create multiple sql server2000 servers on one machine
This situation is called adding an instance
To add an instance, you must execute the sql server installation program to install it.
There can only be one default instance on a computer, and the name of the connection is the computer name
There can be multiple named instances. The name of the connection is the computer name/instance name.
The SQL Server installation program will prompt you to choose between installing a default instance or a named instance. If you install a named instance, you will be asked to specify the instance name.
are multiple instances
Specify the instance name when installing with the SQL installer
Default instance (./machinename/IP)
When there are multiple instances, specify the instance (format: machine name (IP)/instance name)