Code Monkey home page Code Monkey logo

Comments (4)

stuartpa avatar stuartpa commented on July 4, 2024 1

It would be great to fix this. Is it something we need to fix in the underlying go-mssqldb driver?

from go-sqlcmd.

stuartpa avatar stuartpa commented on July 4, 2024 1
C:\Program Files\Microsoft SQL Server\150\Tools\Binn>SqlLocalDB.exe info MSSQLLocalDB
Name:               MSSQLLocalDb
Version:            15.0.4153.1
Shared name:
Owner:              REDMOND\******
Auto-create:        Yes
State:              Running
Last start time:    24/10/2023 06:15:04
Instance pipe name: np:\\.\pipe\LOCALDB#4B62CD62\tsql\query

C:\>sqlcmd -S np:\\.\pipe\LOCALDB#4B62CD62\tsql\query
Access is denied.
Access is denied.

C:\>"C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\SQLCMD.EXE" -S np:\\.\pipe\LOCALDB#4B62CD62\tsql\query
1>

I get "Access Denied" when using the correct np (obtained from SqlLocalDB.exe) with go-sqlcmd. It works fine with the ODBC version.

from go-sqlcmd.

shueybubbles avatar shueybubbles commented on July 4, 2024

I don't know if it needs to be in the driver. I think there's some logic needed to calculate the right pipe name to connect to.
We'd probably only support automatic instances that are started externally.
The documentation shows how you may be able to connect using go-sqlcmd today by doing the pipe name calculation yourself.

eg np:\\.\pipe\LOCALDB#F365A78E\tsql\query

from go-sqlcmd.

willsbctm avatar willsbctm commented on July 4, 2024

I had to uninstall the sqlcmd go version and use sqlcmd ODBC version =(

That's the solution (not good) that I found.

from go-sqlcmd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.