Showing posts with label record. Show all posts
Showing posts with label record. Show all posts

Friday, March 23, 2012

How to connect Report in ReportViewer to a datasource?

Hi:

I am new to ReportViewer. I have an .aspx page that takes data that makes a request for a Permit. When the User clicks submit, I add the record to the database then get the unique identity of that record and display it in a popup (as a confirmation number). I would then like a report to show the data the User just submitted.

I have added an .aspx page called RequestReport.aspx and put a ReportViewer on it. I added a report called PermitRequest.rdlc with a textbox that acts as a Title. I linked RequestReport to pull PermitRequest.rdlc and it successfully displays the report. My question is that I don't know how to add a datasource to the report to show the new record. I did save the unique record id to a Session variable called "RequestID".

Please help with directions.

Thanks in advance!

a few questions:

1) Are you using textbox to display the report or some other contrl (like a table)

2) Do you want an SQL type solution that you can handle programatically or a solution where the report is tied to a fixed dataset.

3) What IDE are you using (Visual Web Express or Studio)

bullpit

|||

Hi:

(1) I am using a textbox to display the report name and a table to display the data.

(2) Either one is OK. I just want to be able to pass the newly given unique id to the report and then have the report display only the record data for that id. Each record will change with each user and each new entry.

(3) Visual Studio 2005 SP1 and framework 2.0 talking to a SQL Server 2000 database.

I now have the report displaying all records, but I only want to display the last saved record. Do I need to set a parameter to pass? If so, I see how to pass it programmatically with VB code behind. I don't see how I tell the report to accept a parameter as part of the SQL Statement.

|||

The way I do, I handle everything from codebehind...that gives me more control...that way i can send an SQL query to fetch whatever i want...in your case, you have the id...build a select query string in codebehind to select only the records with that id...then bind to the report...

these two funtions will help you get started if you want to go that way:

public void FindAll()
{
// Set the processing mode for the ReportViewer to Local
ReportViewer1.ProcessingMode = ProcessingMode.Local;
LocalReport rep = ReportViewer1.LocalReport;
rep.ReportPath = "Report.rdlc";
DataSet ds = GetSalesDataFull();
// Create a report data source for the sales order data
ReportDataSource dsMaintenanceDS = new ReportDataSource();
dsMaintenanceDS.Name = "DataSet1_Main";
dsMaintenanceDS.Value = ds.Tables["Main"];
rep.DataSources.Clear();

//example to set report parameter values from codebehind
ReportParameter param = new ReportParameter("nRows", dDownListNRows.SelectedValue);
this.ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { param });


rep.DataSources.Add(dsMaintenanceDS);
rep.Refresh();
}

private DataSet GetSalesDataFull()
{
DataSet ds = new DataSet();
string str = "";

str = @." WHERE ""ID""='" + <YOUR ID> ')";
string sqlSalesData = @."SELECT * FROM <TABLE NAME> " + str;

OdbcConnection connection = new OdbcConnection(<CONNECTION STRING>);
OdbcCommand command = new OdbcCommand(sqlSalesData, connection);
OdbcDataAdapter salesOrderAdapter = new OdbcDataAdapter(command);
salesOrderAdapter.Fill(ds, "Main");
salesOrderAdapter.Dispose();
command.Dispose();
return ds;
}

let me know if you have more questions.

good luck...bullpit

|||

The way I do, I handle everything from codebehind...that gives me more control...that way i can send an SQL query to fetch whatever i want...in your case, you have the id...build a select query string in codebehind to select only the records with that id...then bind to the report...

these two funtions will help you get started if you want to go that way:

public void FindAll()
{
// Set the processing mode for the ReportViewer to Local
ReportViewer1.ProcessingMode = ProcessingMode.Local;
LocalReport rep = ReportViewer1.LocalReport;
rep.ReportPath = "Report.rdlc";
DataSet ds = GetSalesDataFull();
// Create a report data source for the sales order data
ReportDataSource dsMaintenanceDS = new ReportDataSource();
dsMaintenanceDS.Name = "DataSet1_Main";
dsMaintenanceDS.Value = ds.Tables["Main"];
rep.DataSources.Clear();

//example to set report parameter values from codebehind
ReportParameter param = new ReportParameter("nRows", dDownListNRows.SelectedValue);
this.ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { param });


rep.DataSources.Add(dsMaintenanceDS);
rep.Refresh();
}

private DataSet GetSalesDataFull()
{
DataSet ds = new DataSet();
string str = "";

str = @." WHERE ""ID""='" + <YOUR ID> ')";
string sqlSalesData = @."SELECT * FROM <TABLE NAME> " + str;

OdbcConnection connection = new OdbcConnection(<CONNECTION STRING>);
OdbcCommand command = new OdbcCommand(sqlSalesData, connection);
OdbcDataAdapter salesOrderAdapter = new OdbcDataAdapter(command);
salesOrderAdapter.Fill(ds, "Main");
salesOrderAdapter.Dispose();
command.Dispose();
return ds;
}

let me know if you have more questions.

good luck...bullpit

|||

Hi Bullpit:

Thank you for your response. Do you have this in Visual Basic code behind? Also, if i do this all in the code behind...will I still have the fields in the dataset on the report to drag and drop to the table on the report? Will I still be able to layout the design of the report?

|||

Sorry, I do not have this code in VB. And yes, you will be able to design the table the way you want. I wanted my report to be dynamic, so I gave the user the choice to choose the fields she/he wants on the report..so whatever field name user chooses, corresponding values are bound to that column in details section...but if you don't want that, you can have the column names as static (by drag and drop)...i believe it should work...also, there are several tools online to convert c# to vb...you can use them...

P.S. If you choose to go codebehind, then remember to add the name of the datasource (in our case "DataSet1_Main") in the Report Data Source option in IDE.

good luck

Friday, March 9, 2012

How to complete Trigger on Table

I need to create a trigger that fires when a record is inserted in a specific table.
Having fired, the same record with a few altered fields wil be inserted to a table on a linked server.

I need help to understand the requirements to make this work.

What I have found out and configured so-far:
I have linked the remote server to the server with the trigger.
I have successfully added the trigger to the local Server

What I need to know:
How do I know the trigger is running ?
Do I have to start it manually, or will it always be active ?
How and where is it saved ?
Once saved, can it be altered ?

I apologize for the basic nature of my questions on triggers.

GrahamTo test your trigger, just insert three rows into your base table and when your statment has finished running look on your linked server to see that the rows have been added.

Once the trigger has been "compiled" it is in effect and continuously running. The only exception to this is if you BCP data into the table, by default BCP does NOT fire triggers.

A record of the trigger is placed in the sysobjects table and the text of the trigger is placed in the syscomments table.

Yes, trigger can be modified or dropped.

Books Online has an excelent write up on triggers.

Wednesday, March 7, 2012

How to compare if date is in between two dates.

I have a report that binds to view. Every record has an "Employee Joining date" date field with it.

I have to filter out records ; whose joining date is with in two different dates.

How will i set "selection Criteria"; as i dont have any idea of the crystal reports syntax.

SOme refrence or sample will be valuable for me.

PLz. reply soon

Thanks in advanceGive the folg. in ur selection formula

{join_date} in {?start} to {?end}

join_date => ur database field

start, end => parameter fields

Hope this will work|||what i see is that the date in crystal report is consist of time too...
so how to get rid of the time, so that i can get only the date?|||what i see is that the date in crystal report is consist of time too...
so how to get rid of the time, so that i can get only the date?

Use Cdate Function

Cdate(DateTimeField)

Friday, February 24, 2012

How to Combine Multiple Rows Data into single Record or String based on a common field.

Hellow Folks.

Here is the Original Data in my single SQL 2005 Table:

Department: Sells:

1 Meat

1 Rice

1 Orange

2 Orange

2 Apple

3 Pears

The Data I would like read separated by Semi-colon:

Department: Sells:

1 Meat;Rice;Orange

2 Orange;Apple

3 Pears

I would like to read my data via SP or VStudio 2005 Page . Any help will be appreciated. Thanks..

Hi,

you can use the following Function in SQL server:

USE NORTHWIND
GO

CREATE FUNCTION ProductList (@.CategoryIDINT)
RETURNSVARCHAR(1000)
AS
BEGIN
DECLARE @.ProductsVARCHAR(1000)

SELECT@.Products =COALESCE(@.Products +', ','') + ProductName
FROM Products
WHERE CategoryID = @.CategoryID
ORDER BY ProductNameASC

RETURN @.Products
END
GO

SELECTDISTINCT CategoryID, dbo.ProductList (CategoryID)AS ProductList
FROM Products
GO

 
and this is based on your table: 
 
USE NORTHWINDCS
GO

CREATE FUNCTION ProductList (@.CategoryIDINT)
RETURNSVARCHAR(1000)
AS
BEGIN
DECLARE @.ProductsVARCHAR(1000)

SELECT@.Products =COALESCE(@.Products +', ','') + sells
FROM table1
WHERE Department = @.CategoryID
ORDER BY sellsASC

RETURN @.Products
END
GO

SELECTDISTINCT Department, dbo.ProductList (department)AS ProductList
FROM table1
GO

thanks

|||

SharpGuy, your solution works. Thanks and have a great Thanksgiving...

How to combine 2 records into 1 unique record

Hi all,

We have an app that uses SQL 2000. I am trying to track when a code field
(selcode) is changed on an order which then causes a status field (status)
to change. I tried a trigger but the app may use 2 different update
statements to change these fields depending on what the user does. When the
trigger fires (on update to selcode), the status field has already been
changed. So my trigger to record the changes from inserted and deleted do
not get the true 'before' value of the status field.

The app does use a log table that tracks these changes. The problem I am
having is that 2 records are created, one for the change to selcode and
another for the change to status.

I am looking for help with a script to combine the existence of these 2 log
records into 1 unique record or occurance that I can track.

example:
ordlog: table that logs order changes
ordernr: order number
varname: name of field being changed
old_value: contents of field before change
new_value: contents of field after change
syscreated: date/time of log entry

SELECT ordernr, varname, old_value, new_value, syscreated
FROM ordlog
where varname = 'selcode' and ordernr = '10580'

SELECT ordernr, varname, old_value, new_value, syscreated
FROM ordlog
where varname = 'status' and ordernr = '10580' and old_value = 'A' and
new_value = 'O'

So I need a way to combine these 2 log entries into a unique occurance. The
ordernr and syscreated could be used to link records. syscreated always
appears to be the same for the 2 log entries down to the second. Selcode
can change from NULL to a number of different values or back to NULL.Status
is either 'A' for approved or 'O' for open. An order can have many log
entries during its life. The selcode may be changed several times for the
same order.

Ideally, I would like a result that links 2 log entries and shows the status
changed from 'A' to 'O' when selcode changed.

Thanks for your time.rdraider (rdraider@.sbcglobal.net) writes:

Quote:

Originally Posted by

SELECT ordernr, varname, old_value, new_value, syscreated
FROM ordlog
where varname = 'selcode' and ordernr = '10580'
>
>
SELECT ordernr, varname, old_value, new_value, syscreated
FROM ordlog
where varname = 'status' and ordernr = '10580' and old_value = 'A' and
new_value = 'O'
>
>
So I need a way to combine these 2 log entries into a unique occurance.
The ordernr and syscreated could be used to link records. syscreated
always appears to be the same for the 2 log entries down to the second.
Selcode can change from NULL to a number of different values or back to
NULL.Status is either 'A' for approved or 'O' for open. An order can
have many log entries during its life. The selcode may be changed
several times for the same order.
>
Ideally, I would like a result that links 2 log entries and shows the
status changed from 'A' to 'O' when selcode changed.


Could this do:

SELECT a.ordernr, a.syscreated,
oldselcode = a.old_value, newselcode = a.new_value,
oldstatus = b.old_value, newstatus = b.new_value
FROM ordlog a
JOIN ordlog b ON a.ordernr = b.ordernr
AND datediff(seconds, a.syscreated, b.syscreated) <= 1
WHERE a.varname = 'selcode'
AND b.varname = 'status'
AND coalesce(a.old_value, '') <coalesce(a.new_value, '')
AND a.old_value = 'A'
AND b.new_value = 'B'

Note: this is an untested query.

If the does not return the expected results, I suggest that you post:

o CREATE TABLE statments for the involved table(s).
o INSERT statements with sample data.
o The desired output given the sample.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Sunday, February 19, 2012

How to clear the log (ldf) file?

Hi all.
I have a database I need no auditor to be able to track changes made to it.
As far as I know, the LDF file keeps a record of all the transactions
performed on it which is exactly what I dont want. I've read that it is
impossible to disable logging in MSSQL. Is this 100% true? Has anyone found a
way to keep the logs file clear?
Att,
RODOLFO
Yes, you are right that we cannot "disable"logging in the SQL Server.
If you want to let to SQL Server to manage its LOG file in terms of size ,
so set the recovery model to SIMPLE
For more info please refer to the BOL
"RODOLFO" <RODOLFO@.discussions.microsoft.com> wrote in message
news:99344364-41EF-46BB-A7F2-6621D7944A51@.microsoft.com...
> Hi all.
> I have a database I need no auditor to be able to track changes made to
it.
> As far as I know, the LDF file keeps a record of all the transactions
> performed on it which is exactly what I dont want. I've read that it is
> impossible to disable logging in MSSQL. Is this 100% true? Has anyone
found a
> way to keep the logs file clear?
> Att,
> RODOLFO
|||Hi,
We can not totally stop loggin in sql server.
But if you select the RECOVERY model for your database as SIMPLE then
transaction log will be cleared automatically
Has anyone found a way to keep the logs file clear?
If it is SIMPLE recovery log will be cleared automatically, but for other
recovery model you need to perform the transaction log backup.
See Backup Log command in books online.
Thanks
Hari
SQL Server MVP
"RODOLFO" <RODOLFO@.discussions.microsoft.com> wrote in message
news:99344364-41EF-46BB-A7F2-6621D7944A51@.microsoft.com...
> Hi all.
> I have a database I need no auditor to be able to track changes made to
> it.
> As far as I know, the LDF file keeps a record of all the transactions
> performed on it which is exactly what I dont want. I've read that it is
> impossible to disable logging in MSSQL. Is this 100% true? Has anyone
> found a
> way to keep the logs file clear?
> Att,
> RODOLFO
|||To add to the other responses, the transaction log is required in order to
maintain database consistency. This is used by SQL Server to guarantee
all-or-nothing atomic transactions. Although the log can be used by
third-party tools for auditing purposes, the primary purpose of the log is
to facilitate the backout and roll-forward of transactions.
You can keep transaction log file size reasonable by choosing the
appropriate recovery model and backup strategy for your environment.
Hope this helps.
Dan Guzman
SQL Server MVP
"RODOLFO" <RODOLFO@.discussions.microsoft.com> wrote in message
news:99344364-41EF-46BB-A7F2-6621D7944A51@.microsoft.com...
> Hi all.
> I have a database I need no auditor to be able to track changes made to
> it.
> As far as I know, the LDF file keeps a record of all the transactions
> performed on it which is exactly what I dont want. I've read that it is
> impossible to disable logging in MSSQL. Is this 100% true? Has anyone
> found a
> way to keep the logs file clear?
> Att,
> RODOLFO
|||Hello and thanks a lot for your answers.
I think I understand better the purpose of the log file now reading your
posts. The problem is that it just confirms my fears. I need NO ONE to be
able to perform an audit on this database. The ideal situation will be to
disable this logging. Now I know it can't be done in MS SQL... what's the
closest to it I can get?
Att,
RODOLFO
"Dan Guzman" wrote:

