Sp_procOption Vs. Autoexecution Before Server Shut Down
Jul 19, 2007
I understand using sp_procOption procedure we could set procedure for autoexecution every time an instance of SQL Server is started. I would like to find out if there is any way for me to run a procedure before server shuts down.
I am interested to collect statistical data from DMV before SQL Server is restarted due to DMV's transient nature. I am sure some of you would suggest having a job running that collects data from DMV's periodically. But ideally I would like to collect data only once for server uptime.
I would appreciate any suggestion.
Thanks,
Asaf
View 3 Replies
ADVERTISEMENT
Jan 26, 2005
Is there a way to tell who the guilty person is:
The process winlogon.exe has initiated the shutdown of computer DOCSITE01FDK on behalf of user NT AUTHORITYSYSTEM for the following reason: Application: Maintenance (Planned)
Reason Code: 0x84040001
Shutdown Type: shutdown
Comment:
It tell you that the source is user23. Is there a way to determine who shut down this server?
Thanks
View 4 Replies
View Related
Oct 7, 2015
I know that there was huge tempdb usage and may be the disk was full but SQL server is not suppose to restart in this case.What could be the reason behind this? SQL server restarted and is currently up and running.We are using SQL server 2008 SP3
View 10 Replies
View Related
Mar 18, 2008
When I upload my website on to server I have the following error: Could not open new database 'edmer-kiem.qsh.es_b5711d30-4f2a-4151-a958-9f63adb9c1bf'. CREATE DATABASE is aborted.Cannot
attach the file
'H:HomeWebsqsh.esedmer-kiem_79170098-49d1-496b-b8ac-24e9f04837a4wwwApp_Dataedmer_kiem.mdf'
as database 'edmer-kiem.qsh.es_b5711d30-4f2a-4151-a958-9f63adb9c1bf'.File activation failure. The physical file name "C:Inetpubwwwrootedmer_kiemApp_Dataedmer_kiem_log.ldf" may be incorrect.The log cannot be rebuilt because the database was not cleanly shut down. I have searched forums but I could not solve it.. How can I shut down database on the server?Please help..
View 1 Replies
View Related
Sep 15, 2004
hi
can i shut down MSSQL Server whn any transaction is active?
View 3 Replies
View Related
May 22, 2007
I have a queue that, after running fine for several days will mysteriously turn off. It doesn't seem to be related to a poison message because I can restart the queue and processing resumes just fine. What are all the scenarios that would cause a queue to turn itself off, so I can 1) take preemptive action to prevent it from happening in the first place and 2) respond appropriately when it occurs.
Also, how to properly setup and verify that the BROKER_QUEUE_DISABLED is working properly. This is the SQL that I have so far, but is there a more direct way to raise the event other than writing an activated stored procedure that rolls back 5 times?
CREATE QUEUE [EventNotificationsQueue];
GO
CREATE SERVICE [EventNotificationsService]
ON QUEUE [EventNotificationsQueue]
([http://schemas.microsoft.com/SQL/Notifications/PostEventNotification]);
GO
CREATE EVENT NOTIFICATION [QueueDisabled]
ON QUEUE [MyQueue]
FOR BROKER_QUEUE_DISABLED
TO SERVICE 'EventNotificationsService', 'MyDatabase';
GO
View 7 Replies
View Related
Jan 27, 2006
Routinely when I use BIDS to work on a report design, I cannot close BIDS because I get a message box that says:
Microsoft Visual Studio cannot shut down because a modal dialog is active. Close the active dialog and try again.
Of course, there is no visible dialog open. I actually have to terminate the process from task manager.
I do not get this problem when using SSIS or SSAS. Only SSRS.
Any Ideas?
Thanks!
BobP
View 76 Replies
View Related
Jan 11, 2000
I have 2 DB on SQL Server 7, that are synchronized by a continuous transactional replication.
The tables have a primary key on an identity column. In order to avoid conflicts,
the identities have different seeds, and increment equal to 10.
When the server shuts unexpectedly, the current value for the
identity column goes out of sync, that is it assumes the greatest value inserted.
The workaround is to run DBCC checkident to correct the identity value.
Is it a bug? Did anyone run in the same problem?
TIA
Tania
View 2 Replies
View Related
Jun 13, 2007
Hi All,
I got a job which runs every day this T-SQL code:
BACKUP DATABASE [myDB] TO DISK = N'f:BACKUPSDailymyBKUP.bak' WITH NOINIT , NOUNLOAD , NAME = N'mybackup', NOSKIP , STATS = 10, NOFORMAT
It runs just fine but in append Mode (the default one); the bak file is being taped every night, so I would like to overwrite it, in order it not to become huge after a few time, but I can't seem to find a clear way to do this.
Any help or pointing would be appreciated!
Cheers,
Giovanni
View 2 Replies
View Related
Nov 26, 2007
Hello,
While tryign to edit the XML for the rdl , i am stuck it will not allow me to edit and i have to kill the devenv process and open vs again.
I looked through some of the threads and tried apply KB 936971 Hot Fix and I am running into the following error.
The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade patch may update a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade patch."
Did any one come across this. Any assistance would be greatly appreciated
Thanks,
SqlNew
View 1 Replies
View Related
Nov 5, 2007
Hi,
I am running two jobs background using SQL agent. There was a power shut down and the two job i was running in back groung were cancelled leaving the below message
The job was stopped prior to completion by Shutdown Sequence 0.
Can any one tell me why this happened although I am running them in back ground.
I am not sure where the servers are located and if they are located in the same bulding .. do u think it is bcoz of tis power shut down only?
View 6 Replies
View Related
Nov 17, 2006
if i get this message one more time I am going to put my fist through my monitor
View 114 Replies
View Related
Aug 31, 2015
Is there a way to get access to the files on the shared drive from either of the nodes when the SQL Cluster is shut down?
It doesn't look like there is, but hoping there is some trick. I see how it can be done with a Windows Cluster but not a SQL Cluster.
View 4 Replies
View Related
Jan 22, 2008
I installed the hotfix available at support.microsoft.com/kb/936971 and even rebooted the server, but I am still getting the error. I am working on a Windows 2003 server with SQL Server 2005 (and reporting services). I am not trying to publish any reports using SSRS. I'm just working on designs and saving them. Any help for this at this point?
Leigh
View 1 Replies
View Related
Jul 9, 2006
Hi,
I have found that when I'm debugging a custom component in BIDS that I've created in another instance of Visual Studio, every time I rebuild the component I have to shutdown and restart BIDS and then reattach to the BIDS process. Which is pretty time consuming... And if I find a small error in my custom component when debugging then I don't seem to be allowed to make any changes to the code unless I stop debugging and go through the process above.
Am I missing something here? Or do I really have to manually go through these steps every time I want to change code in the component I'm debugging?
Can I automate the process with MSBuild or NAnt? If so, is there an example of this anywhere?
Thanks in advance,
Lawrie.
View 1 Replies
View Related
Apr 20, 2007
My server is a dual AMD x64 2.19 GHz with 8 GB RAM running under Windows Server 2003 Enterprise Edition with service pack 1 installed. We have SQL 2000 32-bit Enterprise installed in the default instance. AWE is enabled using Dynamically configured SQL Server memory with 6215 MB minimum memory and 6656 maximum memory settings.
I have now installed, side-by-side, SQL Server 2005 Enterprise Edition in a separate named instance. Everything is running fine but I believe SQL Server2005 could run faster and need to ensure I am giving it plenty of resources. I realize AWE is not needed with SQL Server 2005 and I have seen suggestions to grant the SQL Server account the 'lock pages in memory' rights. This box only runs the SQL 2000 and SQL 2005 server databases and I would like to ensure, if possible, that each is splitting the available memory equally, at least until we can retire SQL Server 2000 next year. Any suggestions?
View 8 Replies
View Related
Aug 10, 2007
Hi,
We have an old machine which holds SQL server 2000 database. We need to migrate a whole database to a new machine which has SQL server 2005.
When we tried to move whole database using Import and Export Wizard, only tables can be selected to import/export. However we want to import/export the whole database, including tables, stored procedure, view, etc. Which tool should we use?
Thanks.
View 1 Replies
View Related
Aug 10, 2007
Hi,
We have an old machine which holds SQL server 2000 database. We need to migrate a whole database to a new machine which has SQL server 2005.
When we tried to move whole database using Import and Export Wizard, only tables can be selected to import/export. However we want to import/export the whole database, including tables, stored procedure, view, etc. Which tool should we use?
Thanks.
View 5 Replies
View Related
Jun 6, 2007
Hi,
When I am trying to access SQL Server 2000 database from another machine i got this error
Server: MSg 17, Level 16, State 1 [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied
but I could access the database on same server and in that server i could access other databases in different server.
View 6 Replies
View Related
Feb 13, 2008
When I proposed start to use SQL Server 2005 for new VS 2005 web sites, one of my co-workers responded that
we will update the old SQL Server 2000 databases to SQL Server 2005 when we are ready to use 2005 SQL Server.
Questions:
1. Any expected problems to upgrade old 2000 databases to new 2005 SQL Server?
2. I have installed both 2005/Management Studio Express and 2000/Enterprise Manager in my PC. Any expected
problems when running both 2000 and 2005 SQL Server at the same database server?
3. What is the best configuration for running SQL Server 2005 when we have old 2000 databases? Upgade or not upgrade?
TIA,
Jeffrey
View 4 Replies
View Related
Oct 20, 2007
I am getteing
need help
Query analyzer error Unable to connect server local Msg17, level 16,state 1
ODBC SQL server driver [DBNETLIB]SQL server does not exist
View 6 Replies
View Related
Apr 3, 2008
Hi,
I am having a problem connecting my .net applications from the application server to the database server. When I run the application from my windows xp (sp2) box it works fine. When I try to connect via SQL Management Studio to the database server from the application server I get the same error.
Here is the error:
System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Here is the Environment:
App Server:
Windows Server 2003 Standard Edition
Inside Company's Firewall/ Network
Database Server:
Windows Server 2000 Advanced Edition
SQL Server 2000 SP4
Remote Connections to the Server is checked
Enable Protocols: Named Pipes & TCP/IP
TCP/IP Port: 1402 (I don't know why it isn't the default of 1433)
The db server is sitting out side the Company's firewall (don't ask me why). I can access it fine from inside the firewall on my XP box but not from windows server 2003. There is a web server outside the our network that also connects to the db server with no problem and that is running Windows Server 2003 Web Edition.
I can ping the db server from the app server using the IP address.
I tried using the IP address and the port 1402 in my connection string but that didn't work from any machine (XP and Server).
I imagine the issue is somehow related to the company's firewall but why would it only block Windows Server 2003 and not XP?
What do I tell the network admin to change?
Any help would be appreciated.
Thanks,
Oran
View 4 Replies
View Related
Jan 4, 2013
if you can restore a database to Server B using Server A as the service. Meaning we would issue the command on Server A but somehow point to Server B as where we want the restore to happen.
The backup file would be in a location independent of both servers.
View 4 Replies
View Related
Jul 23, 2005
Dear all,On Win2000 server with SP3, I am trying to access a SQL Server 7.0database, "TestDB", from VB6 via a SQL Server ODBC system DSN using ADO2.7. In SQL Server Enterprise Manager, there is a login named "Tester".In its property window, NO "Server Roles" was assigned but its"Database Access" was set to "TestDB". This login was also made as theuser of "TestDB" with "public", "db_datareader" and "db_datawriter"selected as its "Database role membership". All the tables I am tryingto access in "TestDB" were created under "Tester".My code is like:Set conn = New ADODB.Connectionconn.Open "DSN=TestDSN;UID=Tester;PWD=test"Set cmd = New ADODB.Commandcmd.ActiveConnection = conncmd.CommandText = SQLset rs = cmd.Execute()If I set the SQL to something like "SELECT * FROM tbl_test", I alwaysget an error of "-2147217865" saying "[Microsoft][ODBC SQL ServerDriver][SQL Server] Invalid object name tbl_test". If I set the SQL to"SELECT * FROM Tester.tbl_test", everything runs properly. Could anyoneplease kindly advise why the first SQL is not working? Or in otherwords, why must I prefix the table name with its owner while the DBconnection is already made under that owner name? Thanks in advance.Tracy
View 10 Replies
View Related
Sep 20, 2006
When I try to migrate a database on a SQL Server 2000 server to a SQL Server 2005 server with the Copy Database Wizard of the SQL Server Management Studio, I'm confronted with the following problem;
Performing operation...
- Add log for package (Success)
- Add task for transferring database objects (Success)
- Create package (Success)
- Start SQL Server Agent Job (Success)
- Execute SQL Server Agent Job (Error)
Messages
* The job failed. Check the event log on the destination server for details. (Copy Database Wizard)
When I take a look at 'Event viewer' on the SQL 2005 server, the following error is displayed;
InnerException-->An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005,
this failure may be caused by the fact
that under the default settings SQL Server does not allow remote connections.
(provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
I already enabled the MSSQLSERVER network configuration protocols (TCP/IP and Named Pipes ).
How do I solve this problem?
View 9 Replies
View Related
Jan 22, 2008
My site works fine in VWD2008 express, but I get this error when I try to use it on my live website.
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.
According to this article: http://support.microsoft.com/kb/914277 I am supposed to:
1.
Click Start, point to Programs, point to Microsoft SQL Server 2005, point to Configuration Tools, and then click SQL Server Surface Area Configuration.
Ok, there is no such program in this folder. The only thing in there is "SQL Server Error and Usage Reporting"...
The other thing I am greatly concerned with is this: All is want is for my webpages to be able to access my database for user authentication. I DO NOT want to grant the internet rights to remote connect to my database.
View 4 Replies
View Related
Mar 24, 2008
Hi All,
Please some one help me...
I have to insert a csv into one table in sql server. But the problem is the file is in one server and SQL SERVER 2005 is in other server..
how do i insert the file....
please help me.....
View 1 Replies
View Related
May 31, 2006
Hi Guys,
I have had SQL Server Express and Sql Server Management Studio Express installed on my machine for some time and recently tried to install a trial of SQL Server 2005 as well. (Yes, I'm migrating from Visual Studio Express to Visual Studio Professional, just as in tended!)
Everything went fine except that nothing seemed to be installed. I searched in all the obvious places - both on the Start/Programs menu and on the hard-drive: nothing.
A check under Add/Remove Programs showed that Sql Server 2005 Express was installed, but called SQL Server 2005.
So after a number of retries in which the install program kept saying that there was nothing to install, I selected every option under Advanced in the intall process. This resulted in stuff being installed and I now have SQL Server 2005 running on my machine, but no SQL Server Manager icon.
My questions are:
Where can I find the SQL Server Manager executeable?
Has anyone installed SQL Server Express, SQL Server Mangement Studio Express, SQL Server 2005 and SQL Server Management Studio on a single machine successfully? If so, what order did you install them in? (I'm planning on uninstalling everything SXQL Server related and starting again.)
Thanks very much for your help.
Regards
Gary
View 5 Replies
View Related
Jul 23, 2005
Hi,Is it possible to install on a Windows server 2003,SQL SERVER 2000 in the folowing configuration :SQL server 7.0 as a default InstanceandSQL server 2000 as a named instance.Thanks for your answer.
View 1 Replies
View Related
May 4, 2007
Hi
I have created a linked server from SQL Server 2005 (SP 1) to SQL Service 2000 (SP 4) with a sql server login that is available on both servers but with different passwords and permissions.
I am getting the following error while accessing the linked server in management studio based on the scenario given below ;
------ Error Message Starts
OLE DB provider "SQLNCLI" for linked server "(SQL Server 2000 instance name)" returned message "Communication link failure".
Msg 10054, Level 16, State 1, Line 0
TCP Provider: An existing connection was forcibly closed by the remote host.
Msg 18456, Level 14, State 1, Line 0
Login failed for user 'abc'.
------ Error Message Ends
Consider login name is abc.
Now this login abc has sysadmin rights on sql server 2005.
The same login abc has only db_datareader rights on sql server 2000 on just one database and is not associated with any fixed server role.
I have configured the linked server using the following options;
1. I have tried impersonating login from SQL Server 2005 to SQL Server 2000 .
2. I have also tried specifying remote login / password option.
Anyone having any idea, would be of great help.
Regards,
Salman Shehbaz.
View 3 Replies
View Related
Jul 22, 2007
i did "Linked server" between To Servers , and it's Working.
---------------------------
For Example :
Server 1 =S1.
Server = S2.
i create table in S1 : name = TblS1
i create same table in S2 : name TblS2
and i create trigger(name tr_cpD) From S1 in TblS1 For send data To TblS2 in S2
/****************** trigger Code ***************
CREATE TRIGGER dbo.tr_cpD
ON dbo.TblS1
AFTER INSERT
AS
BEGIN
SET NOCOUNT ON;
insert into [S2].[dbname].[dbo].[TblS2] Select ID,Name from insertedEND
**************************************************
result is :
Msg 7399, Level 16, State 1, Procedure tr_cpD, Line 14
The OLE DB provider "SQLNCLI" for linked server "S2" reported an error. The provider did not give any information about the error.
Msg 7312, Level 16, State 1, Procedure tr_cpD, Line 14
Invalid use of schema or catalog for OLE DB provider "SQLNCLI" for linked server "S2". A four-part name was supplied, but the provider does not expose the necessary interfaces to use a catalog or schema.
how i can execute this trigger
View 5 Replies
View Related