Microsoft
Software
Hardware
Network
Question : SQL 2005 express. Creating tables from a script
I am using SQL 2005 Express
I am trying to create a database complete with tables and data from pre prepared scripts.
(I have used these scripts previously so I am sure they are working OK).
I created the database successfully once but then had to delete it.
After creating a new database in Server Management Studio Express,
I open up the script file to create the database tables but when this is executed I am getting many messages such as
Msg 2714, Level 16, State 6, Line 1
There is already an object named 'Nop_CustomerRole_Discount
_Mapping' in the database.
Msg 2714, Level 16, State 3, Procedure Nop_ShippingMethodDelete, Line 8
There is already an object named 'Nop_ShippingMethodDelete'
in the database.
Msg 2714, Level 16, State 6, Line 1
There is already an object named 'Nop_ShippingMethod' in the database.
I have deleted the original database in Server Management Studio Express also in
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data
Can there be another copy of the database existing somewhere?
Thanks John
Answer : SQL 2005 express. Creating tables from a script
here is what you need to do. in management studio, go to tools, options. on the left, select Scripting. In the options to the right, select "Include If Not Exists", and make that option "true"...then rescript your objects.
Random Solutions
vba code to go to a clear the content of a text box and move cursor to that text box
How to speed up VBA Code ADODB Recordset updates
Folders being created - Outlook Calendar, Outlook Contacts
New install of Server 2K3: No Network Adapter to Connect to Internet
SBS 2003 drops *most* Internet connections every three hours
IF EXISTS versus IF NOT EXISTS problem.
How do I access my BIOS?
C# ASP.NET Clear TextBox on UserControl
Can a Lookup column be used in a calculated column
ChDir that chooses a directory in the same parent directory as the current one