Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Referencing files in a project...

Author  Topic 

malachi151
Posting Yak Master

152 Posts

Posted - 2011-04-19 : 12:56:36
I'd like to be able to organize a set of scripts that are used to create a databse into multiple separate files instead of having it all in one big script (this set of scripts created dozens of tables and indexes, and hundreds of stored procedures and functions)

Is there an easy way where I can create all of the scroted procedures and fucntions in separate files, but have a master script load and run each of these files?

Also, this needs to be flexible enough that these files (all of which are under a single project/solution) can be checked into source control and checked out by someone else with a different folder structure, etc. and it would all still work, in other words, not using hard coded file paths.

Lamprey
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2011-04-19 : 13:31:24
What tools do you have available? I'm not sure what you are using for source control, but Visual Studio has database projects that you can use to reverse engineer your database into a project of files and check into source control.
Go to Top of Page

malachi151
Posting Yak Master

152 Posts

Posted - 2011-04-19 : 13:33:02
quote:
Originally posted by Lamprey

What tools do you have available? I'm not sure what you are using for source control, but Visual Studio has database projects that you can use to reverse engineer your database into a project of files and check into source control.



Subversion. But regardless of the version control, I was just hoping there was a way to do this with relative paths instead of having to supply the full path.
Go to Top of Page
   

- Advertisement -