Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 sqlcmd cant execute

Author  Topic 

amirullail
Starting Member

11 Posts

Posted - 2009-08-06 : 02:43:48
Hi All
Can someone verified me, what is wrong with this syntax :

sqlcmd -S\\.\pipe\$$\SQLCLUSTER\sql\query -E -i"Y:\SQLBackupScript\dbp_db.sql"

I try to run those line from RUN utility. But it giving me below error :

Msg 18456, Level 14, State 1, Server SQLCLUSTER, Line 1
Login failed for user 'DBPMAIN\clusteradmin'.

Then, when i run this syntax :
sqlcmd -S\\.\pipe\sql\query -E -i"Y:\SQLBackupScript\dbp_db.sql"

i receive this error :
HResult 0x2, Level 16, State 1
Named Pipes Provider: Could not open a connection to SQL Server [2].
Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : A network-related or in
stance-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 i
f SQL Server is configured to allow remote connections. For more information see
SQL Server Books Online..
Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : Login timeout expired.

Can somebody advice me on this?? This is MS SQL Server 08 (2 nodes) in cluster environment

amirullail
Starting Member

11 Posts

Posted - 2009-08-07 : 00:59:14
Hi All
To those who are reading this, i have found a very simple syntax in ms sql 08 cluster environment

just use this syntax, then i can batch those syntax to be run in sqlcmd in batch file.

in batch file, i'm using this syntax :

sqlcmd -S SQLCLUSTER -i"Y:\SQLBackupScript\dbp_db.sql" -U sa -P password

Then i put those batch script to be executed in Scheduled Task and it's working fine. My MS SQL 08 Database are automatically backup daily

Go to Top of Page
   

- Advertisement -