Unix Technical Forum

Track changes made to SQL Server

This is a discussion on Track changes made to SQL Server within the SQL Server forums, part of the Microsoft SQL Server category; --> "Erland Sommarskog" <esquel@sommarskog.se> wrote in message news:Xns9A53ED98F906EYazorman@127.0.0.1... > John Sheppard (spam@nospam.com) writes: >> It's dropping tables and recreating them....I ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

 

LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 03-04-2008, 07:23 AM
John Sheppard
 
Posts: n/a
Default Re: Track changes made to SQL Server


"Erland Sommarskog" <esquel@sommarskog.se> wrote in message
news:Xns9A53ED98F906EYazorman@127.0.0.1...
> John Sheppard (spam@nospam.com) writes:
>> It's dropping tables and recreating them....I dont understand the use of
>> synching software that does that, I need the data intact

>
> There is nothing wrong as such with dropping and recreating tables. For
> some changes this is necessary, as ALTER TABLE cannot do everything.
>
> But of course, the tool needs to cater for the data being copied over
> to the new table. And of course the tools need to do this safely, and
> make sure that indexes, triggers etc are restored. All and all, it's more
> complex and risky. But it is a concept that a tool has to master. As it
> is for someone who is working a lot with table changes, because you
> will run into the situation sooner or later.
>
>> I think a transaction logger is gonna have to be the go...

>
> And capture all sorts of junk commands that you issue? Why not just
> Profiler
> or a server-side trace instead?
>
>
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
>
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pro...ads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinf...ons/books.mspx



What do you mean profile on a server-side trace?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 03-04-2008, 07:23 AM
Erland Sommarskog
 
Posts: n/a
Default Re: Track changes made to SQL Server

John Sheppard (nospam@spamspam.com) writes:
> What do you mean profile on a server-side trace?


In the SQL Server program group, you find Profiler under Performance
tools. This tool permits you trace a whole bunch of things that goes
on in SQL Server. If you just press OK on all buttons that comes up,
you will see all command batches that are sent to the server. You can
set up filter to trace only a certain connection. And a lot more.

The Profiler is just the front-end. The trace engine itself lives in
SQL Server, and you can access it directly by setting up a server-side
traces. (The easiest way to do that is to set up the trace in Profiler and
then export the trace.) Server-side trace is the recommended for long-term
traces, and also when you trace in loaded production environments, as
it takes less load than a Profiler trace.

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 03-06-2008, 03:04 PM
John Sheppard
 
Posts: n/a
Default Re: Track changes made to SQL Server


"Erland Sommarskog" <esquel@sommarskog.se> wrote in message
news:Xns9A56F06EF195DYazorman@127.0.0.1...
> John Sheppard (nospam@spamspam.com) writes:
>> What do you mean profile on a server-side trace?

>
> In the SQL Server program group, you find Profiler under Performance
> tools. This tool permits you trace a whole bunch of things that goes
> on in SQL Server. If you just press OK on all buttons that comes up,
> you will see all command batches that are sent to the server. You can
> set up filter to trace only a certain connection. And a lot more.
>
> The Profiler is just the front-end. The trace engine itself lives in
> SQL Server, and you can access it directly by setting up a server-side
> traces. (The easiest way to do that is to set up the trace in Profiler and
> then export the trace.) Server-side trace is the recommended for long-term
> traces, and also when you trace in loaded production environments, as
> it takes less load than a Profiler trace.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
>
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pro...ads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinf...ons/books.mspx


ic! Thats what I want!

Now you're gonna tell me that it doesnt come with SQL Server Express, right?
Im pretty sure it doesnt as theyre not there....

I'll look into it

Thanks for your help man, I'll see what I can find...
John

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 03-06-2008, 03:04 PM
Erland Sommarskog
 
Posts: n/a
Default Re: Track changes made to SQL Server

John Sheppard (nospam@spamspam.com) writes:
> ic! Thats what I want!
>
> Now you're gonna tell me that it doesnt come with SQL Server Express,
> right?
> Im pretty sure it doesnt as theyre not there....


Correct. Profiler does not come with SQL 2005 Express. But I think the
server-side trace routines does. But admittedly they are a lot more
difficult to use on their own.

Now, the price tag for a license of Developer Edition is around 50 USD,
and since you are doing this for development, that would be sufficient for
you.




--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 03-06-2008, 03:04 PM
John Sheppard
 
Posts: n/a
Default Re: Track changes made to SQL Server


"Erland Sommarskog" <esquel@sommarskog.se> wrote in message
news:Xns9A58EB16F40F9Yazorman@127.0.0.1...
> John Sheppard (nospam@spamspam.com) writes:
>> ic! Thats what I want!
>>
>> Now you're gonna tell me that it doesnt come with SQL Server Express,
>> right?
>> Im pretty sure it doesnt as theyre not there....

>
> Correct. Profiler does not come with SQL 2005 Express. But I think the
> server-side trace routines does. But admittedly they are a lot more
> difficult to use on their own.
>
> Now, the price tag for a license of Developer Edition is around 50 USD,
> and since you are doing this for development, that would be sufficient for
> you.
>
>
>
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
>
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pro...ads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinf...ons/books.mspx


Ic...hmm I think I have a developer edition already...we have an action pack
subscription....its a full job in itself just wading through all that
liscencing stuff....we have a full enterprise copy of sql server that came
with it....Im pretty sure we're not liscenced to use that tho

Im sure Im not the only one that gets frustrated with the ridiculous
complexity of liscencing tho...I seem to do everything BUT write code...

Installing sql express already broke my visual studio once...not keen to
repeat that...k im really frustrated right now...

Thanks man, Ill look into the developer edition when im little more calm,
see where that takes me
John


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16 (permalink)  
Old 03-10-2008, 05:55 PM
vmnvmcxbv
 
Posts: n/a
Default Re: Track changes made to SQL Server

What are these features you mention that are incorporated in MS SQL? Can you
elaborate

"Mork69" <mleach@bigfoot.com> wrote in message
news:8c6075cd-48dd-4a74-bdc5-7088ed5bad4c@h25g2000hsf.googlegroups.com...
> You should seriously consider keeping your scripts under source
> control as Erland has suggested, especially if you will end up working
> on the database with other developers. It's a great way to keep
> everyone's activities in sync.
>
> Check out DB Ghost (http://www.dbghost.com) - we've been doing this
> for about 5 year's now and Microsoft, Red Gate and xSQL have now also
> realised what we've been saying makes sense and incorporated our
> thinking into theor products i.e. the approach has now been validated
> across the board so you really should give it some thought.



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #17 (permalink)  
Old 03-17-2008, 07:12 AM
John Sheppard
 
Posts: n/a
Default Re: Track changes made to SQL Server


"Erland Sommarskog" <esquel@sommarskog.se> wrote in message
news:Xns9A56F06EF195DYazorman@127.0.0.1...
> John Sheppard (nospam@spamspam.com) writes:
>> What do you mean profile on a server-side trace?

>
> In the SQL Server program group, you find Profiler under Performance
> tools. This tool permits you trace a whole bunch of things that goes
> on in SQL Server. If you just press OK on all buttons that comes up,
> you will see all command batches that are sent to the server. You can
> set up filter to trace only a certain connection. And a lot more.
>
> The Profiler is just the front-end. The trace engine itself lives in
> SQL Server, and you can access it directly by setting up a server-side
> traces. (The easiest way to do that is to set up the trace in Profiler and
> then export the trace.) Server-side trace is the recommended for long-term
> traces, and also when you trace in loaded production environments, as
> it takes less load than a Profiler trace.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
>
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pro...ads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinf...ons/books.mspx


I've installed the developer edition and I dont have a Microsoft SQL
Server -> performance tools -> profiler in the start menu

Why am i having no luck, this is so frustrating...


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #18 (permalink)  
Old 03-17-2008, 07:12 AM
John Sheppard
 
Posts: n/a
Default Re: Track changes made to SQL Server


"John Sheppard" <nospam@spamspam.com> wrote in message
news:fqocft06tn@news3.newsguy.com...
>
> "Erland Sommarskog" <esquel@sommarskog.se> wrote in message
> news:Xns9A58EB16F40F9Yazorman@127.0.0.1...
>> John Sheppard (nospam@spamspam.com) writes:
>>> ic! Thats what I want!
>>>
>>> Now you're gonna tell me that it doesnt come with SQL Server Express,
>>> right?
>>> Im pretty sure it doesnt as theyre not there....

>>
>> Correct. Profiler does not come with SQL 2005 Express. But I think the
>> server-side trace routines does. But admittedly they are a lot more
>> difficult to use on their own.
>>
>> Now, the price tag for a license of Developer Edition is around 50 USD,
>> and since you are doing this for development, that would be sufficient
>> for
>> you.
>>
>>
>>
>>
>> --
>> Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
>>
>> Books Online for SQL Server 2005 at
>> http://www.microsoft.com/technet/pro...ads/books.mspx
>> Books Online for SQL Server 2000 at
>> http://www.microsoft.com/sql/prodinf...ons/books.mspx

>
> Ic...hmm I think I have a developer edition already...we have an action
> pack subscription....its a full job in itself just wading through all that
> liscencing stuff....we have a full enterprise copy of sql server that came
> with it....Im pretty sure we're not liscenced to use that tho
>
> Im sure Im not the only one that gets frustrated with the ridiculous
> complexity of liscencing tho...I seem to do everything BUT write code...
>
> Installing sql express already broke my visual studio once...not keen to
> repeat that...k im really frustrated right now...
>
> Thanks man, Ill look into the developer edition when im little more calm,
> see where that takes me
> John
>
>


Ok Finally I got it all up and working. I think profiler should do the job,
just have to find the correct events to trace

Thank you
John


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #19 (permalink)  
Old 03-17-2008, 07:12 AM
John Sheppard
 
Posts: n/a
Default Re: Track changes made to SQL Server


"John Sheppard" <spam@nospam.com> wrote in message
news:fr4huo01r0v@news2.newsguy.com...
>
> "John Sheppard" <nospam@spamspam.com> wrote in message
> news:fqocft06tn@news3.newsguy.com...
>>
>> "Erland Sommarskog" <esquel@sommarskog.se> wrote in message
>> news:Xns9A58EB16F40F9Yazorman@127.0.0.1...
>>> John Sheppard (nospam@spamspam.com) writes:
>>>> ic! Thats what I want!
>>>>
>>>> Now you're gonna tell me that it doesnt come with SQL Server Express,
>>>> right?
>>>> Im pretty sure it doesnt as theyre not there....
>>>
>>> Correct. Profiler does not come with SQL 2005 Express. But I think the
>>> server-side trace routines does. But admittedly they are a lot more
>>> difficult to use on their own.
>>>
>>> Now, the price tag for a license of Developer Edition is around 50 USD,
>>> and since you are doing this for development, that would be sufficient
>>> for
>>> you.
>>>
>>>
>>>
>>>
>>> --
>>> Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
>>>
>>> Books Online for SQL Server 2005 at
>>> http://www.microsoft.com/technet/pro...ads/books.mspx
>>> Books Online for SQL Server 2000 at
>>> http://www.microsoft.com/sql/prodinf...ons/books.mspx

>>
>> Ic...hmm I think I have a developer edition already...we have an action
>> pack subscription....its a full job in itself just wading through all
>> that liscencing stuff....we have a full enterprise copy of sql server
>> that came with it....Im pretty sure we're not liscenced to use that tho
>>
>>
>> Im sure Im not the only one that gets frustrated with the ridiculous
>> complexity of liscencing tho...I seem to do everything BUT write code...
>>
>> Installing sql express already broke my visual studio once...not keen to
>> repeat that...k im really frustrated right now...
>>
>> Thanks man, Ill look into the developer edition when im little more calm,
>> see where that takes me
>> John
>>
>>

>
> Ok Finally I got it all up and working. I think profiler should do the
> job, just have to find the correct events to trace
>
> Thank you
> John
>


hmm, ok, I've found out about DDL triggers. These are the go...much easier
than profiler...

Having a bit of trouble with those but I'll start a new thread if I get
really stuck...

Here is a good article on it
http://www.sqlteam.com/article/using...schema-changes

Thanks you all very much for your help...
Kind regards
John

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #20 (permalink)  
Old 03-17-2008, 07:12 AM
Erland Sommarskog
 
Posts: n/a
Default Re: Track changes made to SQL Server

John Sheppard (nospam@spamspam.com) writes:
> hmm, ok, I've found out about DDL triggers. These are the go...much easier
> than profiler...


True, you could set them up and siphon off everything into a table,
and you don't have to damn yourself for not running profiler.

I don't remember on the top of my head if the XML returned by the
eventdata() function includes the statement that fired the trigger,
but if it does, it's a walk in the park.

Still, keep in mind that you must have a reference database so that
you can test the script however you compose it!

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:43 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com