Last Time Someone Connected To A Database

Aug 11, 2005

Hello all,

Is there a way to figure out when was the last time someone connected to
a database? SQL 2000 environment.

Thanks,
Raziq.



*** Sent via Developersdex http://www.developersdex.com ***

View 5 Replies


ADVERTISEMENT

Database Cannot Be Connected??

May 19, 2008

Dim delconn As New SqlConnection _
("data source=15-46SQLEXPRESS;AttachDbFilename =C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataProjectDB.mdf; Integrated Security=True;")
 
this is my coding,
anyone can spot an error from there??
the database can't be located somehow....
 help me ,for god sake
 

View 1 Replies View Related

Why Isn't The SQL Database Being Connected?

Jun 9, 2006

if not Page.IsPostBack then            Dim strConn As String = "server=(local);database=NORTHWND"    Dim sql as string = "Select EmployeeID, FirstName, LastName from Employees"    Dim conn as New SQLConnection(strConn)            Dim Cmd As New SqlCommand(sql, conn)            Dim objDR As SqlDataReader            conn.Open()'This is where it has an error and says-- 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. The NORTHWND database is set up in the web.config fileThanks! Jon

View 3 Replies View Related

Connected To Which Database

Jul 20, 2005

Hello all,I have a scripts which needs the information about the database inwhich it is running.How can I find out this information.For example if I want to know the User who has satrted this report, Iuse the SYSTEM_USER procedure.Does an equal procedure exist to find out, on which database the useris connected to.RegradsFranz-Josef

View 1 Replies View Related

List All Users Connected To Database

Dec 14, 2007

Hi,

I need to be able to list all User connected to a particular database, after doing a bit of playing I have writen a simple view in the database to show this information which looks like

select spid, status, loginame, hostname, blocked, db_name(dbid), cmd from master..sysprocesses where db_name(dbid) = 'AutoCost2008

But my problem is that as this needs to be run from an application where the user is logged on as a standard user and therefore when this is run it only shows the current user, I am not sure what permissions I need to give this login to allow them to view all users connected to this database without giving them full Admin permissions, can anyone please help.


Thanks,


Gavin,

View 3 Replies View Related

Open Database In A Connected Device

Jan 19, 2007

Hi Everybody:

I'm writting an standar application in c# that comunnicates with a sql server 2005 in a mobile device. The mobile device is connected to the pc with an usb wire. In the sample I've made, I've inserted in the form main a datagridview. I go on the wizard to select the data source. I choose a Microsoft SQL Server Mobile Edition data connection. The data source is tge activesync mobile device. I create a new database in the mobile device called test.sdf. The wizard has a button to check the conecttion and it rules. A new connection appears in the server explorer. I add rows through a query. I build the solution and no problem, but when I start the debug session an sqlceexception occurs: Data Source not found. In the database connection that the project has created the connection string is: Data Source ="Mobile Device est.sdf";

I didn't write any code. I just went on the wizards. All the code has been inserted by visual studio 2005.

Any idea?

View 3 Replies View Related

How Can I See To Which Database And Table The Web Service Is Connected To?

Dec 4, 2007

Hello All!

I have one web service, which Im testing.
I would like to connect it (the web service) to a a database with the same structure as the old database I was using before.

Only difference is the name of the database and that the web service was done in visual studio 2003.
I have now VS 2005.

Can this be done through Microsoft SQLServer management studio express?

Or how can I see to which database and table the web service is connected to?


Thanks in forehand!

Nikita

View 1 Replies View Related

Publish C# Project Connected To Database?

Aug 10, 2015