> To add to the other responses, the transaction log is required in order to
> maintain database consistency. This is used by SQL Server to guarantee
> all-or-nothing atomic transactions. Although the log can be used by
> third-party tools for auditing purposes, the primary purpose of the log is
> to facilitate the backout and roll-forward of transactions.
> You can keep transaction log file size reasonable by choosing the
> appropriate recovery model and backup strategy for your environment.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "RODOLFO" <RODOLFO@.discussions.microsoft.com> wrote in message
> news:99344364-41EF-46BB-A7F2-6621D7944A51@.microsoft.com...
>
>
|||If you don't want anyone to read the log then don't give them permissions to
that folder. The physical security of the data files is up to you at the
Windows level.
Andrew J. Kelly SQL MVP
"RODOLFO" <RODOLFO@.discussions.microsoft.com> wrote in message
news:634187D5-A399-4B4A-85D4-3CA9C7FF62B0@.microsoft.com...[vbcol=seagreen]
> Hello and thanks a lot for your answers.
> I think I understand better the purpose of the log file now reading your
> posts. The problem is that it just confirms my fears. I need NO ONE to be
> able to perform an audit on this database. The ideal situation will be to
> disable this logging. Now I know it can't be done in MS SQL... what's the
> closest to it I can get?
> Att,
> RODOLFO
> "Dan Guzman" wrote:

How to clear the log (ldf) file?

Hi all.
I have a database I need no auditor to be able to track changes made to it.
As far as I know, the LDF file keeps a record of all the transactions
performed on it which is exactly what I dont want. I've read that it is
impossible to disable logging in MSSQL. Is this 100% true? Has anyone found
a
way to keep the logs file clear?
Att,
RODOLFOYes, you are right that we cannot "disable"logging in the SQL Server.
If you want to let to SQL Server to manage its LOG file in terms of size ,
so set the recovery model to SIMPLE
For more info please refer to the BOL
"RODOLFO" <RODOLFO@.discussions.microsoft.com> wrote in message
news:99344364-41EF-46BB-A7F2-6621D7944A51@.microsoft.com...
> Hi all.
> I have a database I need no auditor to be able to track changes made to
it.
> As far as I know, the LDF file keeps a record of all the transactions
> performed on it which is exactly what I dont want. I've read that it is
> impossible to disable logging in MSSQL. Is this 100% true? Has anyone
found a
> way to keep the logs file clear?
> Att,
> RODOLFO|||Hi,
We can not totally stop loggin in sql server.
But if you select the RECOVERY model for your database as SIMPLE then
transaction log will be cleared automatically
Has anyone found a way to keep the logs file clear?
If it is SIMPLE recovery log will be cleared automatically, but for other
recovery model you need to perform the transaction log backup.
See Backup Log command in books online.
Thanks
Hari
SQL Server MVP
"RODOLFO" <RODOLFO@.discussions.microsoft.com> wrote in message
news:99344364-41EF-46BB-A7F2-6621D7944A51@.microsoft.com...
> Hi all.
> I have a database I need no auditor to be able to track changes made to
> it.
> As far as I know, the LDF file keeps a record of all the transactions
> performed on it which is exactly what I dont want. I've read that it is
> impossible to disable logging in MSSQL. Is this 100% true? Has anyone
> found a
> way to keep the logs file clear?
> Att,
> RODOLFO|||To add to the other responses, the transaction log is required in order to
maintain database consistency. This is used by SQL Server to guarantee
all-or-nothing atomic transactions. Although the log can be used by
third-party tools for auditing purposes, the primary purpose of the log is
to facilitate the backout and roll-forward of transactions.
You can keep transaction log file size reasonable by choosing the
appropriate recovery model and backup strategy for your environment.
Hope this helps.
Dan Guzman
SQL Server MVP
"RODOLFO" <RODOLFO@.discussions.microsoft.com> wrote in message
news:99344364-41EF-46BB-A7F2-6621D7944A51@.microsoft.com...
> Hi all.
> I have a database I need no auditor to be able to track changes made to
> it.
> As far as I know, the LDF file keeps a record of all the transactions
> performed on it which is exactly what I dont want. I've read that it is
> impossible to disable logging in MSSQL. Is this 100% true? Has anyone
> found a
> way to keep the logs file clear?
> Att,
> RODOLFO|||Hello and thanks a lot for your answers.
I think I understand better the purpose of the log file now reading your
posts. The problem is that it just confirms my fears. I need NO ONE to be
able to perform an audit on this database. The ideal situation will be to
disable this logging. Now I know it can't be done in MS SQL... what's the
closest to it I can get?
Att,
RODOLFO
"Dan Guzman" wrote:

