Friday, March 30, 2012
Log on Problem.
for internal program that connects back to SQL Server. When I rebooted the
server last night, in the morning users complainted that they can't log on
into it. As soon as I walked up to the server and simply logged in,
everything started to work. My question is why. All my services are set to
system accounts and to Automatic starts so everything should be started when
the server starts. How can I diagnose this?
Thank You!These are possibly programs that are in your Startup routine after you
login.
If you're running Windows 2003 click the Start button > Run > Msconfig.exe.
Check the Startup tab for programs that are loading at startup from the
Startup group, Win.ini load= and run=, and the registry.
For Windows 2000, use regedit & check the following entries:
HKEY_LOCAL_MACHINE \SOFTWARE \Microsoft \Windows \CurrentVersion \Run
HKEY_LOCAL_MACHINE \SOFTWARE \Microsoft \Windows \CurrentVersion \RunOnce
HKEY_CURRENT_USER \Software \Microsoft \Windows \CurrentVersion \Run
HKEY_CURRENT_USER \Software \Microsoft \Windows \CurrentVersion \Runonce
"Kory" <koryg@.community.nospam> wrote in message
news:uIxvwLd8FHA.3416@.TK2MSFTNGP15.phx.gbl...
> OK. I have a little problem that i need help diagnosing. I have a
Webpage
> for internal program that connects back to SQL Server. When I rebooted
the
> server last night, in the morning users complainted that they can't log on
> into it. As soon as I walked up to the server and simply logged in,
> everything started to work. My question is why. All my services are set
to
> system accounts and to Automatic starts so everything should be started
when
> the server starts. How can I diagnose this?
> Thank You!
>|||I'm running windows 2003. So basically I should remove these files from
Startup and move them to WIN.INI'
"Isaac Steinfeld" <isteinfeld@.hotmail.com> wrote in message
news:%23tM6PYd8FHA.1292@.tk2msftngp13.phx.gbl...
> These are possibly programs that are in your Startup routine after you
> login.
> If you're running Windows 2003 click the Start button > Run >
> Msconfig.exe.
> Check the Startup tab for programs that are loading at startup from the
> Startup group, Win.ini load= and run=, and the registry.
> For Windows 2000, use regedit & check the following entries:
> HKEY_LOCAL_MACHINE \SOFTWARE \Microsoft \Windows \CurrentVersion \Run
> HKEY_LOCAL_MACHINE \SOFTWARE \Microsoft \Windows \CurrentVersion \RunOnce
> HKEY_CURRENT_USER \Software \Microsoft \Windows \CurrentVersion \Run
> HKEY_CURRENT_USER \Software \Microsoft \Windows \CurrentVersion \Runonce
> "Kory" <koryg@.community.nospam> wrote in message
> news:uIxvwLd8FHA.3416@.TK2MSFTNGP15.phx.gbl...
>> OK. I have a little problem that i need help diagnosing. I have a
> Webpage
>> for internal program that connects back to SQL Server. When I rebooted
> the
>> server last night, in the morning users complainted that they can't log
>> on
>> into it. As soon as I walked up to the server and simply logged in,
>> everything started to work. My question is why. All my services are set
> to
>> system accounts and to Automatic starts so everything should be started
> when
>> the server starts. How can I diagnose this?
>> Thank You!
>>
>|||No.
You have a few options to have programs run without requiring a login.
One is to have these programs run as User-defined service.
See the following link for instructions:
http://support.microsoft.com/support/kb/articles/q137/8/90.asp
Another is to have it run as a Computer Script. (Either as a local policy or
as a group policy depending on your environment)
Run gpedit.msc and create a startup scripts at Computer Configuration
>Windows Settings>Scripts>Startup.
See the following link:
http://support.microsoft.com/default.aspx?scid=kb;en-us;322241
Another option might be to do an Autologon. See
http://www.petri.co.il/configuring_autologon.htm
"Kory" <koryg@.community.nospam> wrote in message
news:%23s5Qahd8FHA.444@.TK2MSFTNGP11.phx.gbl...
> I'm running windows 2003. So basically I should remove these files from
> Startup and move them to WIN.INI'
>
> "Isaac Steinfeld" <isteinfeld@.hotmail.com> wrote in message
> news:%23tM6PYd8FHA.1292@.tk2msftngp13.phx.gbl...
> > These are possibly programs that are in your Startup routine after you
> > login.
> > If you're running Windows 2003 click the Start button > Run >
> > Msconfig.exe.
> > Check the Startup tab for programs that are loading at startup from the
> > Startup group, Win.ini load= and run=, and the registry.
> > For Windows 2000, use regedit & check the following entries:
> > HKEY_LOCAL_MACHINE \SOFTWARE \Microsoft \Windows \CurrentVersion \Run
> > HKEY_LOCAL_MACHINE \SOFTWARE \Microsoft \Windows \CurrentVersion
\RunOnce
> > HKEY_CURRENT_USER \Software \Microsoft \Windows \CurrentVersion \Run
> > HKEY_CURRENT_USER \Software \Microsoft \Windows \CurrentVersion \Runonce
> >
> > "Kory" <koryg@.community.nospam> wrote in message
> > news:uIxvwLd8FHA.3416@.TK2MSFTNGP15.phx.gbl...
> >> OK. I have a little problem that i need help diagnosing. I have a
> > Webpage
> >> for internal program that connects back to SQL Server. When I
rebooted
> > the
> >> server last night, in the morning users complainted that they can't log
> >> on
> >> into it. As soon as I walked up to the server and simply logged in,
> >> everything started to work. My question is why. All my services are
set
> > to
> >> system accounts and to Automatic starts so everything should be started
> > when
> >> the server starts. How can I diagnose this?
> >>
> >> Thank You!
> >>
> >>
> >
> >
>
Log on Problem.
for internal program that connects back to SQL Server. When I rebooted the
server last night, in the morning users complainted that they can't log on
into it. As soon as I walked up to the server and simply logged in,
everything started to work. My question is why. All my services are set to
system accounts and to Automatic starts so everything should be started when
the server starts. How can I diagnose this?
Thank You!These are possibly programs that are in your Startup routine after you
login.
If you're running Windows 2003 click the Start button > Run > Msconfig.exe.
Check the Startup tab for programs that are loading at startup from the
Startup group, Win.ini load= and run=, and the registry.
For Windows 2000, use regedit & check the following entries:
HKEY_LOCAL_MACHINE \SOFTWARE \Microsoft \Windows \CurrentVersion \Run
HKEY_LOCAL_MACHINE \SOFTWARE \Microsoft \Windows \CurrentVersion \RunOnce
HKEY_CURRENT_USER \Software \Microsoft \Windows \CurrentVersion \Run
HKEY_CURRENT_USER \Software \Microsoft \Windows \CurrentVersion \Runonce
"Kory" <koryg@.community.nospam> wrote in message
news:uIxvwLd8FHA.3416@.TK2MSFTNGP15.phx.gbl...
> OK. I have a little problem that i need help diagnosing. I have a
Webpage
> for internal program that connects back to SQL Server. When I rebooted
the
> server last night, in the morning users complainted that they can't log on
> into it. As soon as I walked up to the server and simply logged in,
> everything started to work. My question is why. All my services are set
to
> system accounts and to Automatic starts so everything should be started
when
> the server starts. How can I diagnose this?
> Thank You!
>|||I'm running windows 2003. So basically I should remove these files from
Startup and move them to WIN.INI'
"Isaac Steinfeld" <isteinfeld@.hotmail.com> wrote in message
news:%23tM6PYd8FHA.1292@.tk2msftngp13.phx.gbl...
> These are possibly programs that are in your Startup routine after you
> login.
> If you're running Windows 2003 click the Start button > Run >
> Msconfig.exe.
> Check the Startup tab for programs that are loading at startup from the
> Startup group, Win.ini load= and run=, and the registry.
> For Windows 2000, use regedit & check the following entries:
> HKEY_LOCAL_MACHINE \SOFTWARE \Microsoft \Windows \CurrentVersion \Run
> HKEY_LOCAL_MACHINE \SOFTWARE \Microsoft \Windows \CurrentVersion \RunOnce
> HKEY_CURRENT_USER \Software \Microsoft \Windows \CurrentVersion \Run
> HKEY_CURRENT_USER \Software \Microsoft \Windows \CurrentVersion \Runonce
> "Kory" <koryg@.community.nospam> wrote in message
> news:uIxvwLd8FHA.3416@.TK2MSFTNGP15.phx.gbl...
> Webpage
> the
> to
> when
>|||No.
You have a few options to have programs run without requiring a login.
One is to have these programs run as User-defined service.
See the following link for instructions:
http://support.microsoft.com/suppor...s/q137/8/90.asp
Another is to have it run as a Computer Script. (Either as a local policy or
as a group policy depending on your environment)
Run gpedit.msc and create a startup scripts at Computer Configuration
>Windows Settings>Scripts>Startup.
See the following link:
http://support.microsoft.com/defaul...kb;en-us;322241
Another option might be to do an Autologon. See
http://www.petri.co.il/configuring_autologon.htm
"Kory" <koryg@.community.nospam> wrote in message
news:%23s5Qahd8FHA.444@.TK2MSFTNGP11.phx.gbl...
> I'm running windows 2003. So basically I should remove these files from
> Startup and move them to WIN.INI'
>
> "Isaac Steinfeld" <isteinfeld@.hotmail.com> wrote in message
> news:%23tM6PYd8FHA.1292@.tk2msftngp13.phx.gbl...
\RunOnce[vbcol=seagreen]
rebooted[vbcol=seagreen]
set[vbcol=seagreen]
>
Log on Problem.
for internal program that connects back to SQL Server. When I rebooted the
server last night, in the morning users complainted that they can't log on
into it. As soon as I walked up to the server and simply logged in,
everything started to work. My question is why. All my services are set to
system accounts and to Automatic starts so everything should be started when
the server starts. How can I diagnose this?
Thank You!
These are possibly programs that are in your Startup routine after you
login.
If you're running Windows 2003 click the Start button > Run > Msconfig.exe.
Check the Startup tab for programs that are loading at startup from the
Startup group, Win.ini load= and run=, and the registry.
For Windows 2000, use regedit & check the following entries:
HKEY_LOCAL_MACHINE \SOFTWARE \Microsoft \Windows \CurrentVersion \Run
HKEY_LOCAL_MACHINE \SOFTWARE \Microsoft \Windows \CurrentVersion \RunOnce
HKEY_CURRENT_USER \Software \Microsoft \Windows \CurrentVersion \Run
HKEY_CURRENT_USER \Software \Microsoft \Windows \CurrentVersion \Runonce
"Kory" <koryg@.community.nospam> wrote in message
news:uIxvwLd8FHA.3416@.TK2MSFTNGP15.phx.gbl...
> OK. I have a little problem that i need help diagnosing. I have a
Webpage
> for internal program that connects back to SQL Server. When I rebooted
the
> server last night, in the morning users complainted that they can't log on
> into it. As soon as I walked up to the server and simply logged in,
> everything started to work. My question is why. All my services are set
to
> system accounts and to Automatic starts so everything should be started
when
> the server starts. How can I diagnose this?
> Thank You!
>
|||I'm running windows 2003. So basically I should remove these files from
Startup and move them to WIN.INI?
"Isaac Steinfeld" <isteinfeld@.hotmail.com> wrote in message
news:%23tM6PYd8FHA.1292@.tk2msftngp13.phx.gbl...
> These are possibly programs that are in your Startup routine after you
> login.
> If you're running Windows 2003 click the Start button > Run >
> Msconfig.exe.
> Check the Startup tab for programs that are loading at startup from the
> Startup group, Win.ini load= and run=, and the registry.
> For Windows 2000, use regedit & check the following entries:
> HKEY_LOCAL_MACHINE \SOFTWARE \Microsoft \Windows \CurrentVersion \Run
> HKEY_LOCAL_MACHINE \SOFTWARE \Microsoft \Windows \CurrentVersion \RunOnce
> HKEY_CURRENT_USER \Software \Microsoft \Windows \CurrentVersion \Run
> HKEY_CURRENT_USER \Software \Microsoft \Windows \CurrentVersion \Runonce
> "Kory" <koryg@.community.nospam> wrote in message
> news:uIxvwLd8FHA.3416@.TK2MSFTNGP15.phx.gbl...
> Webpage
> the
> to
> when
>
|||No.
You have a few options to have programs run without requiring a login.
One is to have these programs run as User-defined service.
See the following link for instructions:
http://support.microsoft.com/support.../q137/8/90.asp
Another is to have it run as a Computer Script. (Either as a local policy or
as a group policy depending on your environment)
Run gpedit.msc and create a startup scripts at Computer Configuration
>Windows Settings>Scripts>Startup.
See the following link:
http://support.microsoft.com/default...b;en-us;322241
Another option might be to do an Autologon. See
http://www.petri.co.il/configuring_autologon.htm
"Kory" <koryg@.community.nospam> wrote in message
news:%23s5Qahd8FHA.444@.TK2MSFTNGP11.phx.gbl...[vbcol=seagreen]
> I'm running windows 2003. So basically I should remove these files from
> Startup and move them to WIN.INI?
>
> "Isaac Steinfeld" <isteinfeld@.hotmail.com> wrote in message
> news:%23tM6PYd8FHA.1292@.tk2msftngp13.phx.gbl...
\RunOnce[vbcol=seagreen]
rebooted[vbcol=seagreen]
set
>
Log Ins
CREATE TABLE [Sample]
([SampleID] [uniqueidentifier] NOT NULL,
[Sample] [varchar] (50) NOT NULL,
[Modified] [datetime] NULL,
[Modifier] [varchar] (100) NULL)
ALTER TABLE [dbo].[Sample] WITH NOCHECK ADD
CONSTRAINT [PK_Sample] PRIMARY KEY CLUSTERED ([SampleID])
ALTER TABLE [dbo].[Sample] ADD CONSTRAINT [DF_Sample_SampleID] DEFAULT (newid()) FOR [SampleID]
ALTER TABLE [dbo].[Sample] ADD CONSTRAINT IX_Sample UNIQUE NONCLUSTERED ([Sample]) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
ALTER TABLE [dbo].[Sample] ADD CONSTRAINT [DF_Sample_Modified] DEFAULT (getdate()) FOR [Modified]
ALTER TABLE [dbo].[Sample] ADD CONSTRAINT [DF_Sample_Modifier] DEFAULT (convert(varchar(100), host_name() + ':' + suser_sname() + '(' + current_user + ') - ' + app_name())) FOR [Modifier]
GO
CREATE TRIGGER TR_Sample_U ON [dbo].[Sample]
FOR UPDATE
AS
set nocount on
update [Sample]
set Modified = getdate(),
Modifier = convert(varchar(100), host_name() + ':' + Original_Login() + '(' + current_user + ') - ' + app_name())
from [Sample]
inner join inserted on [Sample].[SampleID] = inserted.[SampleID]
GO|||How are you these days? Thank you for your reply, I give it a shot|||I'm doing fine thank you.
Try this script. Just enter your table name in the appropriate variable and indicated whether you want to use GUIDs or Identities for a surrogate key, and execute the script in text mode. It will write a script that you can copy and paste to create your new table.
set nocount on
declare @.TableName varchar(50)
declare @.UseGUIDs varchar(4)
set @.TableName = 'SampleRecords'
set @.UseGUIDs = 'Y' --'Y' for GUIDs, 'N' for Identity
declare @.EntityName varchar(50)
declare @.IDName varchar(50)
declare @.Version char(4)
set @.Version = substring(@.@.Version, 22, 4)
if right(@.TableName, 3) = 'ies' set @.EntityName = left(@.TableName, len(@.TableName)-3) + 'y'
else if right(@.TableName, 4) = 'sses' set @.EntityName = left(@.TableName, len(@.TableName)-2)
else if right(@.TableName, 6) = 'status' set @.EntityName = @.TableName
else if right(@.TableName, 8) = 'statuses' set @.EntityName = left(@.TableName, len(@.TableName)-2)
else if right(@.TableName, 1) = 's' set @.EntityName = left(@.TableName, len(@.TableName)-1)
else set @.EntityName = @.TableName
if right(@.TableName, 3) = 'ies' set @.IDName = left(@.TableName, len(@.TableName)-3) + 'yID'
else if right(@.TableName, 4) = 'sses' set @.IDName = left(@.TableName, len(@.TableName)-2) + 'ID'
else if right(@.TableName, 6) = 'status' set @.IDName = @.TableName + 'ID'
else if right(@.TableName, 8) = 'statuses' set @.IDName = left(@.TableName, len(@.TableName)-2) + 'ID'
else if right(@.TableName, 1) = 's' set @.IDName = left(@.TableName, len(@.TableName)-1) + 'ID'
else set @.IDName = @.TableName + 'ID'
declare @.SQLString varchar(8000)
set @.SQLString =
'Use ' + case when db_name() in ('master', 'msdb', 'model') then '[XXX]' else db_name() end + '
' + replace('GXO' ,'X', '') + '
CREATE TABLE [' + @.TableName + ']
([' + @.IDName + '] ' + Case when @.UseGUIDs = 'Y' then '[uniqueidentifier] NOT NULL' else '[bigint] IDENTITY(1,1) NOT NULL' end + ',
[' + @.EntityName + '] [varchar] (50) NOT NULL,
[Modified] [datetime] NULL,
[Modifier] [varchar] (100) NULL)
ALTER TABLE [dbo].[' + @.TableName + '] WITH NOCHECK ADD
CONSTRAINT [PK_' + @.TableName + '] PRIMARY KEY CLUSTERED ([' + @.IDName + '])
' + Case when @.UseGUIDs = 'Y' then 'ALTER TABLE [dbo].[' + @.TableName + '] ADD CONSTRAINT [DF_' + @.TableName + '_' + @.IDName + '] DEFAULT (newid()) FOR [' + @.IDName + ']' else '' end + '
ALTER TABLE [dbo].[' + @.TableName + '] ADD CONSTRAINT IX_' + @.TableName + ' UNIQUE NONCLUSTERED ([' + @.EntityName + '])
ALTER TABLE [dbo].[' + @.TableName + '] ADD CONSTRAINT [DF_' + @.TableName + '_Modified] DEFAULT (getdate()) FOR [Modified]
ALTER TABLE [dbo].[' + @.TableName + '] ADD CONSTRAINT [DF_' + @.TableName + '_Modifier] DEFAULT (convert(varchar(100), host_name() + '':'' + suser_sname() + ''('' + current_user + '') - '' + app_name())) FOR [Modifier]
' + replace('GXO' ,'X', '') + '
CREATE TRIGGER TR_' + @.TableName + '_U ON [dbo].[' + @.TableName + ']
FOR UPDATE
AS
set nocount on
update [' + @.TableName + ']
set Modified = getdate(),
' + case when @.Version >= '2005'
then ' Modifier = convert(varchar(100), host_name() + '':'' + Original_Login() + ''('' + current_user + '') - '' + app_name())'
else ' Modifier = convert(varchar(100), host_name() + '':'' + suser_sname() + ''('' + current_user + '') - '' + app_name())'
end + '
from [' + @.TableName + ']
inner join inserted on [' + @.TableName + '].[' + @.IDName + '] = inserted.[' + @.IDName + ']
' + replace('GXO' ,'X', '') + ''
select @.SQLString
See how lazy I am?|||Hi all I was wondering how would I keep tabs on when users enter data in a database? Can I create a field or program a table to keep track of the users that enter in data so theres no mix up, to automatically keep track of users entering in data
Do you have sproc access only?|||I'm doing fine thank you.
Try this script. Just enter your table name in the appropriate variable and indicated whether you want to use GUIDs or Identities for a surrogate key, and execute the script in text mode. It will write a script that you can copy and paste to create your new table.
set nocount on
declare @.TableName varchar(50)
declare @.UseGUIDs varchar(4)
set @.TableName = 'SampleRecords'
set @.UseGUIDs = 'Y' --'Y' for GUIDs, 'N' for Identity
declare @.EntityName varchar(50)
declare @.IDName varchar(50)
declare @.Version char(4)
set @.Version = substring(@.@.Version, 22, 4)
if right(@.TableName, 3) = 'ies' set @.EntityName = left(@.TableName, len(@.TableName)-3) + 'y'
else if right(@.TableName, 4) = 'sses' set @.EntityName = left(@.TableName, len(@.TableName)-2)
else if right(@.TableName, 6) = 'status' set @.EntityName = @.TableName
else if right(@.TableName, 8) = 'statuses' set @.EntityName = left(@.TableName, len(@.TableName)-2)
else if right(@.TableName, 1) = 's' set @.EntityName = left(@.TableName, len(@.TableName)-1)
else set @.EntityName = @.TableName
if right(@.TableName, 3) = 'ies' set @.IDName = left(@.TableName, len(@.TableName)-3) + 'yID'
else if right(@.TableName, 4) = 'sses' set @.IDName = left(@.TableName, len(@.TableName)-2) + 'ID'
else if right(@.TableName, 6) = 'status' set @.IDName = @.TableName + 'ID'
else if right(@.TableName, 8) = 'statuses' set @.IDName = left(@.TableName, len(@.TableName)-2) + 'ID'
else if right(@.TableName, 1) = 's' set @.IDName = left(@.TableName, len(@.TableName)-1) + 'ID'
else set @.IDName = @.TableName + 'ID'
declare @.SQLString varchar(8000)
set @.SQLString =
'Use ' + case when db_name() in ('master', 'msdb', 'model') then '[XXX]' else db_name() end + '
' + replace('GXO' ,'X', '') + '
CREATE TABLE [' + @.TableName + ']
([' + @.IDName + '] ' + Case when @.UseGUIDs = 'Y' then '[uniqueidentifier] NOT NULL' else '[bigint] IDENTITY(1,1) NOT NULL' end + ',
[' + @.EntityName + '] [varchar] (50) NOT NULL,
[Modified] [datetime] NULL,
[Modifier] [varchar] (100) NULL)
ALTER TABLE [dbo].[' + @.TableName + '] WITH NOCHECK ADD
CONSTRAINT [PK_' + @.TableName + '] PRIMARY KEY CLUSTERED ([' + @.IDName + '])
' + Case when @.UseGUIDs = 'Y' then 'ALTER TABLE [dbo].[' + @.TableName + '] ADD CONSTRAINT [DF_' + @.TableName + '_' + @.IDName + '] DEFAULT (newid()) FOR [' + @.IDName + ']' else '' end + '
ALTER TABLE [dbo].[' + @.TableName + '] ADD CONSTRAINT IX_' + @.TableName + ' UNIQUE NONCLUSTERED ([' + @.EntityName + '])
ALTER TABLE [dbo].[' + @.TableName + '] ADD CONSTRAINT [DF_' + @.TableName + '_Modified] DEFAULT (getdate()) FOR [Modified]
ALTER TABLE [dbo].[' + @.TableName + '] ADD CONSTRAINT [DF_' + @.TableName + '_Modifier] DEFAULT (convert(varchar(100), host_name() + '':'' + suser_sname() + ''('' + current_user + '') - '' + app_name())) FOR [Modifier]
' + replace('GXO' ,'X', '') + '
CREATE TRIGGER TR_' + @.TableName + '_U ON [dbo].[' + @.TableName + ']
FOR UPDATE
AS
set nocount on
update [' + @.TableName + ']
set Modified = getdate(),
' + case when @.Version >= '2005'
then ' Modifier = convert(varchar(100), host_name() + '':'' + Original_Login() + ''('' + current_user + '') - '' + app_name())'
else ' Modifier = convert(varchar(100), host_name() + '':'' + suser_sname() + ''('' + current_user + '') - '' + app_name())'
end + '
from [' + @.TableName + ']
inner join inserted on [' + @.TableName + '].[' + @.IDName + '] = inserted.[' + @.IDName + ']
' + replace('GXO' ,'X', '') + ''
select @.SQLString
See how lazy I am?
I needed to figure something out for keeping track of who is entering data and when. I was looking on BOL to see if I can find something, I'm the main DBA so I have full access to sql enterprise 2005 which I am still learning about. But I think I like 2005 better|||Hi Blindman when I run it I get error messages
Msg 102, Level 15, State 1, Line 13
Incorrect syntax near ')'.
Msg 105, Level 15, State 1, Line 30
Unclosed quotation mark after the character string '
'.
Msg 102, Level 15, State 1, Line 30
Incorrect syntax near '
'.|||Make sure your query tool is not truncating the results. You will need to bump up the max resultset characters option to 8000.
Friday, March 9, 2012
Log file
Can I create a databate without a log file even if I want to use
transations in my program ?Do yuo mean the transaciton log? No every SQL database has a tran log, you can set the recovery mode to simple and it will truncate the log upon checkpoint to keep it small. Not sure if that is what your question is...
HTH
Friday, February 24, 2012
log all queries
In order to debug a program written for us I'd like to log all
queries to a database/a specific table in MS SQL Server 2000.
Are there any options to get a logging like this and how do I
enable it?
--
Marco Dieckhoff
icq# 22243433
GPG Key 0x1A6C95BA -- http://www.frankonia-brunonia.de/keysNot exactly. One clumsy option, is to turn on the profiler to track the
SELECT statements & dumb them into an ASCII file. On large databases with
heavy transactions, this may not be worth it though.
--
- Anith
( Please reply to newsgroups only )|||"Marco Dieckhoff" <dieck@.gmx.de> wrote in message
news:bj9m97$nes$2@.rzcomm2.rz.tu-bs.de...
> Hi!
> In order to debug a program written for us I'd like to log all
> queries to a database/a specific table in MS SQL Server 2000.
> Are there any options to get a logging like this and how do I
> enable it?
> --
> Marco Dieckhoff
> icq# 22243433
> GPG Key 0x1A6C95BA -- http://www.frankonia-brunonia.de/keys
You can use Profiler, and set a filter for the tables/databases that you're
interested in. You can either run the trace from the Profiler GUI, or by
creating a server-side trace with the sp_trace% procs. There is plenty of
information on this in Books Online.
Simon|||Hello,
How about writing a trigger attached to the table in question for
select/update/delete operations that will record data to some audit table?
TK
"Marco Dieckhoff" <dieck@.gmx.de> wrote in message
news:bj9m97$nes$2@.rzcomm2.rz.tu-bs.de...
> Hi!
> In order to debug a program written for us I'd like to log all
> queries to a database/a specific table in MS SQL Server 2000.
> Are there any options to get a logging like this and how do I
> enable it?
> --
> Marco Dieckhoff
> icq# 22243433
> GPG Key 0x1A6C95BA -- http://www.frankonia-brunonia.de/keys|||Select triggers are not in SQL 2000!!
If you access your tables by stored procedure then you can implement an
auditing function.
John
"Tom Kitta" <tom@.energyshop.com> wrote in message
news:B727b.28098$mk1.12186@.news02.bloor.is.net.cab le.rogers.com...
> Hello,
> How about writing a trigger attached to the table in question for
> select/update/delete operations that will record data to some audit table?
> TK
>
> "Marco Dieckhoff" <dieck@.gmx.de> wrote in message
> news:bj9m97$nes$2@.rzcomm2.rz.tu-bs.de...
> > Hi!
> > In order to debug a program written for us I'd like to log all
> > queries to a database/a specific table in MS SQL Server 2000.
> > Are there any options to get a logging like this and how do I
> > enable it?
> > --
> > Marco Dieckhoff
> > icq# 22243433
> > GPG Key 0x1A6C95BA -- http://www.frankonia-brunonia.de/keys