CS3D661 Project: Resolving Database Connectivity Problems

Verified

Added on  2023/04/23

|16
|405
|479
Project
AI Summary
This document provides a comprehensive guide to troubleshooting database connection issues, specifically focusing on SQL Server. It outlines three primary options for resolving connectivity problems. Option 1 involves verifying and creating the database connection string within Visual Studio's Server Explorer. Option 2 details the steps to allow remote server connections by configuring TCP/IP settings in SQL Server Configuration Manager and ensuring the SQL Server service is running automatically. Option 3 provides instructions on setting and enabling the TCP/IP connection, including specifying the TCP Port and restarting the SQL Server service. This guide aims to assist users in resolving common database connection errors, ensuring seamless application functionality. Desklib provides solved assignments and past papers for students.
Document Page
Option 1: Check if the database connection string is created
1) Start your program on visual studio and check on the server explorer if “.\
sqlexpress.college.dbo” connection is created as below.
2) If the “.\sqlexpress.college.dbo” is not created create it as follows
i. Select the server explorer.
ii. Right click and add new connection.
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
iii. Select server name as “.\SQLEXPRESS” and select or enter the database name to
connect as “college” as below.
Document Page
iv. Test the connection by clicking the “Test connection” button.
Now connection is successful as above, click ok and ok button.
v. Now run the program and see if it will run successfully.
Document Page
Option 2: ALLOW SERVER REMOTE CONNECTION
1) Open Sql Server Configuration Manager --> SQL Server Network configuration --> Protocols for
<(INSTANCE)> --> TCP/IP (double click on it).
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
2) Select --> IP Addresses(Tab).
Document Page
3) Go to the last entry IP All and mention TCP Port 1433 click apply and ok.
Document Page
4) Open Sql Server Configuration Manager --> SQL Server Network configuration --
>SQL server services--> sql server (SQLEXPRESS)-->Right click --> Restart.
5) Press (Win KEY+R) and enter services.msc go to start -> enter Run-> Click RUN->and
enter services.msc then ok.
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
6) Select the standard tab and select SQL SERVER(SQLEXPRESS).
Document Page
7) Right click on the SQL server(SQLEXPRESS)->properties->start type-> select to be
automatic
Document Page
8) Click apply then ok
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
9) Now the SQL server (SQLEXPRESS) will be running automatically.
Document Page
Option 3 : SET AND ENABLE THE TCP/IP CONNECTION
i. Open "SQL Server Configuration Manager"
ii. Now Click on "SQL Server Network Configuration" and Click on "Protocols for Name"
iii. Right Click on "TCP/IP" (make sure it is Enabled) Click on Properties
chevron_up_icon
1 out of 16
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]