top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

SQL: Do you know the query with which i can find out when the SQL Server service had started ?

+2 votes
348 views
SQL: Do you know the query with which i can find out when the SQL Server service had started ?
posted Mar 25, 2014 by Deepak Chitragar

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

According to me there are two ways to know this:

1 The following query will give you the time when the SQL server service is started;

select crdate from [master].dbo.sysdatabases
where name=?tempdb?

2 You can use lsnrctl service of oracle to know whether the service listener has been started or not.
Go to CMD and run lsnrctl status
It will result you the appropriate message whether the service is up or down..

Note: lsnrctl status command runs only if the Oracle Bin path is stored in Environmental variables.

answer Mar 25, 2014 by Manish Tiwari
Similar Questions
+3 votes

I wan't sure how to word this question so I'll try and explain. I have a third-party database on SQL Server 2005. I have another SQL Server 2008, which I want to "publish" some of the data in the third-party database too. This database I shall then use as the back-end for a portal and reporting services - it shall be the data warehouse.

On the destination server I want store the data in different table structures to that in the third-party db. Some tables I want to denormalize and there are lots of columns that aren't necessary. I'll also need to add additional fields to some of the tables which I'll need to update based on data stored in the same rows. For example, there are varchar fields that contain info I'll want to populate other columns with. All of this should cleanse the data and make it easier to report on.

I can write the query(s) to get all the info I want in a particular destination table. However, I want to be able to keep it up-to-date with the source on the other server. It doesn't have to be updated immediately (although that would be good) but I'd like for it be updated perhaps every 10 minutes. There are 100's of thousands of rows of data but the changes to the data and addition of new rows etc. isn't huge.

I've had a look around but I'm still not sure the best way to achieve this. As far as I can tell replication won't do what I need. I could manually write the t-sql to do the updates perhaps using the Merge statement and then schedule it as a job with sql server agent. I've also been having a look at SSIS and that looks to be geared at the ETL kind of thing.

I'm just not sure what to use to achieve this and I was hoping to get some advice on how one should go about doing this kind-of thing? Any suggestions would be greatly appreciated.

...