Solved

database source ddl

Posted on 2010-08-12
6
281 Views
Last Modified: 2012-05-10
Is the above term referred to the CREATE scripts to create all the objects in a db?

thanks
0
Comment
Question by:anushahanna
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 7

Accepted Solution

by:
Cboudroz earned 500 total points
ID: 33422466
DDL = Data definition Language (http://en.wikipedia.org/wiki/Data_Definition_Language)

create, drop, alter,


DML = Data manipulation language (http://en.wikipedia.org/wiki/Data_Manipulation_Language)

select, insert, update, delete.

Now we start also talk about DCL = Data control language (http://en.wikipedia.org/wiki/Data_Control_Language)

GRANT - REMOVE (for security)
0
 
LVL 6

Author Comment

by:anushahanna
ID: 33422511
so, "source" DDL probably means the scripts needed to reproduce the database entirely (only the schema)?
0
 
LVL 7

Assisted Solution

by:Cboudroz
Cboudroz earned 500 total points
ID: 33422628
that refer to all the object in script to CREATE each object.  normally you put these script in VSS or SVN to kept control on the objects history.

You can not really version your Database.mdf but you can do it with the DDL script in txt format.

Example:
- one folder by object type
- one txt file by object that include DDL statement to create the object


When I want to change a DATABASE object I change the txt file in my SVN server and after used RedGate SQL compare to synh the change made in the txt file to the real object in the database.

SQL compare will convert my create proc in alter proc if the proc already exists and will kept.

After the changes are successfully deployed on live server I can commit my change in SVN whit comment on the changes (now I can see the proc history in SVN)



 
DATABASE-DDL-source.jpg
0
Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

 
LVL 6

Author Comment

by:anushahanna
ID: 33422719
OK. you can always version nicely like that on the schema, but never on the data, right?
0
 
LVL 7

Assisted Solution

by:Cboudroz
Cboudroz earned 500 total points
ID: 33422752
yes you can, redgate SQL DATA compare can do it for you.


you need to save text file like :

insert into test (test1, test2,test3) value '1', '2', '3'
insert into test (test1, test2,test3) value '1', '2', '3'
insert into test (test1, test2,test3) value '1', '2', '3'
insert into test (test1, test2,test3) value '1', '2', '3'
insert into test (test1, test2,test3) value '1', '2', '3'
0
 
LVL 6

Author Comment

by:anushahanna
ID: 33422777
Thanks very much for your very informative input.
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question