Friday, March 30, 2012

Log parser

Can someone send me the command to import the application and system log of
the eventlogs into SQL Server for say 2 different servers ?
Does the command have to run every few mins ? How does it handle
duplicates,etc. ? I would like to have the logs in the database no later
than say 15 mins from the time they make it in the respective log. But I
dont know how log parser is smart enough to do that unless I run it every 5
mins but then again, what does it scan for and only ensures it does not
insert duplicates
Thanks
You have to write something custom to do this. You can do it with an SSIS
WMI data reader task. The class to look at is win32_ntlogevent.
Other options include powershell to from xp_cmdshell or a CLR function to
get to WMI.
Jason Massie
http://statisticsio.com
"Hassan" <hassan@.test.com> wrote in message
news:ut0pOZvKIHA.5360@.TK2MSFTNGP03.phx.gbl...
> Can someone send me the command to import the application and system log
> of the eventlogs into SQL Server for say 2 different servers ?
> Does the command have to run every few mins ? How does it handle
> duplicates,etc. ? I would like to have the logs in the database no later
> than say 15 mins from the time they make it in the respective log. But I
> dont know how log parser is smart enough to do that unless I run it every
> 5 mins but then again, what does it scan for and only ensures it does not
> insert duplicates
> Thanks
>

Log on server error

Hi all i am using crystal report with asp .net.

i am using report files already created an configured with a dsn.

when i try to view the report using crystal report viewer in a web form i am getting the error

"CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed."

i am using

<code>
ConnectionInfo cnnInfo = new ConnectionInfo ( ) ;

cnnInfo.ServerName = strConnInformation[0] ;
cnnInfo.DatabaseName = strConnInformation[1] ;
cnnInfo.UserID = strConnInformation[2] ;
cnnInfo.Password = strConnInformation[3] ;

ReportDocument rptDoc = new ReportDocument ( ) ;
rptDoc.Load ( Server.MapPath ( "..//Reports//" + reportFileName ),
OpenReportMethod.OpenReportByDefault ) ;

//CrystalDecisions.CrystalReports.Engine.Table table = rptDoc.Database.Tables[0] ;

CrystalDecisions.CrystalReports.Engine.Tables rptTables = rptDoc.Database.Tables ;
foreach ( CrystalDecisions.CrystalReports.Engine.Table tbl in rptTables )
{
tblLogOnInfo = tbl.LogOnInfo ;
tblLogOnInfo.ConnectionInfo = cnnInfo ;
tbl.ApplyLogOnInfo ( tblLogOnInfo ) ;

if ( tbl.Location.IndexOf ( "." ) > 0 )
{
tbl.Location = tbl.Location.Substring (
tbl.Location.LastIndexOf(".") + 1 ) ;
}
else
{
//tbl.Location = tbl.Location ;
}
}

</code>

its working fine when i try to execute a report file which configured direct to a database in another machine by specifying the server name, database name, user id and the password,

its showing the error only when i try to execute the report which configured using dsn. dsn is created in my machine and the actual database server is another one.

can any one help me in this matter as i have to use the reports with dsn only in my application.

i got the informations from the net that its same for both type of connectivity to use the ConnectionInfo object and the TableLogonInfo objects.

what my be the problem with me.

is its related to any permision issues.Hai Vinod,

Even i faced the same problem with my C# and Access .
But this prblem arised only when i have a subreport in my main report.

Do u have any subreports in ur appli...If so u have to provide login information to those reports also.

regards,
Kolluru.|||Thanks for your reply kolluru. i will try this and will get back :)|||Do u have any subreports in ur appli...If so u have to provide login information to those reports also.

Im having the same problem and I have subreports. How do you provide the login details for the subreports?sql

Log On problems...

I've installed MSDE w/no problem - but what username & password do I use (well, I know what password since I specified it in the *.ini file before install) - but username?
Cassinni or IIS web server - I can't log on and do anything w/MSDE. Do I have to edit something w/a username, make one up, use one from that's built into windows? I've tried both settings _ windows authentication and SQL Server - but nothing. Any sugge
stions?
The default user ID is "sa". If you set the server to use Windows Authentication, you cannot logon with this user ID - at least via applications. This ID must be given a strong password. You can do that with the osql utility provided with MSDE.
If this is MSDE2000A, read the Jan 2004 version of the Readme2000A.htm that comes with the bundle. Also get a hold of the updates to this file.
I also suggest the SQL Server Books Online help file. This is downloadable at no charge and must be installed.
Mark Ferguson
"steve02a" wrote:

