Powershell检索模式 [英] Powershell retrieving schemas
本文介绍了Powershell检索模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这可能很简单..但是因为我是PowerShell处理sql脚本的新手,所以我在这里提出一个问题..
连接到一个数据库如何检索该特定数据库中列出的所有模式?任何人都可以提供一个实现此目的的示例脚本吗?
谢谢...
This may be simple enough..But since I am new to powershell handling sql script,I am here with a question..
After getting connected to a database how can we retrieve all the schema's listed in that particular database? Can anyone provide me a sample script of achieving this??
Thanks...
推荐答案
TSQL结尾,其中database是将要架构的数据库名称:
The TSQL end of this, where "database" is the name of database where would-be schemata reside:
USE [database]
SELECT * FROM INFROMATION_SCHEMA.SCHEMATA
假设powershell前端可能会利用BCP?我不知道。
Presumeably the powershell frontend might leverage BCP? I don't know.
这篇关于Powershell检索模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文