mpradeep23
SSCommitted
Points: 1868
More actions
January 29, 2013 at 5:20 am
#288078
hi
i have script for database creation which i need to run from a stored procedure by passing dbname and paths
can one give me the syntax for that
thanks
pradeep
Ant-Green
SSC Guru
Points: 113507
January 29, 2013 at 5:32 am
#1582052
The same way you would run it via SSMS
SQLCMD -S server -E "EXEC dbo.CreateDatabase @DBName = 'DatabaseName', @DataPath = 'C:\data\Databasename.mdf', @LogPath = 'C:\log\Databasename.ldf'"
Orlando Colamatteo
Points: 182279
January 29, 2013 at 8:42 am
#1582176
Or using the -v option.
sqlcmd Utility (SQL Server 2005)
There are no special teachers of virtue, because virtue is taught by the whole community.--Plato
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply