Database creation
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu với start.ps1 quanh dòng 41 và đường dẫn khởi động attach_dbs; kiểm tra cách Invoke-Sqlcmd xử lý lệnh attach được tạo ra. Tái hiện lệnh container Windows được cung cấp và xác định hành vi mong đợi khi cơ sở dữ liệu không tồn tại. Hoàn tất có nghĩa là hành vi khởi động đã được giải quyết hoặc được ghi lại rõ ràng cho trường hợp được báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi,
Should the container create the specified database during startup if it does not exist. I'm running this:
docker run --ip 172.16.13.30 --net MyNatNetwork -p 1433:1433 -v C:/temp/:C:/temp/ --env attach_dbs="[{'dbName':'test','dbFiles':['C:\\temp\\test.mdf','C:\\temp\\test_log.ldf']}]" microsoft/mssql-server-2016-express-windows
However this throws the following error:
VERBOSE: Starting SQL Server
VERBOSE: Attaching 1 database(s)
VERBOSE: Invoke-Sqlcmd -Query sp_detach_db test;CREATE DATABASE test ON (FILENAME
= N'C:\temp\test.mdf'),(FILENAME = N'C:\temp\test_log.ldf') FOR ATTACH ;
-ServerInstance '.\SQLEXPRESS'
Invoke-Sqlcmd : The database 'test' does not exist. Supply a valid database
name. To see available databases, use sys.databases.
Unable to open the physical file "C:\temp\test.mdf". Operating system error 2:
"2(The system cannot find the file specified.)".
CREATE DATABASE failed. Some file names listed could not be created. Check
related errors.
At C:\start.ps1:41 char:3
+ Invoke-Sqlcmd -Query $sqlcmd -ServerInstance ".\SQLEXPRESS"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Invoke-Sqlcmd], SqlPowerS
hellSqlExecutionException
+ FullyQualifiedErrorId : SqlError,Microsoft.SqlServer.Management.PowerShe
ll.GetScriptCommand
- Ngôn ngữ chính
- PowerShell
- Star
- 11.2k
- Fork
- 9.1k
- Merge trung bình
- 2 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 14
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/sql-server-samples
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
microsoft/sql-server-samples#1499 ·
-
Link http://go.microsoft.com/fwlink/?LinkID=800630 for wide-world-importers-release is broken Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 76/100
microsoft/sql-server-samples#1495 · 3 reaction ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
microsoft/sql-server-samples#1341 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 64/100
microsoft/sql-server-samples#276 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 35/100
microsoft/sql-server-samples#1497 ·
Tất cả issue của microsoft/sql-server-samples
Issue tương tự
-
[6.x]: "Cannot use object of type stdClass as array" loading Users index (regression of #19182) Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
[InvoiceShelf] No database info Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
community-scripts/ProxmoxVE#17396 · 1 bình luận ·
-
bug possible-duplicate
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
AOSSIE-Org/PictoPy#1553 · 4 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
BasedHardware/omi#15274 · 3 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100