Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

I Want Execute This T_SQL And Have Problems What Should I DO ?

$
0
0

-- Batch submitted through debugger: SQLQuery1.sql|0|0|C:\Users\Sahel\AppData\Local\Temp\~vsC87D.sql
create  proc [dbo].[sp_create_database]
@DBname varchar(10),
@Filename varchar(max),
@ERROR VARCHAR(MAX) output
AS
BEGIN TRY
IF db_id(@DBname) is  null
CREATE DATABASE [@DBname]
On(Name= [@DBname + '_Data'],FileName=[@Filename],Size = 3mb,MAXSIZE = UNLIMITED)
LOG 
ON(Name = [@DBname + '_Log'],FileName=[@Filename + '.Ldf'] ,Size=1MB ,MAXSIZE=UNLIMITED)
Else
set @ERROR = (N'DataBase Exists_Please Change The Name Of Database')
return 0
END TRY
BEGIN CATCH
SET @ERROR = ERROR_MESSAGE()
RETURN 1
END CATCH

It's NOt Work Help Me PLZ ???


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>