Startup Procs
Jan 13, 2004Does anyone know how to tell which procedures are called when SQL Server 2000 starts up if scan for startup procs is turned on?
View 11 RepliesDoes anyone know how to tell which procedures are called when SQL Server 2000 starts up if scan for startup procs is turned on?
View 11 Repliesdatabase : MS SQL server ver 6.50.201
problem: server startup / server time out
details
SQL server shows usage of 100 % CPU utilization, if started automatically / manually. and does not proceed / hangs up(server time out), but win nt operates extremely slow.
The background of the situation in brief is as stated below.
The errorlog was found to have the messages
warning : OPEN OBJECTS parameter may be too low.
Attempt was made to free up descriptors in localdes()
Run sp_configure to increase parameter value.
Error : 644, severity : 21, state; state 1
the non clustered leaf row entry for page 2 row 1 was not found in index page 40 indexid 2 database 'tempdb'
Error : 2620 severity 21 state 3
the offset of the row number at offset 32 does not match the entry in the offset table of the follwoing page : page pointer = 0x1395800, page no= 40, status = 0x2, objectid = 1, indexid = 2
Action taken
I used the sp_option to increase the open objects from default 500 to 1000, and the LE threshold maximum value to 400 from the default 200.
after which I used reconfigure go and restarted the computer to take the effect. The following did work fine and server was working ok. But then from yesterday I am having the problem that the MS SQL sever is utilizing the cpu to 98 - 99 % and I am not able to connect to the server.
I tried to start the server with the minimal configuration by specifying the -f option in the service manager start up options, it showed the following message
00/12/07 10:40:49.73 ods Unable to connect. The maximum number of '5' configured user connections are already connected. System Administrator can configure to a higher value with sp_configure.
00/12/07 10:40:50.02 ods Unable to connect. The maximum number of '5' configured user connections are already connected. System Administrator can configure to a higher value with sp_configure.
afterwhich I tried with the option of starting the sql server with the option -c -f
which in the event detail of the win nt shows
"mesg 18109: Recovery dbid 6 ckpt(55813,8) oldest tras= (55813,0)"
The open procedure for service "MSSQLServer" in DLL "SQLCTR60.DLL" has taken longer than the established wait time to complete. The wait time in milliseconds is shown in the data.
DB-LIBRARY error - SQL Server connection timed out.
and in the errorlog present in MSSQLLOG directory
00/12/07 15:06:43.24 spid1 Recovering Database 'master'
00/12/07 15:06:43.31 spid1 Recovery dbid 1 ckpt (7944,28) oldest tran=(7944,0)
00/12/07 15:06:43.41 spid1 1 transactions rolled forward
00/12/07 15:06:43.49 spid1 Activating disk 'AM'
00/12/07 15:06:43.49 kernel initializing virtual device 1, D:MSSQLDATAAM.DAT
00/12/07 15:06:43.50 spid1 Activating disk 'AMLOG'
00/12/07 15:06:43.50 kernel initializing virtual device 2, D:MSSQLDATAAMLOG.DAT
The dbid is / was 6 for both the instances, the database which is having this dbid is database name "AM" and is having above 1300 tables (approx)
what could be the problem and solution for it?
kindly help me out of this situation.
If any more information is needed please contact me on devendrakulkarni@yahoo.com / devendra@me.iitb.ernet.in
Regards
Devendra
Is there a way to namespace groups of stored procs to reduce confusion when using them?
For C# you can have ProjectName.ProjectSection.Classname when naming a class. I am just wondering if there is a way to do the same with SQL stored procs. I know Oracle has packages and the name of the package provides a namespace for all of the stored procs inside it.
HI,
CREATE PROCEDURE PROC1
AS
BEGIN
SELECT A.INTCUSTOMERID,A.CHREMAIL,B.INTPREFERENCEID,C.CHR PREFERENCEDESC
FROM CUSTOMER A
INNER JOIN CUSTOMERPREFERENCE B
ON A.INTCUSTOMERID = B.INTCUSTOMERID
INNER JOIN TMPREFERENCE C
ON B.INTPREFERENCEID = C.INTPREFERENCEID
WHERE B.INTPREFERENCEID IN (6,7,2,3,12,10)
ORDER BY B.INTCUSTOMERID
END
IF I AM USING THIS PROC AS I/P TO ANOTHER PROC THEN IT GIVES NO PROBLEM AS I CAN USE ?
CREATE PROCEDURE PROC2
AS
BEGIN
CREATE TABLE #SAATHI(INTCUSTOMERID INT,CHREMAIL NVARCHAR(60),INTPREFERENCEID INT,CHRPREFERENCEDESC NVARCHAR(50))
INSERT INTO #SAATHI
EXEC PROC1
ST......1,
ST......2,
END.
BUT IF , I USE ANOTHER PROC SIMILAR TO THE FIRST ONE WHICH GIVES SLIGHTLY DIFFERENT RESULTS AND GIVES TWO SETS OF RESULTS,THEN WE HAVE A PROBLEM,HO TO SOLVE THIS :-
CREATE PROCEDURE MY_PROC
AS
BEGIN
SELECT A.INTCUSTOMERID,A.CHREMAIL,B.INTPREFERENCEID,C.CHR PREFERENCEDESC
FROM CUSTOMER A
INNER JOIN CUSTOMERPREFERENCE B
ON A.INTCUSTOMERID = B.INTCUSTOMERID
INNER JOIN TMPREFERENCE C
ON B.INTPREFERENCEID = C.INTPREFERENCEID
WHERE B.INTPREFERENCEID IN (23,12,10)
ORDER BY B.INTCUSTOMERID
END
SELECT A.INTCUSTOMERID,MAX(case when A.intpreferenceid = 23 then '1'
else '0' end) +
MAX(case when A.intpreferenceid = 12 then '1'
else '0' end) +
MAX(case when A.intpreferenceid = 10 then '1'
else '0' end) AS PREFER
FROM CUSTOMER
GROUP BY A.INTCUSTOMERID
ORDER BY A.INTCUSTOMERID
END
WHICH NOW GIVES ME TWO SETS OF DATA , BOTH REQUIRED THEN HOW TO USE ONE SET OF RESULTS AS I/P TO ANOTHER PROC AND OTHER SET OF RESULTS AS I/P TO YET ANOTHER PROC .
CREATE PROCEDURE PROC2
AS
BEGIN
CREATE TABLE #SAATHI(INTCUSTOMERID INT,CHREMAIL NVARCHAR(60),INTPREFERENCEID INT,CHRPREFERENCEDESC NVARCHAR(50))
INSERT INTO #SAATHI
EXEC MY_PROC
ST......1,
ST......2,
END.
BUT, HERE I WANT TO USE FIRST DATASET ONLY , HOW TO USE IT ?
THANKS.
We have a STD SQL2000 with 2GB memory, which has around 800 databases and is planed to have 1500 databases.
From Microsoft Knowledge Base Q316749, <<By using the -g startup parameter, you can instruct SQL Server to leave additional virtual memory available so that the combination of these log-related allocations and other normal allocations does not run out of virtual address space.>>
but we are not quite sure the correct sytax, so we added -g392 and -g 392 as two new startup parameters. After reboot, in the error log, "initdata: Warning: could not set working set size to 765696 KB.
1. Is this a good way to increase the virtural memory?
2. which system table contains the -g value? and how to fix this error?
thanks
-D
Please Advice
I started my SQL SERVER 2000 (SP 3)in single user mode using EM with the purpose of doing a test restore of the Master database. Can i remove the startup parameters as I cannot login using sa or similar login using ISQL/W utility.
Thanks for your help. Urgent.
Regards
in sql server (re)start where does it find the location of Master.mdf file .
In Oracle, there is control file where the location of *.dbf file is stored and Instance find the location of dbf file from that location
In sql server where it finds the location of Databases as master, msdb etc..
I have two pages on a particular website that are data driven by SqlExpress. The site is in the testing stages, so there is very traffic on the site at this point. The very first time that a data driven page is accessed, the response time is approximately 30 seconds. After that, the response on the data driven pages seems normal. The data queried is no more that 30 or 40 records.
I did see the "slow startup from idle" thread on this forum - that thread suggested changing from user instances, but that's not an option here.
My hosting service requires that I specify user instances in my connection string. Is this just something that I'm going to have to live with, or is there any way to speed up this SqlExpress "start up"?
I have two pages on a particular website that are data driven by SqlExpress. The site is in the testing stages, so there is very traffic on the site at this point. The very first time that a data driven page is accessed, the response time is approximately 30 seconds. After that, the response on the data driven pages seems normal. The data queried is no more that 30 or 40 records. My hosting service requires that I specify user instances in my connection string. Is this just something that I'm going to have to live with, or is there any way to speed up this SqlExpress "start up"?TIA
View 1 Replies View RelatedHello,
I've 10 Production Servers, which is rebooted every month by NT guys, The MS SQL Server Services & MS SQL Agent starts automatically when the Windows 2000 Advanced Server starts, I would like to create that when the MS SQL Server starts it pages me that Services started successfully, or the other way is to see the Windows Event viewer error logs to see if there is any SQL Server errors at NT server startup so that it would page me Problem starting MS SQL Server.
Would anyone please help me with this
Is there any startup procedure I could generate every time MS SQL Server is started.
How could I scan NT error logs to see the error logs for MS SQL Server and send the page.
Thanks
Roma
Running SQL2000/SP2. DB has approx. 750,000 rows in main table - 500 MB content. Db is set To Truncate on Checkpoint, so no Log file to speak of - ever. System is 667 Mhz PIII with 512 Mb Ram. Disk are ATA133.OS is W2k Server-SP3. Anonaly happens at System startup. Db is coupled with automatic data collection software for manufacturing. It is taking DB longer and longer to "catchup" after each boot. Pref Counters show main problem is Disk Read Queue Length. (CPU % doesn't exceed 40%, normally 7% - SQL was given 1/2 RAM - 256 MB). If Data Collection is not started, DB comes up rapidly (it seems), but manual test inserts show high - protracted disk activity, but tests don't fail, just run slow. After a number of test inserts (7 - 12+), log jam breaks and the processing time drops from 1.5 Minutes to the normal 15-20 Milliseconds!. Similar action is seen with Data collection software running at boot. By design, the Data collection software buffers all inputs to the DB, so no loss, but the disk thrashing is disconcerting. This type of problem is not seen during normal operation (system is closely watched by automated scripts). Main table is routinely reindexed and fragmentation is tracked (never gets above 5% fragmentation). No table is 'pinned' in RAM.
Hints, allegations, and out-right lies glady accepted!
Hi All,
Running Sql Server 2000 for Windows 98. How do I start the SQL Server Agent Automatically (that is at OS startup). Is there a way to do it at all ?
TIA.
Regards,
Kaushik.
Hello,
I've 10 Production Servers, which is rebooted every month by NT guys, The MS SQL Server Services & MS SQL Agent starts automatically when the Windows 2000 Advanced Server starts, I would like to create that when the MS SQL Server starts it pages me that Services started successfully, or the other way is to see the Windows Event viewer error logs to see if there is any SQL Server errors at NT server startup so that it would page me Problem starting MS SQL Server.
Would anyone please help me with this
Is there any startup procedure I could generate every time MS SQL Server is started.
How could I scan NT error logs to see the error logs for MS SQL Server and send the page.
Thanks
Roma
Hi, I'd like to create a trigger to fire it when database starts up. Is there any way to do it? If yes, would you be able to provide me with an example?
Thanks in advance.
-Alla
Is there a way I can set up a SQL script to run when the instancestarts up?SQL Server 2005 SP2thanks!
View 3 Replies View RelatedHi,
I am getting issue while Starting SQL Service.
Error started since I rebooted the server without stopping SQL Services.
Below Errors Observed.
1. Server named pipe provider failed to listen on [ sqlquery ]. Error: 0x57
2. TDSSNIClient initialization failed with error 0x57, status code 0x50.
3. TDSSNIClient initialization failed with error 0x57, status code 0x1.
4. Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log.
5. SQL Server could not spawn FRunCM thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.
Kindly Suggest.
SSIS packages running slow on startup in 64 bit prod env. looks like it is taking lot of time (around 2mins) to validate the package. Delayvalidation is false (default); changing it to true didn't help. Any fix for it?
Executing packages using dtexec commad.
We have job packages which loads 10s of child packages in sequence using package execution task... taking hours to complete. Same are working fine 64 bit dev env.
Prod env:
Windows 2003 SP1
SQL Server 2005 SP2
Thanks
Is it possible to stop the server from going to sleep when it is idle to improve responsiveness to new connections?
View 21 Replies View RelatedI'm not familiar with SQL Server and am just starting things up. I have VB Express and SQL Server Express (I think - at this point, I wouldn't be surprised if I didn't), and am trying to create a database.
So how do I do that?
All I see that relates to the SQL Server 2005 is under All Programs -> Microsoft SQL Server 2005 -> Configuration Tools; I have a configuration manager, Error and Usage Reporting, and Surface Area Configuration. I assumed that in there would be a database engine in here somewhere, but I have rumaged through every command in these and found nothing on creating a new database. Nada.
Am I looking in the wrong places, did something go wrong with my install, or am I just a complete leptic?
Please Help!
I would like to enter info into the startup service account so that the MS
SQL Server Agent will run under this account. Then I can run jobs.
However, I don't know why the "startup service account" info is
greyed out, which prevents me from entering this information.
Any help would be appreciated!!
Hi,
Is there any way to use different email accounts for sql mail dynamically on sql server 2000?
Here is the problem:
My sql server is configured to start mail session under account 'xxnotifyxx'.
There are many jobs scheduled to run queries and send out emails to different user groups within the company as well as outside the company from 'xxnotifyxx' as a sender.
However, one of the usergroup within the company is asking for sending out their emails ( from scheduled tasks that uses xp_sendmail ) using 'publishergroup' as a sender.
As far as I know, this is not possible (sql server 2000, exchange 2000 client win2000 ) until I change the mail session configuration to start under 'publishergroup' in stead of 'xxnotifyxx'. If I do this, 9 other groups have problems with this.
Is there a work around for this kind of situation?
Thanks,
Shaili
:rolleyes:
Hi,
The SQL Service Manager is not running automatically despite that fact the the STartup type for the following service IS set to Automatic:
C:Program FilesMicrosoft SQL ServerMSSQLBinnsqlservr.exe -sMSSQLSERVER
When I start my PC and look at the taskbar (or is it better called the status bar), the service Manager appears with a big WHITE circle and when I get the tooltip it says:
"Unknown - \ - MSSQLServer"
Can someone please help me out.
I have the following stored procedure set up as a startup procedure in the master database. I was lead to it from a microsoft SQL server news group and I have found that it is very helpful. I have been told, though, that it only runs on the master database at startup, but I need it to run for all of the databases on my server. (I'm a newbie and can't follow the code myself). How can this stored proc be modified so that it runs on all of the databases on my server at startup.
Any help is greatly appreciated. Thanks in advance!
CREATE PROC sp_checkident AS
/************************************************** ******************/
/* Procedure to run DBCC CHECKIDENT for a database. */
/* Copyright (c) Tibor Karaszi and B÷rje Carlsson 1999 */
/* Tested on version 6.5 and 7.0. */
/************************************************** ******************/
SET NOCOUNT ON
DECLARE @ver VARCHAR(5)
SELECT @ver = CASE
WHEN CHARINDEX('6.50', @@VERSION) > 0 THEN '6.50'
WHEN CHARINDEX('7.00', @@VERSION) > 0 THEN '7.00'
END
-- Remove below IF statement if you want to execute on 7.0
IF @ver = '6.50'
BEGIN
DECLARE tbl_names INSENSITIVE CURSOR FOR
SELECT OBJECT_NAME(sc.id)
FROM syscolumns sc, sysobjects so
WHERE sc.id = so.id
AND convert(bit, sc.status & 0x0080) = 1
AND so.type IN ('U', 'S')
OPEN tbl_names
DECLARE @tbl_name VARCHAR(30)
DECLARE @exec_str VARCHAR(255)
FETCH NEXT FROM tbl_names INTO @tbl_name
WHILE (@@fetch_status <> -1)
BEGIN
IF (@@fetch_status <> -2)
BEGIN SELECT @exec_str = 'DBCC CHECKIDENT (''' + @tbl_name
+ ''') WITH NO_INFOMSGS'
PRINT @exec_str
EXEC( @exec_str)
END
FETCH NEXT FROM tbl_names INTO @tbl_name
END
DEALLOCATE tbl_names
END
GO
Hi,
The SQL Service Manager is not running automatically despite that fact the the STartup type for the following service IS set to Automatic:
C:Program FilesMicrosoft SQL ServerMSSQLBinnsqlservr.exe -sMSSQLSERVER
When I start my PC and look at the taskbar (or is it better called the status bar), the service Manager appears with a big WHITE circle and when I get the tooltip it says that
"Unknown - \ - MSSQLServer"
Can someone please help me out.
I'm new to SQL Server....running SQL Server 2000. Had to move the system database logs to a different drive. Used EM, Server properties, Startup parameters. Changed the transaction log designation. Closed that window. Stopped the server.
Server won't start as I messed up and did not include the file name in the new designated path....just down to directory level.
From what I've seen, I have to be able to start the server service to change the parameters and the server won't start.
Is there a file that contains these parameters I may edit or should I try using the command line options.
Many thanks in advance.
how do I schedule a batch file I've created to run at the startup of the server? Windows 2003 server.
View 3 Replies View Relatedor in registry? where?
View 8 Replies View Relatedthe system i'm running is a windows 2003 sp2 r2 dc with sql server 2005 sp2 installed
i get the follow error in the event id logs regarding a few of the sql server nt services
Timeout (30000 milliseconds) waiting for the SQL Server (MSSQLSERVER) service to connect
i already tried to set the registry values for ServicesPipeTimeout to 60000 thinking this should solve the problem...
however the event id errors still persist and say that 30000 is the timeout value...
how can i make it so that the start time is either delayed or the timeout value is increased?
currently my only workaround is to manually restart the services
In the SP1 update of SSIS there was a call from the SSIS service that would attempt to validate itself against the http://crl.microsoft.com web site. If the SSIS service didn't have access to the internet then it would timeout and not start the service. In our company we have our development systems behind a firewall which only allows for limited internet access due to it being a development system.
Does the installation of SP2 remove this authentication restriction?
...cordell...
Problem Description Reference Documents:
http://support.microsoft.com/default.aspx/kb/918644
http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=124887.
Hi,
I have SQL Server 2005 Standard edition with SP1. Whenever I start the Management Studio, it takes for ever to come up. It will take atleast 30 Sec to 1 min every time I start SQL Server. Is this some thing we have to live with in SQL Server 2005 or do I need to tweak any thing? Pls let me know.
One more thing, in the SQL Server logs I see the following message every day -> Source - spid36s, Message - Starting up database 'dbname'. Why do I get this message?
Thanks
Hi all
i am using Sql Server 2005 SP2, I am trying to configure Mirroring. The issue is ,After configuring mirroring ,Whem i am starting START MIRRORING button .I am getting the error
Database mirroring is disabled by default. Database mirroring is currently provided for evaluation purposes only and is not to be used in production environments. To enable database mirroring for evaluation purposes, use trace flag 1400 during startup. For more information about trace flags and startup options, see SQL Server Books Online. (Microsoft SQL Server, Error: 1498)
I used BDCC TRACEON (1400) and I altered the Startup parameter in configuration manager of SQL SERVER ;-T1400
But still I am getting the above error which is indicated in red
Please help me to fix the issue
Hi,
I'm developing a WinForms app that will be deployed via ClickOnce deployment and that uses SQLExpress as a local data store. In order to avoid the upgrade DB problem, I'm having my application check for a database and check its version on startup. I am able to successfully create the database if it does not exist, but when I try to connect to the new database, I get a login failed error. However, if I restart the app, it is able to connect to the newly created instance. Here's what I'm doing:
If the db does not exist, I connect using this connect string:
Data Source=.SQLEXPRESS;Integrated Security=True;User Instance=True;Connect Timeout=60
I then issue a CREATE DATABASE command and run my table scripts. I then try to reconnect as
Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|ImportToolData.mdf;Integrated Security=True;User Instance=True;Connect Timeout=60
When i attempt to connect to the newly created database, I get a login failed error message. However, if I restart the application and try to connect using that same connection string, it succeeds. Any ideas why I would have to restart the app to successfully connect to the new database?Thanks, Scott
i have a sql cluster setup, and need to change the user account that sqlserver starts with....any ideas? i screwed up and left it using localsystem account and now i can`t get sqlmail to work. i`m trying to avoid having to create the cluster again. any info appreciated.......jim jones
View 1 Replies View Related