Brian R.

Hi,

I'm having a problem importing a script using DB Pro. I have a script that contains 4 alter table statements that add unique constraints to 4 tables. When I run through the import script wizard, it tells me that it succeeded, but the constraints are not added to my project. I also changed the script to create indexes on the tables and tried importing it to no avail. I'm running SR1 and I've checked the "scriptIgnoredOnImport" file, but there's nothing there. Has anyone else experienced this Any help would be greatly appreciated!




Re: Visual Studio Team System - Database Professionals Script Import

Sachin KUMAR - MSFT

Brian,

To test your scenario, I created a default table in a sql 2000 project,

CREATE TABLE [dbo].[Table1]
(
column_1 int NOT NULL,
column_2 int NULL
)

and than used the following simple script to import to the project.

ALTER TABLE [dbo].[Table1]
ADD CONSTRAINT [Constraint1] UNIQUE CLUSTERED
(column_1)

But I did not have any problem and I could see the above under 'Keys' folder under table1 in Schema view.

Can you see if you can import the above script successfully, and if you can simplify your script and still repro the problem, and tell us how your script is different from the one I used, so that we can repro the problem at our end.

- Sachin Kumar (MSFT)





Re: Visual Studio Team System - Database Professionals Script Import

Brian R.

Sachin,

Thanks for your quick reply. I was able to recreate your sample code and the import worked. I was actually able to get the import into my "real" development project to work this morning. It had been acting like there was nothing there to import, but this morning it moved my statements into the "Scripts ignored on import" file, saying they were already there. I ran the import again and told it to overwrite existing objects and bingo, it worked. I think I may have had something out of sync because I had to drop and let VS recreate my design time validation database this morning too. If you'd like to discuss this further with me, please post a reply here or e-mail me offline.

Thanks again!

Brian






Re: Visual Studio Team System - Database Professionals Script Import

Sachin KUMAR - MSFT

I am glad it worked.

If you have any other concerns such that what you breifly mentioned above, I would recommend opening a new thread with new title. That way, more people can notice it. Please give as much detail and concrete information as you can give.