i want ti publish a c# project connected to sql database, i introduced the database into my project, i use the connection string: 

  SqlConnection cn = new SqlConnection(@"Data Source=CONTA-LAPTOP;Initial Catalog=RaducuIonel;Integrated
Security=True");  if right click on the database-> properties iti show me next connection string: Data Source=CONTA-LAPTOP;AttachDbFilename="C:Program FilesMicrosoft SQL ServerMSSQL10.MSSQLSERVERMSSQLDATARaducuIonel.mdf";Initial
Catalog=RaducuIonel;Integrated Security=True    

...when i connect to server in sql i use windows autentification. And the last thing: when i publish the project it ask me: application will check for updates from [URL] or application will not check for updates. I select first option: to check for updates from here: [URL] .to another computer my application cannot connect to database (login error) .what i am doing wrong? 

View 2 Replies View Related

SQL Server 2008 :: How To Find Who Is Connected To A Database From DMV

Sep 16, 2015

I have a query that finds all SPID's connected to a particular database:

select d.name, p.*
from sys.databases d join sys.sysprocesses p
on d.database_id = p.dbid
where d.name = 'my_db'

But now we have a new rule that we should not use outdated compatibility views, and one of them is sys.sysprocesses. I checked sys.dm_exec_connections/session/requests but failed to replace my existing code. The first two don't have dbid, the last one, requests, has it, but it selects only currently executing statements.

View 0 Replies View Related

SQL Server 2008 :: How To Find Who Is Indirectly Connected To A Database

Feb 25, 2015

Recently I needed to find all processes connected to a particular database, let's call it Test_db. I have a simple query to find all connections to my database:

select *
from sys.databases d join sys.sysprocesses p
on d.database_id = p.dbid
where d.name = 'test_db'

But there was a process that was connected to another database like USE another_db_name; but was actually selecting from tables in test_db. Is it possible to catch such connections?

View 7 Replies View Related

Transact SQL :: Accurate Count Of Workstations Connected To Database?

Nov 2, 2015

How do I get an accurate count of workstations connected to a database?

View 7 Replies View Related

Select Data From Table In One Database Server While Connected To Another Database Server.

Dec 18, 2007



Hi,


Is there a way in SQL Server 2005 to use a select statement to fetch data from a table in another Server while running the query in one Server.

Like using a database Server Link in oracle...


Thanks
Pramod

View 8 Replies View Related

The Database Created Using Management Studio Cannot Be Connected To Visual Studio???help

May 13, 2008

 
 
I have created a database under management studio and i want it to be connected in visual studio but it failed
the error msgs said that the database can't be connected coz the database with same name exits but that is not true

View 2 Replies View Related

DB Engine :: Time Testing Azure Point In Time Database Restores?

Sep 21, 2015

I need to do a time test for restoring an Azure SQL database from a point in time. Can I automate this through PowerShell.

View 3 Replies View Related

Reporting Services :: SSRS Loses Ability To Delegate User Credentials To Database Time To Time?

Apr 30, 2015

we have problems with our SQL Reporting Service 2012 (SSRS) server . We have setup Kerberos delegation between SSRS and the database server (SQL Server Always-on cluster) so users are authenticated down to the database. The issue occurs from time to time that SSRS loses the ability to delegate the user credentials to the database. At this point in time the Report Server logs contain rejected database connections because of ANONYMOUS logon. After restarting SSRS the problem is gone.

View 2 Replies View Related

All Users Connected As SA!!??

Oct 11, 1999

Beginning this morning, when I look in Current Activity in our SQL 6.5 Server, all trusted user connections to my server are showing up under "SA".
We are running mixed security. Most of the connections are through ODBC. We have applied SP5a to SQL.
As far as I know, nothing in SQL has changed. From what others are telling me, nothing in NT or the network has changed.

Something is up. What am I missing? Where can I look?

Please help.

View 2 Replies View Related

Cannot Get Connected To My SQL Server

Mar 23, 1999

When I try to connect to my SQL server I get the following error.

Microsoft SQL Enterprise Manager
A connection could not be established to MLM1-[SQL Server] Cant allocate space for object 'Syslogs' in database 'tempdb' because the 'logsegment' segment is full. If you ran space in syslogs dump the transaction log. Otherwise use ALTER DATABASE or sp_extendsegment to increase the size of the segment.

Ok, I am not up on SQL so I'm not sure how to dump my tempdb database. I have a coworker that has only done this sort of thing in the Enterprise Manager and we can't get there. So how do I do this and make sure that I don't blow away any data? Also if I do dump my tempdb will this cure my problems and how do I avoid having this happen again?

Any help would be greatly appreciated,
Jeb

View 1 Replies View Related

Integration Services :: Import Varying Number Of Tables Each Time From One Database To Different Database

Sep 9, 2015

I am new to SSIS. I have been struggling with this for the past one week. I have a weird task. I need to import several tables from one database to a different server with a new database name. We need to do this at the end of every year. The main problem here is that the number of tables varies every year. You may not have all the tables as last year or may have more tables. So I need to create a dynamic task that takes care of this every year without changing the package.

I have performed the following tasks **

1. Create a new dynamic database. ( I have used Execute SQL Task to do this) 2. Copy all the table structures ( I have used Execute SQL Task to do this)

3. Import Data. This is the main problem. I was trying to create a dynamic connection string with variables as suggested in several forums but I finally came to know that this cannot be done if the table structures are different as the metadata cannot be refreshed at runtime.

4. The final step to create a process to validate the data (the count from each table for both source and destination. I think this can be done with Sql task.

What is the best method to do this? My DBA does not like “Transfer SQL Objects Task” or “transfer Database Task”. I would like to create this as a dynamic process.

View 5 Replies View Related

How Is It Possible To Set A Filed In A Database To Automatically Add The Current Time To The Filed At Run Time?

Oct 25, 2007

how is it possible to set a filed in a database to automatically add the current time to the filed at run time, is this possible; this filed has already been identified as 'DateTime' .

View 4 Replies View Related

Who Is Connected : Aspnet Or Iusr_

Apr 18, 2007

Hi

I spent the whole week trying to find a solution with a problem of authorization/access on a new website (aspnet2 + slqserver 2005)

The site was running well in the test environnement but once deployed the production site behavior was quite erractic. some clients run ok, others not and that changes for the same client with each session.

it appeared that the problem came from the access to stored procedures. sometime, theirs accesses were authorized sometime denied.

finally, tests showed that the client's userid was either aspnet or iusr_

by putting the same permissions on these 2 accounts, the problem is solved and all the clients are running fine.

now the question : for which reason the client connect randomly to one or the other of these 2 id ? is this normal ?

best regards

View 1 Replies View Related

Can ASP.net 2.0 Be Connected With SQL Server 2000?

Jan 7, 2006

using  vs2005 to build  web pages of asp.net 2.0, The database is SQL  Server 2000,.But I always fail to connect.
using the following  configuration in web.config:
<appSettings>  <add key="DSN_student" value="server=(local);uid=admin;pwd=123456;database=network_course"/>   </appSettings>
I also failed to connect using  the following configuration in web.config:
<add name="network_courseConnectionString1" connectionString="Data Source=(local);Initial Catalog=network_course;User ID=admin;Password=123456;"   providerName="System.Data.SqlClient" />
I am a beginner from  China  and eager to get answers! Thank you!
 

View 2 Replies View Related

SQL Srv MSDE - Not Connected Aft Install

Oct 14, 2004

I have just installed Windows 2000 Pro, Visual Studio 2003 Academic and , MSDE 2000. I get the little icon in the Service Tray(?) showing an empty circle partially overlaying a server symbol. It says Not Connected-VSDOTNET.
If I click it and get SQL Server Service Manager and put in Server name of VSDOTNET, The drop down listbox for SERVICES is empty (no SQL Server choice)
I enabled TCP/IP for this server thru SVRNETCN.DLL. I'm a newbie to pc development. Help!

View 1 Replies View Related

Display Connected Users

Mar 22, 2007

Hi everyone,

I have one Inventory system which is in VB6 and SQL Server 2000.
In my database there is table of users and userrights.

These are my application users. They are nothing to do with Windows users and SQL Server users. I am connecting to database using 'sa' login.

Now I want to display all my online users. I tried with @@SPID to manage their but not getting the exact results.

Thanks in advance.


Riyaz

View 5 Replies View Related

Can Users Be Connected During A SQL Backup?

Mar 19, 2008

We have a existing backup, re-index job that runs at night on anexisting database that is now accessed by web users 24/7.Problem is that one of the steps is to kill all users before backupstarts so it kills any transactions that are happening at that timequestion is... Can users be connected during a backup? Will removingthe kill users step slow the backup alot?any other suggestions would be appreciated.thanks

View 1 Replies View Related

List Of Connected Users

Mar 7, 2008

sorry about asking basic question, just slipped out of my mind,
how to get the list of currently connected users on one database and on whole server in sql server 2005

thanks,

View 9 Replies View Related

How Many Users Are Connected To My Aspnetdb (SQL SERVER)?

Jan 18, 2008

I have uploaded my site on localhost and sharing on intranethow can i answer these question? Q1) How many users have loggedin? and using my database?Q2) Which table has lots of load?Q3) how can i immediately close particularly connection?  

