Showing posts with label log. Show all posts
Showing posts with label log. Show all posts

Tuesday, March 27, 2012

Creation of huge logfiles

HELP..
Since lats evening the SQL reporting services are generating huge logfiles
at dir ...\reporting services\Log Files\....
Because of limited space at our C-drive the whole server goes down. Please
does someone know how to configure reporting services to store the log files
at another drive and is it ok to delete the already present logfiles whitout
damaging the system'
ThanksI believe that is a known bug that has been fixed in SP2 or a hotfix from
last fall.
"Ronald de Rosa Spierings" wrote:
> HELP..
> Since lats evening the SQL reporting services are generating huge logfiles
> at dir ...\reporting services\Log Files\....
> Because of limited space at our C-drive the whole server goes down. Please
> does someone know how to configure reporting services to store the log files
> at another drive and is it ok to delete the already present logfiles whitout
> damaging the system'
> Thanks
>

Thursday, March 8, 2012

Creating query without transaction log

Is there a way to avoid writing transaction log?
We are an OLAP shop and we do not necessarily need transaction log while querying a 33gb data.
These type of queries capture an enormous amount of transaction log. If something happen, we can always restart the query, the log has minimal use for us. It is only filling up a huge amount of disk space. I truncate and shrink my database
everytime I am close of running out of space to keep these log to the minimum.
Any help is greatly appreciated.
Thanks,
Tony
Tony,
What is the recovery model?
Dinesh
SQL Server MVP
--
SQL Server FAQ at
http://www.tkdinesh.com
"Tony - ICW Group" <tmangahas@.icwgroup.com> wrote in message
news:F343EA26-32F7-4456-A907-12EAF14E32DE@.microsoft.com...
> Is there a way to avoid writing transaction log?
> We are an OLAP shop and we do not necessarily need transaction log while
querying a 33gb data.
> These type of queries capture an enormous amount of transaction log. If
something happen, we can always restart the query, the log has minimal use
for us. It is only filling up a huge amount of disk space. I truncate and
shrink my database
> everytime I am close of running out of space to keep these log to the
minimum.
> Any help is greatly appreciated.
> Thanks,
> Tony
|||Recovery model is Simple.
|||I would try putting the database into Read-only mode.
|||You need to find out what is causing the log to grow. SQL Server doesn't log SELECT statements, so it has to
be something else. Some operations can be done in minimal logging mode, but that is restrictive (bulk load
operations, SELECT INTO and index creations and rebuilds).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Tony - ICW Group" <tmangahas@.icwgroup.com> wrote in message
news:D5623FAA-EA57-4D43-BF91-8F8B866A90C8@.microsoft.com...
> Recovery model is Simple.

Creating query without transaction log

Is there a way to avoid writing transaction log?
We are an OLAP shop and we do not necessarily need transaction log while que
rying a 33gb data.
These type of queries capture an enormous amount of transaction log. If some
thing happen, we can always restart the query, the log has minimal use for u
s. It is only filling up a huge amount of disk space. I truncate and shrink
my database
everytime I am close of running out of space to keep these log to the minim
um.
Any help is greatly appreciated.
Thanks,
TonyTony,
What is the recovery model?
Dinesh
SQL Server MVP
--
--
SQL Server FAQ at
http://www.tkdinesh.com
"Tony - ICW Group" <tmangahas@.icwgroup.com> wrote in message
news:F343EA26-32F7-4456-A907-12EAF14E32DE@.microsoft.com...
> Is there a way to avoid writing transaction log?
> We are an OLAP shop and we do not necessarily need transaction log while
querying a 33gb data.
> These type of queries capture an enormous amount of transaction log. If
something happen, we can always restart the query, the log has minimal use
for us. It is only filling up a huge amount of disk space. I truncate and
shrink my database
> everytime I am close of running out of space to keep these log to the
minimum.
> Any help is greatly appreciated.
> Thanks,
> Tony|||Recovery model is Simple.|||I would try putting the database into Read-only mode.|||You need to find out what is causing the log to grow. SQL Server doesn't log
SELECT statements, so it has to
be something else. Some operations can be done in minimal logging mode, but
that is restrictive (bulk load
operations, SELECT INTO and index creations and rebuilds).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Tony - ICW Group" <tmangahas@.icwgroup.com> wrote in message
news:D5623FAA-EA57-4D43-BF91-8F8B866A90C8@.microsoft.com...
> Recovery model is Simple.

Creating query without transaction log

