我在本地docker容器和sql-server上都有冒险工作。当我尝试访问冒险作品时,我只有3张桌子。 在Windows上它工作。 我使用DBeaver和DBvisualizer进行连接。 Screen-shot
已解决:在新版本的DBeaver中它已经解决,它是ms-sql驱动程序的一个错误。但是在DBvisualizer中,它仍然无法正常工作。
答案 0 :(得分:0)
我注意到在MacOS上使用jTDS驱动程序不会列出SQL Server数据库中的所有模式,所以我想这个问题也可以扩展到表。切换到MS JDBC驱动程序,看看是否能解决问题。
答案 1 :(得分:0)
使用此docker命令:
sudo docker exec -it sql1 /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'myStrongP@ssw0rd' -Q "select table_schema,table_name,table_type from AdventureWorks2012.Information_Schema.Tables order by table_type, table_schema, table_name" | tr -s ' '
这些是我得到的表格列表:
table_schema table_name table_type
-------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------- ----------
dbo AWBuildVersion BASE TABLE
dbo DatabaseLog BASE TABLE
dbo ErrorLog BASE TABLE
HumanResources Department BASE TABLE
HumanResources Employee BASE TABLE
HumanResources EmployeeDepartmentHistory BASE TABLE
HumanResources EmployeePayHistory BASE TABLE
HumanResources JobCandidate BASE TABLE
HumanResources Shift BASE TABLE
Person Address BASE TABLE
Person AddressType BASE TABLE
Person BusinessEntity BASE TABLE
Person BusinessEntityAddress BASE TABLE
Person BusinessEntityContact BASE TABLE
Person ContactType BASE TABLE
Person CountryRegion BASE TABLE
Person EmailAddress BASE TABLE
Person Password BASE TABLE
Person Person BASE TABLE
Person PersonPhone BASE TABLE
Person PhoneNumberType BASE TABLE
Person StateProvince BASE TABLE
Production BillOfMaterials BASE TABLE
Production Culture BASE TABLE
Production Document BASE TABLE
Production Illustration BASE TABLE
Production Location BASE TABLE
Production Product BASE TABLE
Production ProductCategory BASE TABLE
Production ProductCostHistory BASE TABLE
Production ProductDescription BASE TABLE
Production ProductDocument BASE TABLE
Production ProductInventory BASE TABLE
Production ProductListPriceHistory BASE TABLE
Production ProductModel BASE TABLE
Production ProductModelIllustration BASE TABLE
Production ProductModelProductDescriptionCulture BASE TABLE
Production ProductPhoto BASE TABLE
Production ProductProductPhoto BASE TABLE
Production ProductReview BASE TABLE
Production ProductSubcategory BASE TABLE
Production ScrapReason BASE TABLE
Production TransactionHistory BASE TABLE
Production TransactionHistoryArchive BASE TABLE
Production UnitMeasure BASE TABLE
Production WorkOrder BASE TABLE
Production WorkOrderRouting BASE TABLE
Purchasing ProductVendor BASE TABLE
Purchasing PurchaseOrderDetail BASE TABLE
Purchasing PurchaseOrderHeader BASE TABLE
Purchasing ShipMethod BASE TABLE
Purchasing Vendor BASE TABLE
Sales CountryRegionCurrency BASE TABLE
Sales CreditCard BASE TABLE
Sales Currency BASE TABLE
Sales CurrencyRate BASE TABLE
Sales Customer BASE TABLE
Sales PersonCreditCard BASE TABLE
Sales SalesOrderDetail BASE TABLE
Sales SalesOrderHeader BASE TABLE
Sales SalesOrderHeaderSalesReason BASE TABLE
Sales SalesPerson BASE TABLE
Sales SalesPersonQuotaHistory BASE TABLE
Sales SalesReason BASE TABLE
Sales SalesTaxRate BASE TABLE
Sales SalesTerritory BASE TABLE
Sales SalesTerritoryHistory BASE TABLE
Sales ShoppingCartItem BASE TABLE
Sales SpecialOffer BASE TABLE
Sales SpecialOfferProduct BASE TABLE
Sales Store BASE TABLE
HumanResources vEmployee VIEW
HumanResources vEmployeeDepartment VIEW
HumanResources vEmployeeDepartmentHistory VIEW
HumanResources vJobCandidate VIEW
HumanResources vJobCandidateEducation VIEW
HumanResources vJobCandidateEmployment VIEW
Person vAdditionalContactInfo VIEW
Person vStateProvinceCountryRegion VIEW
Production vProductAndDescription VIEW
Production vProductModelCatalogDescription VIEW
Production vProductModelInstructions VIEW
Purchasing vVendorWithAddresses VIEW
Purchasing vVendorWithContacts VIEW
Sales vIndividualCustomer VIEW
Sales vPersonDemographics VIEW
Sales vSalesPerson VIEW
Sales vSalesPersonSalesByFiscalYears VIEW
Sales vStoreWithAddresses VIEW
Sales vStoreWithContacts VIEW
Sales vStoreWithDemographics VIEW
所有表都在docker容器中,在其指定的模式下。
“我只需要大学的冒险工作。我怎样才能使用这些图书馆” 我不明白你的意思。上面列出表的docker命令是使用它的一种方法。您也可以使用sqlcmd shell在docker容器中运行它。也许你应该更好地解释你想做什么。 在Mac或Linux上的FWIW我会简单地使用像postgreSQL这样的东西。