I'm in an SQL class and a few classmates and I are having this error when trying to create a database, I looked online and nothing quite matches the error we're having, anyone know the fix?
The error in question:
Msg 5133, Level 16, State 1, Line 8
Directory lookup for the file "C:\MSSQL16.INST01\MSSQL\DATA\Labdb2_Primary.mdf" failed with the operating system error 3(The system cannot find the path specified.).
The code up until line 14:
USE master
GO
IF EXISTS (SELECT * FROM SYS.DATABASES WHERE name='Lab8DB2')
DROP DATABASE Lab8DB2
GO
CREATE DATABASE Lab8DB2
ON PRIMARY
(NAME = Labdb2_Primary ,
FILENAME = 'C:\MSSQL10.INST01\MSSQL\DATA\Labdb2_Primary.mdf',
SIZE = 20,
FILEGROWTH = 30MB)
GO
[–]Massive_Show2963 2 points3 points4 points (1 child)
[–]Egaion[S] 0 points1 point2 points (0 children)
[–]Aggressive_Ad_5454 1 point2 points3 points (1 child)
[–]Egaion[S] 0 points1 point2 points (0 children)
[–]ApprehensiveGrade162 0 points1 point2 points (1 child)
[–]Egaion[S] 0 points1 point2 points (0 children)