Is there a way to avoid writing transaction log?
We are an OLAP shop and we do not necessarily need transaction log while querying a 33gb data
These type of queries capture an enormous amount of transaction log. If something happen, we can always restart the query, the log has minimal use for us. It is only filling up a huge amount of disk space. I truncate and shrink my databas
everytime I am close of running out of space to keep these log to the minimum
Any help is greatly appreciated
Thanks
TonyTony,
What is the recovery model?
--
Dinesh
SQL Server MVP
--
--
SQL Server FAQ at
http://www.tkdinesh.com
"Tony - ICW Group" <tmangahas@.icwgroup.com> wrote in message
news:F343EA26-32F7-4456-A907-12EAF14E32DE@.microsoft.com...
> Is there a way to avoid writing transaction log?
> We are an OLAP shop and we do not necessarily need transaction log while
querying a 33gb data.
> These type of queries capture an enormous amount of transaction log. If
something happen, we can always restart the query, the log has minimal use
for us. It is only filling up a huge amount of disk space. I truncate and
shrink my database
> everytime I am close of running out of space to keep these log to the
minimum.
> Any help is greatly appreciated.
> Thanks,
> Tony|||Recovery model is Simple.|||I would try putting the database into Read-only mode.|||You need to find out what is causing the log to grow. SQL Server doesn't log SELECT statements, so it has to
be something else. Some operations can be done in minimal logging mode, but that is restrictive (bulk load
operations, SELECT INTO and index creations and rebuilds).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Tony - ICW Group" <tmangahas@.icwgroup.com> wrote in message
news:D5623FAA-EA57-4D43-BF91-8F8B866A90C8@.microsoft.com...
> Recovery model is Simple.

Friday, February 24, 2012

Creating messages from SQL to the Windows Event Viewer app log

(For MS SQL 2000... Please don't suggest anything using VB or .NET. I need
something either somehow built-in with SQL 2000 or using VBscript.)
Anyone know of a way to create a test message somehow through MS SQL so that
it shows in the Windows application event log?
For example, would creating a job to run a dummy stored procedure create an
entry in the app event log?
(Problem is that when SQL is clustered, it uses a different 'source' name in
the event viewer. The 'source' name can't be different when writing a
simple script from what I can tell. I need to be able to easily create test
messages using the SQL cluster name.)
MarcoMarco Shaw wrote:
> (For MS SQL 2000... Please don't suggest anything using VB or .NET. I ne
ed
> something either somehow built-in with SQL 2000 or using VBscript.)
> Anyone know of a way to create a test message somehow through MS SQL so th
at
> it shows in the Windows application event log?
> For example, would creating a job to run a dummy stored procedure create a
n
> entry in the app event log?
> (Problem is that when SQL is clustered, it uses a different 'source' name
in
> the event viewer. The 'source' name can't be different when writing a
> simple script from what I can tell. I need to be able to easily create te
st
> messages using the SQL cluster name.)
> Marco
>
>
Have you looked at RAISERROR?
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||RAISERROR( 'This is a test event message', 10, 1 ) WITH LOG
--
Arnie Rowland
"To be successful, your heart must accompany your knowledge."
"Marco Shaw" <marco@.Znbnet.nb.ca> wrote in message news:OAXoOx2pGHA.1600@.TK2MSFTNGP04.phx.gb
l...
> (For MS SQL 2000... Please don't suggest anything using VB or .NET. I ne
ed
> something either somehow built-in with SQL 2000 or using VBscript.)
>
> Anyone know of a way to create a test message somehow through MS SQL so th
at
> it shows in the Windows application event log?
>
> For example, would creating a job to run a dummy stored procedure create a
n
> entry in the app event log?
>
> (Problem is that when SQL is clustered, it uses a different 'source' name
in
> the event viewer. The 'source' name can't be different when writing a
> simple script from what I can tell. I need to be able to easily create te
st
> messages using the SQL cluster name.)
>
> Marco
>
>
>

Creating messages from SQL to the Windows Event Viewer app log

