SQL Server 2019 Express
In SSMS, in Object Explorer, I right-click on a database I createdcalled CIM and select :
- Script Database As > CREATE To > New Query Editor Window
It does not take long to receive the following error message:
-----------------------------------------------------------------------------------------------------------------
TITLE: Microsoft SQL Server Management Studio
------------------------------
------------------------------
Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc)
For help, click: https://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&LinkId=20476
------------------------------
ADDITIONAL INFORMATION:
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
The connection is broken and recovery is not possible. The client driver attempted to recover the connection one or more times and all attempts failed. Increase the value of ConnectRetryCount to increase the number of recovery
attempts. (Microsoft SQL Server, Error: 0)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=0&LinkId=20476
------------------------------
Cannot open database "CIM" requested by the login. The login failed.
Login failed for user 'XPS8930\roger'. (Microsoft SQL Server, Error: 4060)
Login failed for user 'XPS8930\roger'. (Microsoft SQL Server, Error: 4060)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=4060&LinkId=20476
------------------------------
BUTTONS:
BUTTONS:
OK
------------------------------
------------------------------
Any ideas what is it I am doing wrong?