SQLCMD no working n SQL 2014 Clster Server

SQL 2014 Enterprise Cluster
Windows2012 R2 Cluster Servers

Cannot get sqlcmd to run

PS C:\Windows\system32> sqlcmd  -d master -Q "EXECUTE dbo.DatabaseBackup @Databases  =  'Master',  @Directory  =  'F:\SQL-BackupData\',  @BackupType  =  'FULL',  @Verify = 'Y',  @CleanupTime  =  672" -b >>$LogFolder\$LogFile

sqlcmd : Sqlcmd: Error: Microsoft ODBC Driver 11 for SQL Server : Named Pipes Provider: Could not open a connection to SQL Server [2]. .
At line:1 char:1
+ sqlcmd  -d master -Q "EXECUTE dbo.DatabaseBackup @Databases  =  'Mast ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Sqlcmd: Error: ...L Server [2]. .:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
Sqlcmd: Error: Microsoft ODBC Driver 11 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 11 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server
is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books

That is running on the SQL Cluster server

From my windows 10 computer
Microsoft Windows [Version 10.0.16299.371]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>sqlcmd -S tgcs014-n1-sqlc -E
1> use {master}
2> go
Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : Syntax error, permission violation, or other nonspecific error.
1>


Any thoughts

Tom
LVL 23
Thomas GrassiSystems AdministratorAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bharat BhushanSolution ManagerCommented:
Hi Thomas,

Temporarily disable Windows Firewall and test your SQL script once more.
0
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
In your client connect attempt, remove the curly braces.
0
Thomas GrassiSystems AdministratorAuthor Commented:
Thanks guys

Removing the curly braces worked from the client


Microsoft Windows [Version 10.0.16299.371]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>sqlcmd -S tgcs014-n1-sqlc -E
1> use master
2> go
Changed database context to 'master'.
1>


I also tried hat on my SQL Server and it worked

So the question now is why does this command not work from my SQL Server

sqlcmd  -d master -Q "EXECUTE dbo.DatabaseBackup @Databases  =  'Master',  @Directory  =  'F:\SQL-BackupData\',  @BackupType  =  'FULL',  @Verify = 'Y',  @CleanupTime  =  672" -b >>$LogFolder\$LogFile
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Vitor MontalvãoMSSQL Senior EngineerCommented:
You're missing the server (-S) and the credential (-E) parameters:
sqlcmd   -S tgcs014-n1-sqlc -E -d master -Q "EXECUTE dbo.DatabaseBackup @Databases  =  'Master',  @Directory  =  'F:\SQL-BackupData\',  @BackupType  =  'FULL',  @Verify = 'Y',  @CleanupTime  =  672" -b >>$LogFolder\$LogFile
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
On the server you should not need to provide a server name or -E. Is the result of sqlcmd -L showing (local) and/or the server name?
0
Thomas GrassiSystems AdministratorAuthor Commented:
ADDing the -S tgcs014-n1-sqlc -E  worked

Just strange that I need to add that when running from the sql server itself.

Thanks for all the help
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
SQL

From novice to tech pro — start learning today.