首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法访问MacOS上的所有adventure表

无法访问MacOS上的所有adventure表
EN

Stack Overflow用户
提问于 2018-02-26 21:20:10
回答 2查看 626关注 0票数 0

我在本地码头容器和sql服务器上都有冒险作品。当我尝试访问冒险作品时,我只有3个表。在windows上,它可以正常工作。我使用DBeaver和DBvisualizer进行连接。Screen-shot

解决:在新版本的DBeaver中解决了这个问题,这是一个来自ms-sql驱动程序的错误。但在DBvisualizer中,它仍然不起作用。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2018-02-27 00:22:27

使用此docker命令:

代码语言:javascript
复制
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 ' '

下面是我得到的表列表:

代码语言:javascript
复制
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上,我会简单地使用像postgreSQL这样的东西。

票数 1
EN

Stack Overflow用户

发布于 2018-02-26 22:43:55

我注意到在MacOS上使用jTDS驱动程序不会列出SQL Server数据库中的所有模式,因此我认为这个问题也可能扩展到表。切换到MS JDBC驱动程序,看看是否可以修复问题。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48989543

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档