{"type":"rich","blog_title":"\u3042\u304a\u304d\u306eTech\u30e1\u30e2","image_url":null,"author_name":"aoki1210","version":"1.0","title":"PowerShell\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3067SQL Server 2008\u306eDB\u306e\u30c7\u30bf\u30c3\u30c1\u3068\u30a2\u30bf\u30c3\u30c1","blog_url":"https://aoki1210.hatenablog.jp/","url":"https://aoki1210.hatenablog.jp/entry/20101222/p1","height":"190","provider_name":"Hatena Blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Faoki1210.hatenablog.jp%2Fentry%2F20101222%2Fp1\" title=\"PowerShell\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3067SQL Server 2008\u306eDB\u306e\u30c7\u30bf\u30c3\u30c1\u3068\u30a2\u30bf\u30c3\u30c1 - \u3042\u304a\u304d\u306eTech\u30e1\u30e2\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_url":"https://blog.hatena.ne.jp/aoki1210/","published":"2010-12-22 00:00:00","categories":["db"],"provider_url":"https://hatena.blog","width":"100%","description":"SQL Server\u306eDB\u3092\u30c7\u30bf\u30c3\u30c1\u3057\u3066\u30a2\u30bf\u30c3\u30c1\u3059\u308bPowerShell\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u30e1\u30e2\u3067\u3059\u3002 DetachAttach.ps1 #PowerShell\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u547c\u3073\u51fa\u305b\u308b\u3088\u3046\u306b\u3001\u4e8b\u524d\u306b\u300cSet-ExecutionPolicy RemoteSigned\u300d\u30b3\u30de\u30f3\u30c9\u3092\u547c\u3073\u51fa\u3057\u3066\u304a\u304f ###\u8a2d\u5b9a\u3092\u5909\u6570\u5b9a\u7fa9 $serverInstance = \"localhost\\sqlexpress\" #$filePath = \"C:\\hoge\\database\" $filePath = (Get-Location).Path $dbName = \"NorthWind\" $dataFile = \"NorthWin\u2026"}