The script pasted below was provided to us by our professor. He wants us to use this script to create a DB, but there is an issue. When I run this script. I get an error.
Msg 5133, Level 16, State 1, Line 4
Directory lookup for the file "C:\Program Files\Microsoft SQL Server\MSSQL15.SQLEXPRESS\MSSQL\DATA\WonderfulWheels.mdf" failed with the operating system error 3(The system cannot find the path specified.).
Msg 1802, Level 16, State 1, Line 4
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
I understood where the issue was, but I'm unable to solve it.
Code problem area:
CONTAINMENT = NONE ON PRIMARY ( NAME = N'WonderfulWheels', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL15.SQLEXPRESS\MSSQL\DATA\WonderWheels.mdf' , SIZE = 8192KB , MAXSIZE = UNLIMITED, FILEGROWTH = 65536KB ) LOG ON ( NAME = N'WonderfulWheels_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL15.SQLEXPRESS\MSSQL\DATA\WonderWheels_log.ldf' , SIZE = 8192KB , MAXSIZE = 2048GB , FILEGROWTH = 65536KB )
I don't have a similar file path as mentioned in this script, as I don't understand what these filenames are like. Do I need to generate that file path on my own? Some guidance, please.
In the SQL Server 2019 folder, I got two subfolders,
I looked around for solutions and did not understand any of them.