hi,
this is how i call my files
sqlcmd -S LA -U sa -P ppp -i "D:\r1.sql"
but i want to call like following ( like i call stored procedure)
sqlcmd -S LA -U sa -P ppp -Q "use srdb EXEC abc
q1) in first way i have to write database name in r1.sql on each server.
where as in second way use databse is written in .bat file i need that kind of calling , and for that i have to convert all my scripts like r1.sql to stored procedure , so pls tell me is there any way that i can call r1.sql with out putting databse name inside on diffrent server.
yours sincerely