> To add to the other responses, the transaction log is required in order to
> maintain database consistency. This is used by SQL Server to guarantee
> all-or-nothing atomic transactions. Although the log can be used by
> third-party tools for auditing purposes, the primary purpose of the log is
> to facilitate the backout and roll-forward of transactions.
> You can keep transaction log file size reasonable by choosing the
> appropriate recovery model and backup strategy for your environment.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "RODOLFO" <RODOLFO@.discussions.microsoft.com> wrote in message
> news:99344364-41EF-46BB-A7F2-6621D7944A51@.microsoft.com...
>
>|||If you don't want anyone to read the log then don't give them permissions to
that folder. The physical security of the data files is up to you at the
Windows level.
Andrew J. Kelly SQL MVP
"RODOLFO" <RODOLFO@.discussions.microsoft.com> wrote in message
news:634187D5-A399-4B4A-85D4-3CA9C7FF62B0@.microsoft.com...[vbcol=seagreen]
> Hello and thanks a lot for your answers.
> I think I understand better the purpose of the log file now reading your
> posts. The problem is that it just confirms my fears. I need NO ONE to be
> able to perform an audit on this database. The ideal situation will be to
> disable this logging. Now I know it can't be done in MS SQL... what's the
> closest to it I can get?
> Att,
> RODOLFO
> "Dan Guzman" wrote:
>

How to clear the log (ldf) file?

