I support numerous cluster SQL boxes and as part of my daily DBA Check regime I need to know whether the instances have faulted and switched the to other side of the cluster.
Since not all fault's which are recorded in the event logs result in the instance failing over to the other side of the cluster, and the SQL instance thinks it exists on the virtual name, this can make it difficult to indentify which server SQL resides on using just SSMS.
Does anyone know a T-SQL command to discover the BIOS name -alternatively and recommendations how I check this parameter?
Is there any way to set up name resolution for DTC when there are two servers with the same name? I have three servers - two production systems named "SQL" and an archive system "DMART". I want to run DTC procedures to archive data from both SQL's to the DMART. Is there any way to set up the DMART so it can properly resolve the names from each of the SQL's? They are on separate networks, but unfortunately have the same NetBIOS name.
Hi I want to build a class in ASP.Net 2.0 which will lookup if SQL server is up & running & whther connection is getting establish to the Database. if it fails it will try 3 time to reconnect. if no sucess then it will shoot a mail to Admin. Please help me to achive this. Thanks Vishal.
Hello! I want to read an image from the database. I've this function but she returns me an error that suggest me that the image might be damaged or corrupted. I would like to know if it's possible and how to check an image in the DB.
can anybody help me that how can we see sql server Health check with t-sql.Because i am trying to make script for this Basically i need these info.. 1.Current Date 2.Current time 3.Session,id 4.Session name 5.all locks 6.cpu utilization 7.how much disk space is used inside the database 8.how much space is free inside the database 9.Date read 10 Date write 11.how can we see process information with t-sql or with stored procedure
and i have solved 6 problems from this list i made queries for this . will u plz help me thaxxx
if(@b='1') begin select * into #example from example select * from #example drop table #example end else begin select * into #example from example select * from #example drop table #example end With syntax check, I always get "'#example already exist'" But why? Just because of two "select into temp table" operation? I am confused. Thank you.
I am skilled Oracle DBA and recently started to support MS SQL Server 2000
.
For all my Oracle DBs I run "Watch Dog" script that test if database ( server for MS SQL Server) is up and running and send me message on pager or by E-mail if it is down.
Hello all, I am hoping this is the correct place for this. I have an application that depends on an active connection to Sql Server Express 2005. I am looking for a way is any to check for the existance ofthe server I defined and wether it is online or not. I know I can just catch the error on connection but it takes a bit and I have customers trying to cancel it before it's finished because they think it's locked up. I would like a quick way to check without trying to create a connection if it's online, then if it is, proceed, if not, let the customer know. I was hoping for something like a database server ping of sorts.
Hi.. I have a web application(ASP.NET 2.0 + C#). I have sql server 2000 as well as sql server 2005. Several queries in my application work well with the sql server 2005, and the same query fails in the sql server 2000. How to check if the database is connected to sql server 2000 or sql server 2005 and then call the queries accordingly through the c# code? Thanks
I want to set up a simple check constraint on a column limiting to values "Yes", "No" and ""I'm trying to use:CONSTRAINT IsAccessToItRestricted_ckcheck (IsAccessToItRestricted in('Yes,'No','');but this is not the right syntax.............. help!
Hey anyone, I got a problem to check a connection whether it is established or not from my C# Application to SQL Server. I am developing my application which can run in 2 modes: 1. Online: There must be a connection to SQL Server to get new data updates. 2. Offline: I dont need a connection to SQL Server. I set a timer to tick every 5 seconds and it will check the connection with SQL Server and my problem here: (this is my code)1 public static bool checkConnection() 2 { 3 SqlConnection conn = new SqlConnection("mydatasource"); 4 try 5 { 6 conn.Open(); 7 return true; 8 } 9 catch (Exception ex) { return false; } 10 }
Yes, it works but my application seems to wait about >3 seconds to get the return "False"; I tried to add "Connect TimeOut=1" in my Connection String, but the problem is still there. I dont know whether there is a faster way to check the connection to SQL server which is established or not. Thank you very much, Joesy
Hi all, When I detach a SQL Server database, I see the following information: Connections using this database: 5 Where are the connections from ? How can I check ? Please help me ! Thanks
I have a stored procedure that references another stored procedure on a linked server. I would like to check if the linked server is running prior to accessing the stored procedure. Everything I have tried returns either message 11 or 17 and terminates the stored procedure. I would like to do some cleanup before the termination. Is there any way to check this?
I have my SQL server installed and running on a windows 2003 server. Sometimes, the server stops unexpectedly. I want to know if there is any mechanism to alert as and when the SQL server or SQL server agent goes down.
I guess everything is a windows service. Can we have a mechanism to test this service from a script and send an alert mail when the server goes down? How can this be done from a script?
I want to run Profiler Traces, Perfmon Checks and whatever else to see what hits the server the hardest in order to work out where I can make performance improvements. We don't have any massive problems other than more timeouts than I would expect from web users no-and-then when they do pretty simple free-text searches. I just want to see if I can lighten the load on the server in general.
Where does a DBA get the most ROI? I don't want to drift into the realm of diminishing returns where I am making changes that have no noticeable impact.
What should I start measuring first and how do you measure it? (E.g. if I should monitor disk writes in Profiler, how many writes are too high for a statement? 100? If so, is one 100-write statement per hour OK but one 100-write statement per second is not OK?)
If there is already an article for this, my apologies. I'd be grateful if you can point me to it. Is http://www.sql-server-performance.com/ a sufficient one-stop-shop for this question? If so, have you found some articles there to be more useful than others?
Hallo,MSDB.dbo.BackupSet logs all backupsis it possible find Status of Backup (Success / Failed)?Table "BackupSet" hasn't any information about it.I need log and notify all backups with status(It must be a windows service (c#)Thanks
How to check if ftp/sftp server is running before actually starting the ftp/sftp taks? I tried the script task as shown in the attached link but it does not really check for ftp connection.
I'm attempting to check to see if a file exists on our server before showing a link it.
I put this function in the Report Properties:
Code Block Function isFile(PathFileName As String) As Boolean Return isFile = System.IO.FileExists(PathFileName) End Function
I chose a situation where I'm getting back two rows of data, one row is true and the other row is false however, when I run the report they're both coming back as 'True'.
We created a virtual directory to the file system that houses our files, so my PathFileName variable will contain something like http://Sales/North/Sales110907.pdf.
Can I use the FileExists in this fashion or am I going down the wrong path?
Hi,I have over 200 stored procedures and they have dependencies on each other (not necessarily a cyclic dependency).Is there a way in SQL Server 2005 that I can disable a dependency check while I am executing a script that creates those stored procedures, and then re-enable it after?Thanks.
How to check number of active connections ? I know two ways of doing it ..
1. run sp_who2
2. in Current Activity in Enterprise Manager ..
If what ever number I am seeing is the Active Number of Connections ..then
I am facing a problem here ..
In My serevr I have 75 Users licenses are configured for Per server option .. Through a Java aplication when Developer tried to capture any SQL server Connection it says following error ..
Details : [MERANT][SQLServer JDBC Driver][SQLServer]Login failed. The maximum simultaneous user count of 75 licenses for this 'Standard Edition' server has been exceeded. Additional licenses should be obtained and installed or you should upgrade to a full version.
If I see from Sp_who2 and Current Activity , I can see only 37 Connections ...?
Why is so .. If I am having 75 configured and 37 live in sp_who2 ..why I am getting that error message ?
Is there other way to see Actual Number of Connections made to server ?
I am trying to check if a view exists on a linked server using sys.views. I tried to fully qualify it but that produces an error telling me the below, which both the database name is correct as well as the server name. Is it possible to obtain a list of views from a linked server connection? Msg 7314, Level 16, State 1, Line 321 The OLE DB provider "SQLNCLI10" for linked server "alpha" does not contain the table ""salesdata"."sys"."views"". The table either does not exist or the current user does not have permissions on that table.
SQL Server 2008 is the server I want to query from and sql server 2000 is the server I want to query even if I try to use this syntax it still produces the above said error
Code: select count(*) from alpha.salesdata.INFORMATION_SCHEMA.VIEWS
I also tried to qualify the views by using the below and still same error
Code: select count(*) from alpha.salesdata.INFORMATION_SCHEMA.VIEWS where table_schema = 'dbo'
I am about designing an access project file that connect to a SQL Server database : it could be either on the local computer or a remote workstation, this depending on where the front end is running.
Bypassing the default log on dialog box i have set my own form that users should use to connect on adp. Then using baseconnection string i connect the adp to sql server database.
My concern is how can i check from vba if the instance of SQL Server where my back end database is located is running in order to make users knowing that due sql server service status off their connection tentative will fail.
inform u i can check same from console management however i would to automate same controle from my adp and avoid that users have to operate such task...
Our database crashed this morning and went into recovery mode.how I can track the progress of the recovery to determine how long it might take?The error log shows that it started up all the databases, then shows the recovery messages fr the msdb database, then shows that sql server is ready for client connections. I don't see any messages about my database recovery or the number of transactions to roll forward or background. If i run the sys.sp_readerrorlog and search for my database name, the only line returned is the starting up database message.
I do expect the database to take a while to recovery as it is about 8TB, there is plenty of free disk space about 3TB.The database started recovery while a transaction log backup was running so that backup failed,the last transaction log backup was taken 2 hours before recovery started. The last full backup completed about 5 days ago. The transaction log backup occurs every 2 hours and is typically around 16GB.
I have the following code to send out an email if the row count of a table exceeds a certain number. But it seems to fire an email alert no matter what. condition check part of the code?