> I've installed MSDE w/no problem - but what username & password do I use (well, I know what password since I specified it in the *.ini file before install) - but username?
> Cassinni or IIS web server - I can't log on and do anything w/MSDE. Do I have to edit something w/a username, make one up, use one from that's built into windows? I've tried both settings _ windows authentication and SQL Server - but nothing. Any sug
gestions?

Log on Problem.

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!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.

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!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.

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!
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 on problem

Why I can't make change account from Log on tab in properties MSSQLSERVER
service?
Regardless of account, I gett this error: "Could not start the MSSQLSERVER
service on Local Computer.
Error 1096: The service did not start to a logon failure."
SQL Server does work only with Local system account?!
Thanks
(MS SQLserver 2000 , WinXP SP2)You should never change the account directly thru the service. You need to
use Enterprise Manager instead as it sets other rights and properties that
the service panel does not.
Andrew J. Kelly SQL MVP
"ER" <vladoer@.email.t-com.hr> wrote in message
news:dufrvi$rlq$1@.ss405.t-com.hr...
> Why I can't make change account from Log on tab in properties MSSQLSERVER
> service?
> Regardless of account, I gett this error: "Could not start the MSSQLSERVER
> service on Local Computer.
> Error 1096: The service did not start to a logon failure."
> SQL Server does work only with Local system account?!
> Thanks
> (MS SQLserver 2000 , WinXP SP2)
>|||"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:%235vQSLSQGHA.564@.TK2MSFTNGP12.phx.gbl...
> You should never change the account directly thru the service. You need to
> use Enterprise Manager instead as it sets other rights and properties that
> the service panel does not.
> --
> Andrew J. Kelly SQL MVP
I gett error all the same|||Are there any msgs in the event logs? Does it work with the local admin
account?
Andrew J. Kelly SQL MVP
"ER" <vladoer@.email.t-com.hr> wrote in message
news:duihmd$ru9$1@.ss405.t-com.hr...
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:%235vQSLSQGHA.564@.TK2MSFTNGP12.phx.gbl...
> I gett error all the same
>|||Andrew J. Kelly wrote:
> You should never change the account directly thru the service. You need to
> use Enterprise Manager instead as it sets other rights and properties that
> the service panel does not.
>
Just curious - which right is it that's being applied though EM and not
in the services panel?
I normally handle all changes to services from the services panel and I
don't recall that I've ever had problems with that.
Regards
Steen|||It depends upon the permissions configured for the new account. For instance
if you use the service panel to change a SQL Server service to run using
some administrator account, you probably won't have a problem. But if you
use the service panel to change a SQL Server service to to run under a low
priveledged user, then SQL Server might not be able to access sqlservr.exe
on the file system (and a bunch of other stuff). But if you use the SQL
Server tools, the tools will check to make sure the new account has adequate
access.
--
Rick Byham
MCDBA, MCSE, MCSA
Documentation Manager,
Microsoft, SQL Server Books Online
This posting is provided "as is" with
no warranties, and confers no rights.
"Steen Persson (DK)" <spe@.REMOVEdatea.dk> wrote in message
news:uHsEWEsQGHA.336@.TK2MSFTNGP12.phx.gbl...
> Andrew J. Kelly wrote:
> Just curious - which right is it that's being applied though EM and not in
> the services panel?
> I normally handle all changes to services from the services panel and I
> don't recall that I've ever had problems with that.
> Regards
> Steen|||I have solved the problem. The difficulty was that I had a User Account
without password in my machine.
Thanks for your answer.|||Rick Byham [MS] wrote:
> It depends upon the permissions configured for the new account. For instan
ce
> if you use the service panel to change a SQL Server service to run using
> some administrator account, you probably won't have a problem. But if you
> use the service panel to change a SQL Server service to to run under a low
> priveledged user, then SQL Server might not be able to access sqlservr.exe
> on the file system (and a bunch of other stuff). But if you use the SQL
> Server tools, the tools will check to make sure the new account has adequa
te
> access.
Ok - that makes sense.
Regards
Steensql