View 4 Replies View Related

Maintaining A Log For The Users Connected To Sql Server Db.

Dec 8, 2005

Hi !

I need to maintain a record such as how many time any user (e.g, sa) connects to the sql server. Means whenever any person is connecting to the database through application or directly, then i need to know that through which sql user(e.g sa), any body connected.

Regards,
Shabber Abbas Rizvi.

View 1 Replies View Related

View Users Connected To SLQ Server?

Jul 20, 2005

Is there a utility that will allow me to see what users on my network areconnected/active on SQL server?Ryan

View 4 Replies View Related

I Have Some Problem When I Connected To Informix By SSIS

Jul 16, 2007

Hi all,

I have problem when I connect to Informix by DataReader Source(SSIS)

Look for error report


Error: 0xC02090F5 at Data Flow Task, DataReader Source [1]: The component "DataReader Source" (1) was unable to process the data.

Error: 0xC0047038 at Data Flow Task, DTS.Pipeline: The PrimeOutput method on component "DataReader Source" (1) returned error code 0xC02090F5. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.

Error: 0xC0047021 at Data Flow Task, DTS.Pipeline: Thread "SourceThread0" has exited with error code 0xC0047038.

Error: 0xC0047039 at Data Flow Task, DTS.Pipeline: Thread "WorkThread0" received a shutdown signal and is terminating. The user requested a shutdown, or an error in another thread is causing the pipeline to shutdown.

