interactive: dotnet interactive notebook cannot create sql connection
Describe the bug
Please provide as much information as you can.
Please complete the following:
Which version of .NET Interactive are you using? (In a notebook, run the #!about magic command. ):
- OS
- Windows 11
- Windows 10
- macOS
- Linux (Please specify distro)
- iOS
- Android
- Browser
- Chrome
- Edge
- Firefox
- Safari
- Frontend
- Jupyter Notebook
- Jupyter Lab
- nteract
- Visual Studio Code
- Visual Studio Code Insiders
- Visual Studio
- Other (please specify) Azure Data Studio.
Screenshots
If applicable, add screenshots to help explain your problem. Type: Bug
I run this code block
#r "nuget:Microsoft.DotNet.Interactive.SqlServer,*-*"
which returns back this message
Installed Packages
Microsoft.DotNet.Interactive.SqlServer, 1.0.0-beta.22606.2
Loading extensions from `/Users/Chris.Lumnah/.nuget/packages/microsoft.dotnet.interactive.sqlserver/1.0.0-beta.22606.2/interactive-extensions/dotnet/Microsoft.DotNet.Interactive.SqlServer.dll`
Query Microsoft SQL Server databases.
This extension adds support for connecting to Microsoft SQL Server databases using the #!connect mssql magic command. For more information, run a cell using the #!sql magic command.
This appears to work ok, so the next step would be to create a connection via this line
#!connect mssql --kernel-name TPCCDemo "Persist Security Info=False; Integrated Security=true; Initial Catalog=tpcc_2000gb; Server=sql1.domain.com;"
This returns back an error
Error: System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'MicrosoftSqlToolsServiceLayer' with working directory '/Users/Chris.Lumnah/Downloads/Rubrik Demos/Object Level Recovery'. No such file or directory
at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
at Microsoft.DotNet.Interactive.SqlServer.ToolsServiceClient.StartSqlToolsService()
at Microsoft.DotNet.Interactive.SqlServer.ToolsServiceClient.Initialize()
at Microsoft.DotNet.Interactive.SqlServer.ToolsServiceKernel..ctor(String name, ToolsServiceClient client, String languageName)
at Microsoft.DotNet.Interactive.SqlServer.MsSqlKernel..ctor(String name, String connectionString, ToolsServiceClient client)
at Microsoft.DotNet.Interactive.SqlServer.MsSqlKernelConnector.CreateKernelAsync(String kernelName)
at Microsoft.DotNet.Interactive.SqlServer.ConnectMsSqlCommand.ConnectKernelAsync(KernelInvocationContext context, InvocationContext commandLineContext)
at Microsoft.DotNet.Interactive.CompositeKernel.<>c__DisplayClass26_0.<<AddKernelConnector>b__0>d.MoveNext() in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive\CompositeKernel.cs:line 329
--- End of stack trace from previous location ---
at System.CommandLine.NamingConventionBinder.CommandHandler.GetExitCodeAsync(Object returnValue, InvocationContext context)
at System.CommandLine.NamingConventionBinder.ModelBindingCommandHandler.InvokeAsync(InvocationContext context)
at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass15_0.<<AddMiddleware>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass19_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Invocation.InvocationPipeline.<InvokeAsync>g__FullInvocationChainAsync|2_0(InvocationContext context)
at System.CommandLine.Parsing.ParseResultExtensions.InvokeAsync(ParseResult parseResult, IConsole console)
at Microsoft.DotNet.Interactive.Commands.DirectiveCommand.InvokeAsync(KernelInvocationContext context) in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive\Commands\DirectiveCommand.cs:line 34
at Microsoft.DotNet.Interactive.Kernel.HandleAsync(KernelCommand command, KernelInvocationContext context) in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive\Kernel.cs:line 325
at Microsoft.DotNet.Interactive.KernelCommandPipeline.<BuildPipeline>b__6_0(KernelCommand command, KernelInvocationContext context, KernelPipelineContinuation _) in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive\KernelCommandPipeline.cs:line 60
at Microsoft.DotNet.Interactive.KernelCommandPipeline.<>c__DisplayClass6_1.<<BuildPipeline>b__3>d.MoveNext() in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive\KernelCommandPipeline.cs:line 75
--- End of stack trace from previous location ---
at Microsoft.DotNet.Interactive.CompositeKernel.LoadExtensions(KernelCommand command, KernelInvocationContext context, KernelPipelineContinuation next) in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive\CompositeKernel.cs:line 130
at Microsoft.DotNet.Interactive.KernelCommandPipeline.<>c__DisplayClass6_0.<<BuildPipeline>g__Combine|2>d.MoveNext() in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive\KernelCommandPipeline.cs:line 73
--- End of stack trace from previous location ---
at Microsoft.DotNet.Interactive.KernelCommandPipeline.SendAsync(KernelCommand command, KernelInvocationContext context) in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive\KernelCommandPipeline.cs:line 41
VS Code version: Code 1.74.1 (Universal) (1ad8d514439d5077d2b0b7ee64d2ce82a9308e5a, 2022-12-14T10:33:40.793Z) OS version: Darwin x64 22.1.0 Modes: Sandboxed: No
System Info
| Item | Value |
|---|---|
| CPUs | Intel® Core™ i5-1038NG7 CPU @ 2.00GHz (8 x 2000) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled metal: disabled_off multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_renderer: enabled_on video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: disabled_off |
| Load (avg) | 4, 4, 5 |
| Memory (System) | 16.00GB (4.31GB free) |
| Process Argv | –crash-reporter-id 0b19a0f4-14a7-40b9-8900-1b55f5d0febc |
| Screen Reader | no |
| VM | 0% |
Extensions (15)
| Extension | Author (truncated) | Version |
|---|---|---|
| vscode-pull-request-github | Git | 0.56.0 |
| vscode-graphql | Gra | 0.8.4 |
| vscode-graphql-syntax | Gra | 1.0.5 |
| vscode-edit-csv | jan | 0.7.2 |
| dotnet-interactive-vscode | ms- | 1.0.3611020 |
| jupyter | ms- | 2022.11.1003412109 |
| jupyter-keymap | ms- | 1.0.0 |
| jupyter-renderers | ms- | 1.0.12 |
| vscode-jupyter-cell-tags | ms- | 0.1.6 |
| vscode-jupyter-slideshow | ms- | 0.1.5 |
| remote-containers | ms- | 0.266.1 |
| remote-ssh | ms- | 0.94.0 |
| remote-ssh-edit | ms- | 0.84.0 |
| powershell | ms- | 2022.12.1 |
| remote-explorer | ms- | 0.0.3 |
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vsdfh931:30280409
vshan820:30294714
vstes263cf:30335440
vscoreces:30445986
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593:30376534
pythonvs932:30410667
cppdebug:30492333
vscaac:30438847
vsclangdf:30486550
c4g48928:30535728
dsvsc012cf:30540253
azure-dev_surveyone:30548225
pyindex848:30577860
nodejswelcome1:30587005
3biah626:30602489
gswce1:30612156
iaj6b796:30613358
89544117:30613380
fim-prod:30623723
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 16 (7 by maintainers)
Don’t worry about it. I was able to get a repro for this.
Sorry for the late reply, I took some time off during the holiday.
This is on Windows 11
#r "nuget:Microsoft.DotNet.Interactive.SqlServer,*-*"ReturnsNext Cell is