(For MS SQL 2000... Please don't suggest anything using VB or .NET. I need
something either somehow built-in with SQL 2000 or using VBscript.)
Anyone know of a way to create a test message somehow through MS SQL so that
it shows in the Windows application event log?
For example, would creating a job to run a dummy stored procedure create an
entry in the app event log?
(Problem is that when SQL is clustered, it uses a different 'source' name in
the event viewer. The 'source' name can't be different when writing a
simple script from what I can tell. I need to be able to easily create test
messages using the SQL cluster name.)
MarcoMarco Shaw wrote:
> (For MS SQL 2000... Please don't suggest anything using VB or .NET. I need
> something either somehow built-in with SQL 2000 or using VBscript.)
> Anyone know of a way to create a test message somehow through MS SQL so that
> it shows in the Windows application event log?
> For example, would creating a job to run a dummy stored procedure create an
> entry in the app event log?
> (Problem is that when SQL is clustered, it uses a different 'source' name in
> the event viewer. The 'source' name can't be different when writing a
> simple script from what I can tell. I need to be able to easily create test
> messages using the SQL cluster name.)
> Marco
>
>
Have you looked at RAISERROR?
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||This is a multi-part message in MIME format.
--=_NextPart_000_06FD_01C6A732.93A36440
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
RAISERROR( 'This is a test event message', 10, 1 ) WITH LOG
-- Arnie Rowland
"To be successful, your heart must accompany your knowledge."
"Marco Shaw" <marco@.Znbnet.nb.ca> wrote in message =news:OAXoOx2pGHA.1600@.TK2MSFTNGP04.phx.gbl...
> (For MS SQL 2000... Please don't suggest anything using VB or .NET. =I need
> something either somehow built-in with SQL 2000 or using VBscript.)
> > Anyone know of a way to create a test message somehow through MS SQL =so that
> it shows in the Windows application event log?
> > For example, would creating a job to run a dummy stored procedure =create an
> entry in the app event log?
> > (Problem is that when SQL is clustered, it uses a different 'source' =name in
> the event viewer. The 'source' name can't be different when writing a
> simple script from what I can tell. I need to be able to easily =create test
> messages using the SQL cluster name.)
> > Marco
> > >
--=_NextPart_000_06FD_01C6A732.93A36440
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

RAISERROR( 'This is a test =event message', 10, 1 ) WITH LOG
-- Arnie Rowland"To be =successful, your heart must accompany your knowledge."
"Marco Shaw" =wrote in message news:OAXoOx2pGHA.1600@.TK2MSFTNGP04.phx.gbl...> =(For MS SQL 2000... Please don't suggest anything using VB or .NET. I need> something either somehow built-in with SQL 2000 or using VBscript.)> > Anyone know of a way to create a test =message somehow through MS SQL so that> it shows in the Windows =application event log?> > For example, would creating a job to run a dummy =stored procedure create an> entry in the app event log?> > =(Problem is that when SQL is clustered, it uses a different 'source' =name in> the event viewer. The 'source' name can't be different =when writing a> simple script from what I can tell. I need to be =able to easily create test> messages using the SQL cluster name.)> => Marco> > >

--=_NextPart_000_06FD_01C6A732.93A36440--

Creating logfunctionality

Hello!

Does anyone have a link to some good information about creating log functionality for SQL-server. Basically I want to track changes made to a table, through an update-trigger. I would like to store both the old values and the new values (is this possible?), in a new table.

Thanks!

/MagnusI don't have a link for you but this is easy to do...

First readup on triggers in the Books on line. Checkout the following keywords:

"triggers, programming"
"triggers, multirow"
"triggers, inserted tables"
"triggers, last trigger"

In the trigger, you will want to select rows from the temporary memory-resident "inserted" or "deleted" tables. the "inserted" table holds the new stuff and the "deleted" table holds the old stuff.

For an insert you would select just from the "inserted" table and insert this into the new part of the audit table.

For an Update write a select to join the "deleted" table to the "inserted" table for the before and after stuff. Again, the "deleted" table is the old and the "inserted" table is the new. You will need to have well defined keys for this to work right.

For a delete, you guessed it, select data from the "deleted" table and insert the results into the old part of the audit table.

Remember that in SQL Server the triggers fire AFTER the Insert/Update/Delete. If you are using multipule triggers I would make this the last trigger to fire so you don't have to roll back your audit if something fails your business logic.

Post back if you have more questions.

Creating Log file & Attaching db?

Bit of a SQL newbie, having taken over a support role for a piece of software that my firm sells. It is basically a DB that runs on MSDE or SQL Server in either desktop or enterprise scenarios.

We do sell our software to clients who may or may not already have SQL on their machines. During installation, it searches for sqlservr.exe for existing SQL installations and if it finds nothing, will then install MSDE 1.0 to house the db files.

My question is this -

I can manually create a db or manually attach an existing db through sql query analyser where there is a full-blown SQL installation. Is there any way I can do the same where there is only MSDE installed? The simple solution, I guess, would be to download one of the freeware or shareware MSDE "Enterprise Managers", but this won't always be suitable for a client installation.

Many thanks for your assistance all.

:cool:you could use sp_attach_db to attach a sqlserver database to sqlserver. Don't know about msde though.|||you could use sp_attach_db to attach a sqlserver database to sqlserver. Don't know about msde though.

Thanks

Yep, this is what I would use if I was doing it through the SQL. Still wondering about MSDE tho.
:confused:|||You can look into SQL-DMO and write up a quick routine that would do the attaching.