Error: 0xC0047021 at Data Flow Task, DTS.Pipeline: Thread "WorkThread0" has exited with error code 0xC0047039.

SQL Command :
select * from hist_itenary
where book_no in (select book_no from book where updt_date_time like '2007/07/07%')

but when i use this command that not contain where statement(select * from hist_itenary ), this command has working.


Thank you for your answer



chonnathan

View 3 Replies View Related

Access Forbidden: Too Many Users Are Connected

Oct 22, 2007

I have a web application that runs on IIS on Windows XP professional. I have reached the max number of connections to the IIS website. So, I tried the approach of disabling HTTP Keep-Alives.


All is fine and dandy until my Business Intelligence Studio report project attempts to set the parameters for a report using report viewer at which point I get the following error message:


"The request failed with http status 401: access denied."


How can I fix this? I have posted this over at the asp.net forums, but I figured I would check here to see if anyone else has solved this problem.

View 1 Replies View Related

When Windows Firewall Is ON, SQL Server Does Not Get Connected Thru TCP

Jul 27, 2006

I am using SQL Server 2005 Express + SP1 on a Windows Small Business Server(SBS) box. The SBS is connected to a client thru LAN.

Following are what I gave as IP address and DNS on the server:

IP: 192.168.16.2, subnet mask : 255.255.255.0, Preferred DNS server: 192.168.16.2, Default gateway and Alternate DNS Server blank

On the client, I have,

IP: 192.168.16.4, subnet mask : 255.255.255.0, Preferred DNS server, Default gateway and Alternate DNS Server blank

I can ping and connect to either of the machines.

If I do a sqlcmd -S "tcp:servernameINSTANCE,port", I get the following error message:
HResult 0x80090304, Level 16, State 1
SQL Network Interfaces: The Local Security Authority cannot be contacted

Sqlcmd: Error: Microsoft SQL Native Client : Cannot generate SSPI context

If I do a sqlcmd -S "tcp:192.168.16.2INSTANCE,port", it connects to SQL Server.

I have the Windows Firewall ON. If I Off the firewall, I do not have any problem at all.

I included File and Printer Sharing, sqlsvr.exe in the Exception list of the Windows Firewall.

Any help to solve the issue is appreciated.

Thanks.

View 7 Replies View Related

Help! New Reporting Services Install Cannot Be Connected To!!

Nov 2, 2007

Help!!


I've installed Sql server 2005 enterprise edition in full onto windows server 2003 as investigating the BI option. All fine except reporting services just fails to connect to the reports server. Im connecting using management studio on the same machine ie local.

charecteristics:
- Currently using the same Domain administrator username and password everywhere as in testing as dont want to be sidetracked by connection issues- has total access across the network.
- http:\servername
eports works fine but httpervername
eportserver does not work
- Reporting services configuration is showing all green ok symbols and that connects fine
- all other components are fine.
- Changed to TCP & named pipes for database in Surface config but no luck (in the features section of this tool clicking in windows integrated security brings up same error

Getting a long piece of HTML code message which can't copy, but the 2 key parts of the error message below seem to be:

1) "Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'." which is at the top
2) "The file you are attempting to save or retrieve has been blocked from this Web site by the server administrators." in the body


Any ideas as need to fix asap

Many Thanks

Ash

View 4 Replies View Related

Sql Query Statements &&amp; ADO.NET Connected Classes.

Oct 9, 2007

Hi all,

Do I still need to write the .sql query statements (in SSMS) if I use the ADO.NET connected classes like GetSchema method or the DbDataAdaptor Object?

I'm very new to Visual Studio 2005 & SQL Server 2005..

Thanks!

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved