Showing posts with label pretty. Show all posts
Showing posts with label pretty. Show all posts

Friday, March 30, 2012

Moving C2 Audits

I'm not seeing or finding how to move the location of the C2 Audit files. I
used the pretty standard script to enable C2 Auditing:
EXEC sp_configure 'show advanced option', 1
RECONFIGURE WITH OVERRIDE
EXEC sp_configure 'c2 audit mode', 1
RECONFIGURE WITH OVERRIDE
However, it would be nice if I could move them from the C:\ drive to a
folder already being backed up since we need these audit trails for at least
one year (Government thing). Any ideas? I'll keep looking, but I know we
get pretty quick responses in here also!
Thanks
AllenSorry , what is C2 Audit files ?
"A McGuire" <allen.mcguire@.gmail.com.invalid> wrote in message
news:e4aqFxLtGHA.2260@.TK2MSFTNGP03.phx.gbl...
> I'm not seeing or finding how to move the location of the C2 Audit files.
> I used the pretty standard script to enable C2 Auditing:
> EXEC sp_configure 'show advanced option', 1
> RECONFIGURE WITH OVERRIDE
> EXEC sp_configure 'c2 audit mode', 1
> RECONFIGURE WITH OVERRIDE
> However, it would be nice if I could move them from the C:\ drive to a
> folder already being backed up since we need these audit trails for at
> least one year (Government thing). Any ideas? I'll keep looking, but I
> know we get pretty quick responses in here also!
> Thanks
> Allen
>|||Hi,
By default SQL Server logs the C2 trace into data folder which you mentioned
during SQL Server installation.
The file can be copied to a different location by writing a batch file and
scheduled using SQL Server Agent every 1 hour.
Thanks
Hari
SQL Server MVP
"A McGuire" <allen.mcguire@.gmail.com.invalid> wrote in message
news:e4aqFxLtGHA.2260@.TK2MSFTNGP03.phx.gbl...
> I'm not seeing or finding how to move the location of the C2 Audit files.
> I used the pretty standard script to enable C2 Auditing:
> EXEC sp_configure 'show advanced option', 1
> RECONFIGURE WITH OVERRIDE
> EXEC sp_configure 'c2 audit mode', 1
> RECONFIGURE WITH OVERRIDE
> However, it would be nice if I could move them from the C:\ drive to a
> folder already being backed up since we need these audit trails for at
> least one year (Government thing). Any ideas? I'll keep looking, but I
> know we get pretty quick responses in here also!
> Thanks
> Allen
>|||C2 audits are predefined audits you can run to trace specific events on a
SQL Server. It is compliant with Government auditing policies and
procedures.
http://www.microsoft.com/technet/se...r/sql2kaud.mspx
A Google search will produce more results for you.
In SQL 2005 it is a standard checkbox you can turn on by checking the
Properties of a Server, then clicking on Security. In SQL 2000, you have to
run the script I show below.
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:uX%23l0rStGHA.4748@.TK2MSFTNGP03.phx.gbl...
> Sorry , what is C2 Audit files ?
>
>
> "A McGuire" <allen.mcguire@.gmail.com.invalid> wrote in message
> news:e4aqFxLtGHA.2260@.TK2MSFTNGP03.phx.gbl...
>|||Yeah, not really what I had in mind though. Just like I can change the
location of my data files and log files, I want my traces to go to another
location as well. This should be something we can run a script to configure
IMHO. I don't want to write batch files for each of my 70 SQL Servers ;-)
The default size of an audit file is 200 MB, and with C2 auditing, that will
be reached daily for some servers - no way around it. Furthermore, you
can't copy an active trace file, so I would have to continually check back
to see if the thing is 200 MB yet, then copy it to another location on the
same computer - awaiting pickup by our backup system. That is way too much
disk activity for me.
I would like to see the ability to write them directly to another location -
other than the original /data folder.
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:uY92JSUtGHA.4968@.TK2MSFTNGP03.phx.gbl...
> Hi,
> By default SQL Server logs the C2 trace into data folder which you
> mentioned during SQL Server installation.
> The file can be copied to a different location by writing a batch file and
> scheduled using SQL Server Agent every 1 hour.
> Thanks
> Hari
> SQL Server MVP
>
> "A McGuire" <allen.mcguire@.gmail.com.invalid> wrote in message
> news:e4aqFxLtGHA.2260@.TK2MSFTNGP03.phx.gbl...
>|||Ok - I've been told that audits get written to the default data directory.
However, we have dedicated drives for log and data files (E: and F:, for
example). What I had to do to get the C2 audits (trace files) to write to
our data directory was:
1) launch Enterprise Manager
2) right-click and Properties
3) Database Settings tab
4) Change 'default data directory' to F:\<location>
5) Stop and restart the services
Good to go. The traces will begin writing to the drive you specified as
your default data directory.
"A McGuire" <allen.mcguire@.gmail.com.invalid> wrote in message
news:e4aqFxLtGHA.2260@.TK2MSFTNGP03.phx.gbl...
> I'm not seeing or finding how to move the location of the C2 Audit files.
> I used the pretty standard script to enable C2 Auditing:
> EXEC sp_configure 'show advanced option', 1
> RECONFIGURE WITH OVERRIDE
> EXEC sp_configure 'c2 audit mode', 1
> RECONFIGURE WITH OVERRIDE
> However, it would be nice if I could move them from the C:\ drive to a
> folder already being backed up since we need these audit trails for at
> least one year (Government thing). Any ideas? I'll keep looking, but I
> know we get pretty quick responses in here also!
> Thanks
> Allen
>sql

Friday, March 23, 2012

Moving a big database

What is the best way to move a 15gb database. Copy the
files from 1 server to the other (the network connection
is pretty quick) or to backup then restore using a DAT
tape?Probably sp_detach_db and sp_attach_db.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"mat" <anonymous@.discussions.microsoft.com> wrote in message
news:11c3001c410c4$f7b18fe0$a301280a@.phx
.gbl...
> What is the best way to move a 15gb database. Copy the
> files from 1 server to the other (the network connection
> is pretty quick) or to backup then restore using a DAT
> tape?|||Hi,
I too agree Tibers comments. Because the backup of 15 GB database will take
20 Minutes and then Restore will take another 30 minutes. But if you go with
Tibers comment it will just take only copy time from source to destination.
Thanks
Hari
MCDBA
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OcXNXZMEEHA.2424@.TK2MSFTNGP09.phx.gbl...
> Probably sp_detach_db and sp_attach_db.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
>
> "mat" <anonymous@.discussions.microsoft.com> wrote in message
> news:11c3001c410c4$f7b18fe0$a301280a@.phx
.gbl...
>|||And if you need to do this 'move' on a regular basis you should really check
out SQL Lite Speed which will compress the backup as it's happening. This
will save a LOT of space, but more importantly will make the file copy a lot
faster since the file is a lot smaller...
Brian Moran
Principal Mentor
Solid Quality Learning
SQL Server MVP
http://www.solidqualitylearning.com
"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:eA7XnzMEEHA.1128@.TK2MSFTNGP11.phx.gbl...
> Hi,
> I too agree Tibers comments. Because the backup of 15 GB database will
take
> 20 Minutes and then Restore will take another 30 minutes. But if you go
with
> Tibers comment it will just take only copy time from source to
destination.
> Thanks
> Hari
> MCDBA
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
in
> message news:OcXNXZMEEHA.2424@.TK2MSFTNGP09.phx.gbl...
>

Friday, March 9, 2012

Move log file without shutdown

I need to move a database's log file to a different disk. Can I do this without shutting down? It's pretty clear that I can create a second log file on the new disk but, what do I have to do to delete the old log file? The documentation warns that files must be empty to be deleted but I can't find any information on how to empty and disable a log file.

Will a BACKUP LOG make the log file empty enough to be deleted? How do I make sure that new transactions are all written to the new log file?

You can't move the primary log file whilst the db is online, i.e. the one you create with the database.

You could add another and then shrink the original and set the auto grow to off, but thats not ideal.

Why can't you take the DB offline for 5 minutes?

|||

Dang. I guess I'll have to take the database offline for 5 minutes. I was hoping to avoid that because even 5 minutes of downtime is going to take an hour of coordination, communication etc. This db is used during hospital admissions.

Saturday, February 25, 2012

Move Database to new Server

