Solved

database source ddl

Posted on 2010-08-12
6
252 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
  • 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
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

 
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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

912 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now