Hi all.
I have a database I need no auditor to be able to track changes made to it.
As far as I know, the LDF file keeps a record of all the transactions
performed on it which is exactly what I dont want. I've read that it is
impossible to disable logging in MSSQL. Is this 100% true? Has anyone found a
way to keep the logs file clear?
Att,
RODOLFOYes, you are right that we cannot "disable"logging in the SQL Server.
If you want to let to SQL Server to manage its LOG file in terms of size ,
so set the recovery model to SIMPLE
For more info please refer to the BOL
"RODOLFO" <RODOLFO@.discussions.microsoft.com> wrote in message
news:99344364-41EF-46BB-A7F2-6621D7944A51@.microsoft.com...
> Hi all.
> I have a database I need no auditor to be able to track changes made to
it.
> As far as I know, the LDF file keeps a record of all the transactions
> performed on it which is exactly what I dont want. I've read that it is
> impossible to disable logging in MSSQL. Is this 100% true? Has anyone
found a
> way to keep the logs file clear?
> Att,
> RODOLFO|||Hi,
We can not totally stop loggin in sql server.
But if you select the RECOVERY model for your database as SIMPLE then
transaction log will be cleared automatically
Has anyone found a way to keep the logs file clear?
If it is SIMPLE recovery log will be cleared automatically, but for other
recovery model you need to perform the transaction log backup.
See Backup Log command in books online.
Thanks
Hari
SQL Server MVP
"RODOLFO" <RODOLFO@.discussions.microsoft.com> wrote in message
news:99344364-41EF-46BB-A7F2-6621D7944A51@.microsoft.com...
> Hi all.
> I have a database I need no auditor to be able to track changes made to
> it.
> As far as I know, the LDF file keeps a record of all the transactions
> performed on it which is exactly what I dont want. I've read that it is
> impossible to disable logging in MSSQL. Is this 100% true? Has anyone
> found a
> way to keep the logs file clear?
> Att,
> RODOLFO|||To add to the other responses, the transaction log is required in order to
maintain database consistency. This is used by SQL Server to guarantee
all-or-nothing atomic transactions. Although the log can be used by
third-party tools for auditing purposes, the primary purpose of the log is
to facilitate the backout and roll-forward of transactions.
You can keep transaction log file size reasonable by choosing the
appropriate recovery model and backup strategy for your environment.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"RODOLFO" <RODOLFO@.discussions.microsoft.com> wrote in message
news:99344364-41EF-46BB-A7F2-6621D7944A51@.microsoft.com...
> Hi all.
> I have a database I need no auditor to be able to track changes made to
> it.
> As far as I know, the LDF file keeps a record of all the transactions
> performed on it which is exactly what I dont want. I've read that it is
> impossible to disable logging in MSSQL. Is this 100% true? Has anyone
> found a
> way to keep the logs file clear?
> Att,
> RODOLFO|||Hello and thanks a lot for your answers.
I think I understand better the purpose of the log file now reading your
posts. The problem is that it just confirms my fears. I need NO ONE to be
able to perform an audit on this database. The ideal situation will be to
disable this logging. Now I know it can't be done in MS SQL... what's the
closest to it I can get?
Att,
RODOLFO
"Dan Guzman" wrote:
> To add to the other responses, the transaction log is required in order to
> maintain database consistency. This is used by SQL Server to guarantee
> all-or-nothing atomic transactions. Although the log can be used by
> third-party tools for auditing purposes, the primary purpose of the log is
> to facilitate the backout and roll-forward of transactions.
> You can keep transaction log file size reasonable by choosing the
> appropriate recovery model and backup strategy for your environment.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "RODOLFO" <RODOLFO@.discussions.microsoft.com> wrote in message
> news:99344364-41EF-46BB-A7F2-6621D7944A51@.microsoft.com...
> > Hi all.
> > I have a database I need no auditor to be able to track changes made to
> > it.
> > As far as I know, the LDF file keeps a record of all the transactions
> > performed on it which is exactly what I dont want. I've read that it is
> > impossible to disable logging in MSSQL. Is this 100% true? Has anyone
> > found a
> > way to keep the logs file clear?
> >
> > Att,
> > RODOLFO
>
>|||If you don't want anyone to read the log then don't give them permissions to
that folder. The physical security of the data files is up to you at the
Windows level.
--
Andrew J. Kelly SQL MVP
"RODOLFO" <RODOLFO@.discussions.microsoft.com> wrote in message
news:634187D5-A399-4B4A-85D4-3CA9C7FF62B0@.microsoft.com...
> Hello and thanks a lot for your answers.
> I think I understand better the purpose of the log file now reading your
> posts. The problem is that it just confirms my fears. I need NO ONE to be
> able to perform an audit on this database. The ideal situation will be to
> disable this logging. Now I know it can't be done in MS SQL... what's the
> closest to it I can get?
> Att,
> RODOLFO
> "Dan Guzman" wrote:
>> To add to the other responses, the transaction log is required in order
>> to
>> maintain database consistency. This is used by SQL Server to guarantee
>> all-or-nothing atomic transactions. Although the log can be used by
>> third-party tools for auditing purposes, the primary purpose of the log
>> is
>> to facilitate the backout and roll-forward of transactions.
>> You can keep transaction log file size reasonable by choosing the
>> appropriate recovery model and backup strategy for your environment.
>> --
>> Hope this helps.
>> Dan Guzman
>> SQL Server MVP
>> "RODOLFO" <RODOLFO@.discussions.microsoft.com> wrote in message
>> news:99344364-41EF-46BB-A7F2-6621D7944A51@.microsoft.com...
>> > Hi all.
>> > I have a database I need no auditor to be able to track changes made to
>> > it.
>> > As far as I know, the LDF file keeps a record of all the transactions
>> > performed on it which is exactly what I dont want. I've read that it is
>> > impossible to disable logging in MSSQL. Is this 100% true? Has anyone
>> > found a
>> > way to keep the logs file clear?
>> >
>> > Att,
>> > RODOLFO
>>