Is it possible to have a stored procedure in one database that creates a new database "on the fly" based upon variables? I'm testing the following stored procedure, but I'm getting ERROR 2812.."stored procedure does not exist", even though it does exist. I have also tried fully-qualifying the stored proc by owner, etc. Any thoughts?

CREATE PROCEDURE sp_TestNewDB
@NewDBName varchar (50),
@NewDBFilePath varchar (150),
@NewDBLogName varchar (40),
@NewDBLogFilePath varchar (150)

AS
--Check to make sure that database doesn't already exist
IF EXISTS (SELECT name FROM master.dbo.sysdatabases WHERE name = N'@NewDBName')
--Return value of -1 if Database already exists and abort processing
RETURN -1
ELSE
BEGIN
--Create New Database
CREATE DATABASE [Northwind] ON (NAME = N'@NewDBName', FILENAME = N'@NewDBFilePath' ,
SIZE = 3, FILEGROWTH = 10%)
LOG ON (NAME = N'@NewDBLogName', FILENAME = N'@NewDBLogFilePath' ,
SIZE = 1, FILEGROWTH = 10%)

--If successful, return indicator of "1"

RETURN 1
END
GO

======

I'm trying to create a new database "on the fly" after a new user registers on a web site as part of their registration/set up. If anyone knows of another or better way to do this I would appreciate any input. Also, I'm doing this with ColdFusion MX...

Thanks!

Dina