﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2005 / Development  / Is there any way to create the database using stored procedure which includes design / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Tue, 21 May 2013 01:49:00 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Is there any way to create the database using stored procedure which includes design</title><link>http://www.sqlservercentral.com/Forums/Topic1411520-145-1.aspx</link><description>In its simplest form:[code="sql"]CREATE PROC dbo.createnewdb (@dbname SYSNAME)AS BEGIN    DECLARE @sql NVARCHAR(MAX) = N'CREATE DATABASE ' + QUOTENAME(@dbname);    EXEC(@sql);ENDGO[/code][code="sql"]EXEC dbo.createnewdb N'newdb';[/code]There are too many considerations to list here before creating a stored procedure like this and allowing folks to call it but something like I showed should get you started.</description><pubDate>Fri, 25 Jan 2013 07:37:39 GMT</pubDate><dc:creator>opc.three</dc:creator></item><item><title>RE: Is there any way to create the database using stored procedure which includes design</title><link>http://www.sqlservercentral.com/Forums/Topic1411520-145-1.aspx</link><description>We need to something to do with having a stored procedure that someone could execute that could create a new database on the instance?</description><pubDate>Fri, 25 Jan 2013 07:26:39 GMT</pubDate><dc:creator>sram24_mca</dc:creator></item><item><title>RE: Is there any way to create the database using stored procedure which includes design</title><link>http://www.sqlservercentral.com/Forums/Topic1411520-145-1.aspx</link><description>Are you asking whether you should design your database to only allow accessing data via stored procedures? Or something to do with having a stored procedure that someone could execute that could create a new database on the instance? Can you please clarify?</description><pubDate>Fri, 25 Jan 2013 07:08:08 GMT</pubDate><dc:creator>opc.three</dc:creator></item><item><title>Is there any way to create the database using stored procedure which includes design</title><link>http://www.sqlservercentral.com/Forums/Topic1411520-145-1.aspx</link><description>Hi,   Is there any way to create the database using stored procedure ? We want to create the database using stored procedure which is the best way to handle it?Regards,Ram.</description><pubDate>Fri, 25 Jan 2013 01:42:40 GMT</pubDate><dc:creator>sram24_mca</dc:creator></item></channel></rss>