How Autorestart Sql Prifile Trace After Server Reboot ?
Sep 5, 2001how autorestart sql prifile trace after NT server reboot or or after shotdown and restart of Sql server ?
thanks
how autorestart sql prifile trace after NT server reboot or or after shotdown and restart of Sql server ?
thanks
SQL Server in on a ‘member’ server in my company domain (We took the ‘stand-alone’ option when installing NT on this server).
I have set up an NT domain account for SQL ServerAgent ‘Service startup account’ which is a different account than the NT domain account listed in the SQL Server Properties, Security tab, ‘Startup service account’.
I log on to this server with the login in the latter.
Replication is working OK, but my application log keeps filling up with the message “SQLServerAgent security context does not have server autorestart privileges”.
What have I done wrong?
Thanks,
Judith
I want retrieve data from properties field in prifile table in aspnetdb.mdf for multi users,what do i ?
View 1 Replies View RelatedI seem to recall somewhere that a Microsoft Windows Server (2000 for example) should be rebooted once a week.
Is this an urban myth? If so....I can't seem to find a doc on it.
googled:
microsoft server maintenance reboot schedule recommendation
thoughts?
I'm very new to SQL Server. I need to reboot the server for some reason. I need your help to list out what a the step that I need to follow to perform this process.
Regards,
Ilmi
Hello,I have a server running Windows 2000 Advanced and Sql Server. Thesystems runs fine throughout the day but reboots at night, somtimesmultiple times. The event log has a message that reads "The previoussystem shutdown at X:XX PM was unexpected."Any ideas?Paul
View 3 Replies View RelatedWe have to add some hardware and I was wondering if someone could provide a stepwise tip to do it .
It is a 3 Server Environment Pub/Dist/Sub
All three running under SQL2K
Here is what I am planning.
a. Uncheck the Enable in Distributed Agent for each replication
b. Wait for all replications to complete
c. Shut down Publisher ? Or do I have to do something else before that.
Please explain a little .
Thanks
An IT dept. I have been consulting with has started to reboot SQL server every night. They are saying that this is the best practices. I would like to know if anyone has any other ideas on this subject. What is the best practices for how often a SQL server should be rebooted, daily, weekly, monthly ... ?
Thanks
It takes my server forever to reboot, does anyone know how to fix this or is this a problem with the system or just how it is? Thanks
View 12 Replies View RelatedHi,
I have transactional replication set up between two dedicated servers. Server A is the PDC and Server B is a BDC (they are both Win2000 boxes). Both the servers are brand new, and replaced the two that were running like clock work (replication wise) for the last 12 months. I never had this problem with the old servers....
When the servers are shut down (as the case was a couple of weeks back with a power failure) or just recently when they were move to another room. Both servers boot up at the same time. Server B (which is the server holding the db being replicated) boots quicker and as a result replication fails and is then 'sucessfully stopped'. Unless I am aware of the server being rebooted and can monitor this potential problem, within 2 days the logfile grows to large and everything comes to a crashing halt.
I just remove replication, truncate and shrink the log, reset replication and we're away.... BUT I really need to know why it is happening in the first place. I figure there must be a setting that I have forgotten about or something.
Both servers are Win2000 (SP4) and SQL2000(SP3a).
Any help would be appreciated.
Thanks
Casper
is there a way to find out when the sql server was last rebooted (or how long its been up) in tsql or command prompt (which I will take into tsql)
ta
To All,I have a SQL2KSP3a database(<1GB) running on a 4x3GB physical CPU with4GB of ram. It is Windows Server 2003 with hyper-threading turn on.There are ~420 .Net users/cxns (fat client, no web/app servers) withconnection pooling and ~1 trx/sec. The database growth is neglegeableand actually is not even relevent which I will explain in a minute.99% of the trxs are from one SP that does a select. The resultsets arerelatively small as well 1~100 rows. Yes I have tuned it with indextuning wizard as well, changed the SQL memory configurations, etc....My problem is this...The first day after a reboot, the server runs 6%CPU during peak hours.During the non-peak hours until the next day something apparentlyhappens. The next day (2nd day after a reboot), it jumps to 40%CPUduring peak hours. The server will continue to run at 40%CPU duringpeak hours until the next reboot. This phenomenon has been occurringfor 6 months or more and the traffic on the server is the same for day1 as it is for day 2,3,4,... This database was on another server with100+ dbs and exibited the same behavior, thus bringing that server toits knees, and thus we had to move it to the server in question with noother dbs.I have googled my eyes out, Microsoft site, white papers, perfmon,SQLDiag, PSSDiag, execution plans, index tuning wizard, and the listgoes on! I currently have a case open with Microsoft that has beenopen for months now. I have been passed around to the 3rd "MS TechSpecialist". I have ran PSSDiag a total of 6 times for them for hourson end. I have changed MAXDOP. I could give more information, but Iwould be here for days. I am running out of patience/ideas andMicrosoft is apparently blowing smoke.Any ideas are greatly appreciated!Thanks in advance!JL
View 10 Replies View RelatedIf I am running SQL Server 2005 in a clustered environment, what is the safest way to restart the SQL server agent? It is currently running but I need to restart it for maintenance purposes.
Is the safeway way to restart is to login to the SQL Server Management Studio as the system administrator, select the SQL Server Agent object, right-mouse click and select "Restart?"
How many times per year should we schedule time to reboot a SQL Server 2005 Cluster? We want to do this to defrag the memory. What I am looking for is a document from Microsoft or a consulting firm that has a good reputation that I can show my manager.
View 7 Replies View RelatedI am searching for a Powershell script which picks Windows Server names from SQL server table(eg: Instance.DB.tbServerList) & writes last reboot date to SQL server table(can be same or different table).
View 6 Replies View RelatedSorry i think i may have posted this in the incorrect forum before - if i have done it again here can someone tell me where i should post this please, thanks:
Hi,
we are having problems with a server Intel RZeon 3ghz, 3gb ram running 2003 service pack 2 with a 70gb drive and and 400 gb drive all with adequate free space. There are 6 hard disks in total and i assume operating at least RAID 5. We have SQL2000 server with a few standard sized databases and a connection to one other server.
A few months ago the back up of SQL server databases started taking 4- 5 hours when before it took 20 minutes. We had actually lost one of our disks in the RAID array and it before this was spotted by our engineers we reindexed the sql databases and defragged both 70gbC: and D: 400gb drives hoping to correct this slow down. Unfortunately the new disk had not been correctly seated and this was why it was taking 4-5 hours. After fixing the disk the backups took 12 minutes again but then started taking 2-3 hours after a few days.
The reindex/defrag did seem to improve the speed of the backups to 12 minutes (from 20 minutes) when the backup did function correctly (also the sql databases' performance improved). However the backups only take 12 minutes after a server reboot - this can last from only 2, up to 5 backups(days) in a row before a slow down to 2-3 hours and again only a reboot will sort out this problem.
NB this intermittent slowdown only occurred after the disk failure.
We have tried monitoring SQL server and can find no CPU/RAM intensive clashes or long running jobs interferring with the back up. Does anyone know what might be going on here? and if there are any server monitoring tools that may help us discover what is causing this problem ?
thanks for your help
best regards
kevin
I have a situation that I was wondering if anyone has ever ran into before. It has to do with one of my MS SQL servers. The hardware is a ALR/Gateway 9000R with 4 PP200's, 1 Gb RAM, and a RAID 5 with 72 Gb storage. The NIC card is an ATM 155 Mbit card connected directly to our fiber backbone.
I have WinNT 4.0 Server Enterprise Edition loaded with SP4 and MS SQL Server 6.5 Enterprise Edition with SP5 installed.
I have 7 seperate active databases on the server supporting 7 different applications. The server has been on-line for approximately 4 weeks and just recently (last Thursday) it has started to "lock up" every couple of days. By lockup I mean that it starts to reject all requests by all users. No one can connect to the server including myself. The MS SQL error log grows and grows until we reboot the server. The error logs are 100 Mb or larger in size due to rejection errors being repeated over and over again.
There has been no change made to the server since initial installation.
The error in the MS SQL error log that keeps on being repeated is...
"Message 17308: Kernelerror - Lazywriter. Process (process ID number) generated access violation; SQL Server is terminating this process."
We have an incident in with Microsoft but they are not responding fast enough.
I was hoping that someone out there may have had this type of occurrance happen before.
Any suggestions?
Jim
Hi All,I have a SQL Server 7 installation running on a windows 2000 server.SQL Server switches from mixed mode authentication to Windows Only onreboot. Has anyone else experienced this? Any help would be greatlyappreciated.Service Pack Reports:Microsoft SQL Server 7.00 - 7.00.1077 (Intel X86) Sep 6 200215:10:15 Copyright (c) 1988-2002 Microsoft Corporation StandardEdition on Windows NT 5.0 (Build 2195: Service Pack 3)I only see two strange entries in the log:2004-05-01 00:38:09.55 spid37 Using 'xpsqlbot.dll' version'1998.11.13' to execute extended stored procedure 'xp_qv'.2004-05-01 00:38:01.71 spid1 Failed to obtainTransactionDispenserInterface: Result Code = 0x8004d01bI don't believe that either of these are related to the configurationoption for Windows Only, though.
View 2 Replies View RelatedThis computer gets set to autostart the SQL Server Service, which is set to local, (have also tried local network and user specific), and everything works fine. But when it gets rebooted, the service refuses to start.
We disabled the Mcafee and Windows firewall. No effect.
The SQL Browser and Full Text Index Services start automatically just fine.
Anyone have any experience with this?
Thanks,
Pat
Hello,
SQL Server 2000 services getting stoped automatically when system get reboot. When system reboot they started and after 5 minutes they were getting stoped.
I went through the event log file and found that an error is occuring in sql server with number 17148.
And I also observed that there is a file called "C : P r o g r a m F i l e s V E R I T A S B a c k u p E x e c N T b e n g i n e . e x e" is executing during the maintenance process,which is stopping the sql server services(agent and olap)
This problem is generating error in sql server with above mentioned number.
regards,
vnk.
I do not understand why an SSAS cube disappears after a reboot. We schedule a reboot for our server weekly and after the reboot. I have to deploy my SQL server Analysis Database. It is just gone after a reboot and why this happened. I searched a lot on internet but it seams that I am the only one on this world with this issue.
How I can configure the server in such a way that the SSAS cubes will not disappear after a reboot.
Hi I've got a sql server 2000 database that when running is runnign fine. About 9 months ago I altered one of the stored procedures and ever since then when the machine is rebooted the stored procedure is "reverted" back to the old sproc... ???
is there any way I can recrete a sproc in a job that runs every day?? why would it be doing this?
Any command through that can I delete/disable the DWORD value "Pendingfilerename operations" so that while I start the SQL Install work, it does not fail due to this and can write this as one of the precheck options.
View 0 Replies View RelatedAfter I have set the maximum sql server memory in sql server 2014 using sp_configure, do I need to reboot whole server or restart sql service?
View 4 Replies View RelatedHave a production server, 12 Enterprise, and we are adding a new app to an existing instance. Â Next app needs SSRS and that was not put in the install request a year ago for the instance. Â
I do not think a reboot is required but have been wrong before. There are no SPs applied to this server and only last week we were given go ahead from one app vendor to apply SPs. Â That would have been done in monthly maintenance cycle next weekend. Â Our test server is doing just fine with all apps on SP1.
We have several Sql Server 2014 AlwaysOn Availability Groups set up in our test lab and use a combination of SCDPM and Maintenance Plans to back up the databases in them.Â
Our applications always work well regardless of which of the physical servers are, at any given time, designated the "Primary" for a database. Automatic failover works fine.
There are other applications, such as SQL Server built-in backup and System Center DPM that only work properly when the databases are currently hosted where originally intended.
During the normal course of Windows Updates, etc., machines will occasionally be rebooted in the middle of the night. When they come back up, we would like them to "reclaim" the databases that properly belong to them, in an orderly fashion of course (when the "Synchronization State = Sychronized"). We have lots of these test servers and we do not have staff watching the servers in the middle of the night.
Is there an automatic way to accomplish this?
hi,we are having this weird problem that can be reproduced easily on 2out of 2 servers where we've tried:- we run a SQL Server 2000 stored procedure that processes 2.5 millionrows (big procedure with many cursors)- when it hits an area of procedure (not always the exact same place,but in the same area) , the server rebootsI've tried to debug the problem but:- there are no event log except when it restarts to say 'previoussystem shutdown unexpected'- the blackbox trace I've created is empty- the perfmon log stops a few seconds before the reboot and shows noout of whack counter- we've had the hardware checked by an IT guy and everything looksfineThe only thing we can see that might have changed is that the disksand data files were reorganized ..but that's on one machine. On theother machine were we copied the database to test, we did not do thatand it still rebooted.I've also run DBCC CHECKDB and everything looks fine. I've scanned allthe hard drive for bad sectors. We've tested the CPUs for overheating.I've monitored the virtual memory to make sure there was enough.Any help will be appreciated, we are out of ideas!!thanksGuillaumeps: we are using win2000/SP4 and SQLServer 2000 SP3
View 3 Replies View RelatedHow can trace SQL server without SQL profiler?
View 5 Replies View RelatedI am working with 3 sql 7.0 servers (Servers A, B, C) and am trying to create a trace via profiler to run against server B.
Every trace that I create keeps pointing to server A even though I have server B defined in the properties of the trace - (when I edit the trace properties it REALLY does show server B). I have server B defined in the screen where you 'Select the SQL Server to run the trace on'. I even used the wizard to run one of the canned traces and it still points to server A. Every trace I set up runs against server A. Can anyone think of what the heck I'm doin' wrong? Is is a configuration setting somewhere?
I have created a server-side procedure which captures evenst for audit purposes and save to a file onto the SQL Server. This procedure has been defined as an autoload so that when the server is restarted, this procedure automatically loads.
However, there is a fundemental flaw with this routine. When the procedure attempts to execute, it will abort due to the fact that the trace file already exists.
I have two choices:-
1. When the procedure restarts, append to existing file or
2. Make a folder which comprise of today's day ie 20080128 and move trace file/s to this folder.
Option 2 is preferred.
How can I make this achievable?
Please note I'm using SQL Server 2005.
Ken
Below is a sample of my Code
-- Create a Queue
-- Declare Control Variable
declare @ReturnCode int
declare @Rc int
-- Declare Option Variable
declare @TraceID int
declare @maxfilesize bigint
declare @ColumnId int
declare @LogicalOperator int
declare @ComparisonOperator int
declare @Value int
declare @Option int
declare @on bit
declare @Event int
-- Set Option Variables
set @maxfilesize = 100 -- Maximum file size in megabytes
set @Option = 6 -- TraceFileRollOver and ShutdownOnError
set @on = 1 -- True
set @ReturnCode = 0 -- No Error
exec @Rc = sp_trace_create @TraceID output, @Option, N'\Server_named$SQLTraceActivity', @maxfilesize, NULL
select @ReturnCode=@@Error
if @ReturnCode <> 0
Begin
if @ReturnCode = 1
Print 'Error 1 - Unknown error.'
if @ReturnCode = 10
Print 'Error 10 - Invalid options. Returned when options specified are incompatible.'
if @ReturnCode = 12
Print 'Error 12 - Cannot create tracefile - check if file already exists, or this trace already running'
if @ReturnCode = 13
Print 'Error 13 - Out of memory. Returned when there is not enough memory to perform the specified action.'
if @ReturnCode = 14
Print 'Error 14 - Invalid stop time. Returned when the stop time specified has already happened.'
if @ReturnCode = 15
Print 'Error 15 - Invalid parameters. Returned when the user supplied incompatible parameters.'
else
Print 'Unexpected and Unknown error In creating trace - Please review'
Goto ErrorHandler
End
-- Set Events
-- Trace NTDomainName for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 7, @on
-- Trace HostName for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 8, @on
-- Trace IndexID for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 24, @on
-- Trace RequestID for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 56, @on
-- Trace SessionLoginName for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 64, @on
-- Trace ClientProccessID for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 9, @on
-- Trace IntegerData for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 25, @on
-- Trace LogionSid for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 41, @on
-- Trace RequestID for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 49, @on
-- Trace NTUserName for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 6, @on
-- Trace ApplicationName for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 10, @on
-- Trace StartTime for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 14, @on
-- Trace ObjectID for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 22, @on
-- Trace ServerName for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 26, @on
-- Trace ObjectName for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 34, @on
-- Trace XactSequence for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 50, @on
-- Trace DatabaseID for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 3, @on
-- Trace LoginName for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 11, @on
-- Trace NTDomainName for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 35, @on
-- Trace EventSequence for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 51, @on
-- Trace TransactionID for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 4, @on
-- Trace SPID for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 12, @on
-- Trace ObjectType for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 28, @on
-- Trace IsSystem for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 60, @on
-- Trace EventSubClass for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 21, @on
I have created a server-side procedure which captures evenst for audit purposes and save to a file onto the SQL Server. This procedure has been defined as an autoload so that when the server is restarted, this procedure automatically loads.
However, there is a fundemental flaw with this routine. When the procedure attempts to execute, it will abort due to the fact that the trace file already exists.
I have two choices:-
1. When the procedure restarts, append to existing file or
2. Make a folder which comprise of today's day ie 20080128 and move trace file/s to this folder.
Option 2 is preferred.
How can I make this achievable?
Please note I'm using SQL Server 2005.
Ken
Below is a sample of my Code
-- Create a Queue
-- Declare Control Variable
declare @ReturnCode int
declare @Rc int
-- Declare Option Variable
declare @TraceID int
declare @maxfilesize bigint
declare @ColumnId int
declare @LogicalOperator int
declare @ComparisonOperator int
declare @Value int
declare @Option int
declare @on bit
declare @Event int
-- Set Option Variables
set @maxfilesize = 100 -- Maximum file size in megabytes
set @Option = 6 -- TraceFileRollOver and ShutdownOnError
set @on = 1 -- True
set @ReturnCode = 0 -- No Error
exec @Rc = sp_trace_create @TraceID output, @Option, N'\Server_named$SQLTraceActivity', @maxfilesize, NULL
select @ReturnCode=@@Error
if @ReturnCode <> 0
Begin
if @ReturnCode = 1
Print 'Error 1 - Unknown error.'
if @ReturnCode = 10
Print 'Error 10 - Invalid options. Returned when options specified are incompatible.'
if @ReturnCode = 12
Print 'Error 12 - Cannot create tracefile - check if file already exists, or this trace already running'
if @ReturnCode = 13
Print 'Error 13 - Out of memory. Returned when there is not enough memory to perform the specified action.'
if @ReturnCode = 14
Print 'Error 14 - Invalid stop time. Returned when the stop time specified has already happened.'
if @ReturnCode = 15
Print 'Error 15 - Invalid parameters. Returned when the user supplied incompatible parameters.'
else
Print 'Unexpected and Unknown error In creating trace - Please review'
Goto ErrorHandler
End
-- Set Events
-- Trace NTDomainName for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 7, @on
-- Trace HostName for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 8, @on
-- Trace IndexID for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 24, @on
-- Trace RequestID for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 56, @on
-- Trace SessionLoginName for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 64, @on
-- Trace ClientProccessID for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 9, @on
-- Trace IntegerData for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 25, @on
-- Trace LogionSid for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 41, @on
-- Trace RequestID for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 49, @on
-- Trace NTUserName for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 6, @on
-- Trace ApplicationName for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 10, @on
-- Trace StartTime for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 14, @on
-- Trace ObjectID for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 22, @on
-- Trace ServerName for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 26, @on
-- Trace ObjectName for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 34, @on
-- Trace XactSequence for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 50, @on
-- Trace DatabaseID for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 3, @on
-- Trace LoginName for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 11, @on
-- Trace NTDomainName for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 35, @on
-- Trace EventSequence for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 51, @on
-- Trace TransactionID for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 4, @on
-- Trace SPID for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 12, @on
-- Trace ObjectType for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 28, @on
-- Trace IsSystem for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 60, @on
-- Trace EventSubClass for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 21, @on
I restarted the sql server after c2 audit was enabled and now i can not start the instance getting this error below. how do i bring the sql server up?
Cannot start C2 audit trace. SQL Server is shutting down. Error = 0x80070003(The system cannot find the path specified.)
Hello ;Can any one point me how to trace any modification made on a certain tabeles with in any data base?what i mean is if i have table "a" and i add updated some rows with it ... is there a way to figure iut the old data and the new data?simply i can create another table "history_on_a" which will be filled by a trigger when any updates happen ...this solution will consume my hard disk so is ther a built in funtion with sql ?so if any one can tell me what to search for or any idea
View 1 Replies View Related