I would like to move a database to a different server. What would be the
best route for this. I am pretty new to this and don't want to mess it up.
Thanks in advance,
Gregdid you hear "=?Utf-8?B?R3JlZw==?=" <Greg@.discussions.microsoft.com> say
in news:0075FE80-A7CD-4D42-8974-EEB3C5CAC806@.microsoft.com:
> I would like to move a database to a different server. What would be
> the best route for this. I am pretty new to this and don't want to
> mess it up.
> Thanks in advance,
> Greg
>
try looking in BOL for the copy database wizard. It's pretty good at
"hand holding" and so long as no on is in teh database when you do it,
works very cleanly. (tools -> wizards -> management -> copy database
wizard)
--
Neil MacMurchy
http://spaces.msn.com/members/neilmacmurchy
http://spaces.msn.com/members/mctblogs|||Hi,
2 approaches:-
I.
1. SP_DETACH_DB DBNAME
2. Move the .mdf and .ldf files to new server
3. SP_ATTACH_DB dbanme,@.filename1='',@.filename­2=''
or else you can move a database using below steps,
II.
1. Do a Backup of database
2. Copy the .BAK file to new server
3. Restore the database
see below link for more details:-
http://support.microsoft.com/default.aspx?scid=kb;en-us;314546
Thanks
Hari
SQL Server MVP
"Greg" <Greg@.discussions.microsoft.com> wrote in message
news:0075FE80-A7CD-4D42-8974-EEB3C5CAC806@.microsoft.com...
>I would like to move a database to a different server. What would be the
> best route for this. I am pretty new to this and don't want to mess it
> up.
> Thanks in advance,
> Greg
>

Move Database to new Server

I would like to move a database to a different server. What would be the
best route for this. I am pretty new to this and don't want to mess it up.
Thanks in advance,
Greg
did you hear "=?Utf-8?B?R3JlZw==?=" <Greg@.discussions.microsoft.com> say
in news:0075FE80-A7CD-4D42-8974-EEB3C5CAC806@.microsoft.com:

> I would like to move a database to a different server. What would be
> the best route for this. I am pretty new to this and don't want to
> mess it up.
> Thanks in advance,
> Greg
>
try looking in BOL for the copy database wizard. It's pretty good at
"hand holding" and so long as no on is in teh database when you do it,
works very cleanly. (tools -> wizards -> management -> copy database
wizard)
Neil MacMurchy
http://spaces.msn.com/members/neilmacmurchy
http://spaces.msn.com/members/mctblogs
|||Hi,
2 approaches:-
I.
1. SP_DETACH_DB DBNAME
2. Move the .mdf and .ldf files to new server
3. SP_ATTACH_DB dbanme,@.filename1='',@.filenameX2=''
or else you can move a database using below steps,
II.
1. Do a Backup of database
2. Copy the .BAK file to new server
3. Restore the database
see below link for more details:-
http://support.microsoft.com/default...b;en-us;314546
Thanks
Hari
SQL Server MVP
"Greg" <Greg@.discussions.microsoft.com> wrote in message
news:0075FE80-A7CD-4D42-8974-EEB3C5CAC806@.microsoft.com...
>I would like to move a database to a different server. What would be the
> best route for this. I am pretty new to this and don't want to mess it
> up.
> Thanks in advance,
> Greg
>

Move Database to new Server

I would like to move a database to a different server. What would be the
best route for this. I am pretty new to this and don't want to mess it up.
Thanks in advance,
Gregdid you hear "examnotes" <Greg@.discussions.microsoft.com> say
in news:0075FE80-A7CD-4D42-8974-EEB3C5CAC806@.microsoft.com:

> I would like to move a database to a different server. What would be
> the best route for this. I am pretty new to this and don't want to
> mess it up.
> Thanks in advance,
> Greg
>
try looking in BOL for the copy database wizard. It's pretty good at
"hand holding" and so long as no on is in teh database when you do it,
works very cleanly. (tools -> wizards -> management -> copy database
wizard)
Neil MacMurchy
http://spaces.msn.com/members/neilmacmurchy
http://spaces.msn.com/members/mctblogs|||Hi,
2 approaches:-
I.
1. SP_DETACH_DB DBNAME
2. Move the .mdf and .ldf files to new server
3. SP_ATTACH_DB dbanme,@.filename1='',@.filename_2=''
or else you can move a database using below steps,
II.
1. Do a Backup of database
2. Copy the .BAK file to new server
3. Restore the database
see below link for more details:-
http://support.microsoft.com/defaul...kb;en-us;314546
Thanks
Hari
SQL Server MVP
"Greg" <Greg@.discussions.microsoft.com> wrote in message
news:0075FE80-A7CD-4D42-8974-EEB3C5CAC806@.microsoft.com...
>I would like to move a database to a different server. What would be the
> best route for this. I am pretty new to this and don't want to mess it
> up.
> Thanks in advance,
> Greg
>