Environment Setup: Install the management tool, SQL Server Management Studio (SSMS), and the database engine, SQL Server Configuration Manager.
Alias Configuration: Created a SQL Alias via cliconfg.exe to allow connection via a custom name rather than just the local instance name. Add the IP address as the Server alias and specify the IP and port number in the connection parameters, e.g., 192.168.0.1,1433.
SSMS Configuration:
Error Code | Message | Root Cause | Resolution
1225 | The server was not found or accessible | TCP/IP protocol was disabled and Port 1433 was not assigned. | Enabled TCP/IP in SQL Configuration Manager and set IPAll Port to 1433.
2 | The system cannot find the file specified | Attempting to connect to a default instance when a "Named Instance" (.\SQLEXPRESS) was installed. | Verified the service name in services.msc and used the correct instance path.
18456 | Login failed for user | Server was in "Windows Only" authentication mode. | Changed Server Properties to "SQL Server and Windows Authentication Mode" (Mixed Mode) and restarted the service.
4064 | Can't open user default database | The SQL user's default database was set to a DB that didn't exist or wasn't accessible yet. | Used SSMS Connection Options to manually specify the database name upon login.
4060 | Cannot open database requested by the login | Orphaned User: The Login SID on the new PC didn't match the User SID inside the restored DB. | Ran ALTER USER [DPS] WITH LOGIN = [DPS] to re-link the server login to the database user.
Configuration Checklist:
- Protocols: TCP/IP Enabled (Port 1433).
- Firewall: Inbound Rule created for TCP Port 1433.
- Authentication: Mixed Mode enabled.
- SQL Browser: Service started (to resolve named instance requests).
- User Mapping: User re-linked to the restored database and granted db_owner permissions.
No comments:
Post a Comment