Path: csiph.com!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Erland Sommarskog Newsgroups: comp.databases.ms-sqlserver Subject: Re: 'Import' scripted DB ? Date: Sat, 16 Aug 2014 21:42:39 +0200 Organization: Erland Sommarskog Lines: 36 Message-ID: References: <53eee78b$0$23648$edfadb0f@dtext02.news.tele.dk> <53ef9675$0$23649$edfadb0f@dtext02.news.tele.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Injection-Info: mx05.eternal-september.org; posting-host="944e8a95b2bfa5abbf0e792f87734688"; logging-data="14529"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18RCHkfPWtjZn07veXEx5F+" User-Agent: Xnews/2006.08.24 Mime-proxy/2.1.c.0 (Win32) Cancel-Lock: sha1:BYxAw/m/sW3n90EwPouMBof0n50= Xref: csiph.com comp.databases.ms-sqlserver:1790 Mads Aggerholm (mads001@xxxxxhotmail.com) writes: > That's beyound my influence. It's for some customer, who will not upgrade. Idiots! >>> On the internet i forund this: >>> sqlcmd -S xxx.xxx.xxx.xxx -i C:\SQLFOLDER\database.sql -o >>> >>> Unfortunately, it does not work. > > First, it says: "Sqlcmd: '-o': Missing argument. Enter '-?' for help." Yes, -o takes an argument. This option redirects the output to a file. > Then I type '-?', and get the message: "'-?' is not regoqnized as an > internal or external command, operable program or batch file." You are supposed to type sqlcmd -? You can also find information about the command options to SQLCMD in Books Online. > Well, I ommit the '-o' and tries without it: > > If waits for some seconds, then says: > "HResult 0x2, Level 16, State 1 Named Pipes Provider: Could not open a > connection to SQL Server [2]. So you did not specify the name of the instance correctly. This is no different from how you do it in SSMS. It has nothing to do with the size of your scripts. -- Erland Sommarskog, Stockholm, esquel@sommarskog.se