воскресенье, 25 мая 2025 г.

sqllocaldb, script, Example, Chad

SqlLocalDB, script, Example

https://ask.chadgpt.ru/share/9ef35e6e-d478-41e4-bc48-dc0762e9d5bd

PS C:\Users\Administrator> sqllocaldb i

MSSQLLocalDB

ProjectModels

PS C:\Users\Administrator> sqllocaldb info MSSQLLocalDB

Name:               mssqllocaldb

Version:            15.0.4382.1

Shared name:

Owner:              WIN-0EMQO515V3S\Administrator

Auto-create:        Yes

State:              Stopped

Last start time:    2025-05-26 00:34:13

Instance pipe name:

PS C:\Users\Administrator> sqlcmd

Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Named Pipes Provider: Could not open a connection to SQL Server [2]. .

Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Login timeout expired.

Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..

PS C:\Users\Administrator> where SqlLocalDB

PS C:\Users\Administrator> SqlLocalDB.exe i

MSSQLLocalDB

ProjectModels

PS C:\Users\Administrator> SqlLocalDB.exe info MSSQLLocalDB

Name:               mssqllocaldb

Version:            15.0.4382.1

Shared name:

Owner:              WIN-0EMQO515V3S\Administrator

Auto-create:        Yes

State:              Stopped

Last start time:    2025-05-26 00:34:13

Instance pipe name:

PS C:\Users\Administrator> SqlLocalDB.exe info ProjectModels

Name:               ProjectModels

Version:            15.0.4382.1

Shared name:

Owner:              WIN-0EMQO515V3S\Administrator

Auto-create:        No

State:              Running

Last start time:    2025-05-22 15:36:30

Instance pipe name: np:\\.\pipe\LOCALDB#8A103913\tsql\query

PS C:\Users\Administrator> SqlLocalDB.exe start MSSQLLocalDB

LocalDB instance "mssqllocaldb" started.

PS C:\Users\Administrator> SqlLocalDB.exe info MSSQLLocalDB

Name:               mssqllocaldb

Version:            15.0.4382.1

Shared name:

Owner:              WIN-0EMQO515V3S\Administrator

Auto-create:        Yes

State:              Running

Last start time:    2025-05-26 03:50:06

Instance pipe name: np:\\.\pipe\LOCALDB#B082AE7C\tsql\query

PS C:\Users\Administrator> SqlLocalDB create MyInstance

LocalDB instance "MyInstance" created with version 16.0.1000.6.

PS C:\Users\Administrator> SqlLocalDB start MyInstance

LocalDB instance "MyInstance" started.

PS C:\Users\Administrator> SqlLocalDB info MyInstance

Name:               MyInstance

Version:            16.0.1000.6

Shared name:

Owner:              WIN-0EMQO515V3S\Administrator

Auto-create:        No

State:              Running

Last start time:    2025-05-26 04:48:18

Instance pipe name: np:\\.\pipe\LOCALDB#F1D86785\tsql\query

PS C:\Users\Administrator> sqllocaldb i

MSSQLLocalDB

MyInstance

ProjectModels

PS C:\Users\Administrator> sqllocaldb info MyInstance

Name:               MyInstance

Version:            16.0.1000.6

Shared name:

Owner:              WIN-0EMQO515V3S\Administrator

Auto-create:        No

State:              Running

Last start time:    2025-05-26 04:54:58

Instance pipe name: np:\\.\pipe\LOCALDB#3A4424C4\tsql\query

PS C:\Users\Administrator>


Комментариев нет:

Отправить комментарий