Monday, March 26, 2012
How to determine if user is Domain admin?
connected user is a Windows Domain Admin? Thanks.You could possibly query AD using an ADSI linked server using an LDAP query
as described in BOL (Linked server section) but this would be a fair bit of
effort and its pretty slow
--
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"schumacr" <anonymous@.discussions.microsoft.com> wrote in message
news:001401c3a2f6$b8b85ad0$a401280a@.phx.gbl...
Does anyone know how to tell from within SQL Server if a
connected user is a Windows Domain Admin? Thanks.
How to determine if the logged on user is a member of an active directory security group?
We are using Windows authenication within our system, and I was wondering how it would be possible to determine if the user conected to the SQL SERVER instance was a member of a particular active directory security group?
Thanks.
Moved to Security...|||
You can use sys.login_token (http://msdn2.microsoft.com/en-us/library/ms186740.aspx) or xp_logininfo (http://msdn2.microsoft.com/en-us/library/ms190369.aspx) to get that information.
I hope this information helps,
-Raul Garcia
SDE/T
SQL Server Engine
Friday, March 23, 2012
How to determine if a Windows Auth ID is no longer valid in SQL?
Server is no longer valid, i.e. an employee is no longer with the company so
we should delete their related Windows Authentication user IDs from our SQL
Server databases?Don't you have an employee table that lists the AD login and whether the
employee is active or not? Some companies store this data directly in AD.
You need to find out where the information is stored though, before we can
tell you how to fix your issue.
Another question...are they disabling the AD account? If you were using AD
groups, instead of individual logins, you would no longer have to worry abou
t
an individuals access. It's also easier to manage and delegate management
responsibility to the business and HR.
MeanOldDBA
derrickleggett@.hotmail.com
http://weblogs.sqlteam.com/derrickl
When life gives you a lemon, fire the DBA.
"Stephanie" wrote:
> How can we proactively find out when a Windows Authentication ID in SQL
> Server is no longer valid, i.e. an employee is no longer with the company
so
> we should delete their related Windows Authentication user IDs from our SQ
L
> Server databases?
>|||I found the sp_ValidateLogins very helpful.
To quote the BOL - "Reports information about orphaned Microsoft? Windows
NT? users and groups that no longer exist in the Windows NT environment but
still have entries in the Microsoft SQL Server? system tables."
Randy
"Stephanie" wrote:
> How can we proactively find out when a Windows Authentication ID in SQL
> Server is no longer valid, i.e. an employee is no longer with the company
so
> we should delete their related Windows Authentication user IDs from our SQ
L
> Server databases?
>
How to determine if a record is not sync''d
I'm not sure if this is possible, but I was hoping to get an answer
here. I'm creating a Windows Mobile 5.0 Smartphone program which
uses SqlCeResultSets as its data objects.
I was wondering if there is
anyway to easily tell if there are records which have been inserted
into the local DB but have not been sync'd up to the publisher yet.
I use merge replication to sync the device with the host and I know
that the merge replicator obviously can tell the difference. Is there
any special field or flag that I can check to see if the record is
only local, on the subscriber side?
Thanks!
SMPfrom msmerge_genhistory you can find out the genstatus of each generation. For each generation that has not been delivered you can then use msmerge_contents to lookup the generation changes and that will give you the rowguid of the record that has not been delivered and the tablenick.
Take a look at this page:
http://www.replicationanswers.com/MergeInternals1.asp
Martin
How to determine if a record is not sync''d
I'm not sure if this is possible, but I was hoping to get an answer
here. I'm creating a Windows Mobile 5.0 Smartphone program which
uses SqlCeResultSets as its data objects.
I was wondering if there is
anyway to easily tell if there are records which have been inserted
into the local DB but have not been sync'd up to the publisher yet.
I use merge replication to sync the device with the host and I know
that the merge replicator obviously can tell the difference. Is there
any special field or flag that I can check to see if the record is
only local, on the subscriber side?
Thanks!
SMPfrom msmerge_genhistory you can find out the genstatus of each generation. For each generation that has not been delivered you can then use msmerge_contents to lookup the generation changes and that will give you the rowguid of the record that has not been delivered and the tablenick.
Take a look at this page:
http://www.replicationanswers.com/MergeInternals1.asp
Martin
how to determine cause here ?
that stands out is
The previous system shutdown at 2:31:24 AM on 9/20/2007 was unexpected.
How can I figure out root cause for why the SQL Server went down ? There is
nothing in the sql log too..
ThanksHi Hassan
The current SQL log will only be since the reboot have you looked in the
previous ones? Do you have any other events in the event log ie. was that
somehow cleared on reboot? If you do clear it, it is probably a bad idea to
so.
John
"Hassan" wrote:
> Our SQL Server was not pingable and the only thing in the Windows event lo
g
> that stands out is
>
> The previous system shutdown at 2:31:24 AM on 9/20/2007 was unexpected.
> How can I figure out root cause for why the SQL Server went down ? There i
s
> nothing in the sql log too..
> Thanks
>
>
>sql
how to determine cause here ?
that stands out is
The previous system shutdown at 2:31:24 AM on 9/20/2007 was unexpected.
How can I figure out root cause for why the SQL Server went down ? There is
nothing in the sql log too..
ThanksHi Hassan
The current SQL log will only be since the reboot have you looked in the
previous ones? Do you have any other events in the event log ie. was that
somehow cleared on reboot? If you do clear it, it is probably a bad idea to
so.
John
"Hassan" wrote:
> Our SQL Server was not pingable and the only thing in the Windows event log
> that stands out is
>
> The previous system shutdown at 2:31:24 AM on 9/20/2007 was unexpected.
> How can I figure out root cause for why the SQL Server went down ? There is
> nothing in the sql log too..
> Thanks
>
>
>
how to determine cause here ?
that stands out is
The previous system shutdown at 2:31:24 AM on 9/20/2007 was unexpected.
How can I figure out root cause for why the SQL Server went down ? There is
nothing in the sql log too..
Thanks
Hi Hassan
The current SQL log will only be since the reboot have you looked in the
previous ones? Do you have any other events in the event log ie. was that
somehow cleared on reboot? If you do clear it, it is probably a bad idea to
so.
John
"Hassan" wrote:
> Our SQL Server was not pingable and the only thing in the Windows event log
> that stands out is
>
> The previous system shutdown at 2:31:24 AM on 9/20/2007 was unexpected.
> How can I figure out root cause for why the SQL Server went down ? There is
> nothing in the sql log too..
> Thanks
>
>
>
How to determine Authentication Mode?
it's using Windows Authentication Mode or SQL Server Authentication?
I'm retreiving a list of servers as follows:
Dim dmoApp As SQLDMO.Application, dmoServerList As SQLDMO.NameList, srvrNm
As String
dmoApp = New SQLDMO.Application
dmoServerList = dmoApp.ListAvailableSQLServers
For i As Integer = 1 To dmoServerList.Count
srvrNm = dmoServerList.Item(i)
Next i
Thanks in advance for your help,
Hal Heinrich
VP Technology
Aralan Solutions Inc.Hal,
SQL Server always defaults to using Windows Authentication; it is up to the
developer to determine which authentication method to use.
And if you use some tool to generate the connection string for you, the
default will be to use Windows Authentication. This can be seen in the
connection string by the following line:
Integrated Security=SSPI
If that data|value pair is present, then your connection will use the
Windows Authentication mode. Simply remove this data|value pair from your
connection string and then you will be using the SQL Server Authentication
and be required to include user and password values.
Hope that helps.
Richard
"Hal Heinrich" wrote:
> Given a server name, and before logging on to the server - how can I tell
if
> it's using Windows Authentication Mode or SQL Server Authentication?
> I'm retreiving a list of servers as follows:
> Dim dmoApp As SQLDMO.Application, dmoServerList As SQLDMO.NameList, srvrNm
> As String
> dmoApp = New SQLDMO.Application
> dmoServerList = dmoApp.ListAvailableSQLServers
> For i As Integer = 1 To dmoServerList.Count
> srvrNm = dmoServerList.Item(i)
> Next i
> Thanks in advance for your help,
> Hal Heinrich
> VP Technology
> Aralan Solutions Inc.
>
Monday, March 19, 2012
How to detect a login under windows security?
procedure is called every time users add orders into table ORDERS.
How can I detect the login name and domain for the user that adds a new
order? What would the lines of code look like in the stored procedure?
Regards
Tore G.Hi
SELECT SUSER_SNAME()
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"nospam@.tgylnospam.no" <nospamtgylnospamno@.discussions.microsoft.com> wrote
in message news:E126A1B3-179D-405A-8E57-55BE76F669CB@.microsoft.com...
>I have a SQL Server 2000 on an intranet with windows security. A stored
> procedure is called every time users add orders into table ORDERS.
> How can I detect the login name and domain for the user that adds a new
> order? What would the lines of code look like in the stored procedure?
> Regards
> Tore G.
Monday, March 12, 2012
How to deploy SQL Server Everywhere with my windows form application?
Hello!
I've been creating a vb.net 2005 windows form application using Everywhere and it has been going pretty well. However, I haven't had much luck finding any help on how to deploy my Everywhere database file(s) and Everywhere itself. To install redistribute Everywhere, can I just add the the 8 .dlls found in the Everywhere directory into my VS setup project? Also, what database file(s) do I need to deploy in my windows setup?
Thanks!
http://blogs.msdn.com/smartclientdata/archive/2005/07/15/439008.aspx
Darren
|||
Thanks for the link Darren. This looks like it's using ClickOnce but I was hoping to deploy Everything using the Windows installer. Any thoughts on how that might happen?
Thanks!
|||it's the same process of putting the right DLLs that belong to SQL Ev into your program's app directory.
-ds
Sunday, February 19, 2012
How to de-install SQL Server 7.0
SQL Server from my desktop running Windows XP Home
edition. While attempting to un-install, I get the
following message:
" unInstallShield has detected that 'C:\MSSQL7
\BINN\sqlmangr.exe' is in use. Please close the
application using this file and unInstallShield again."
Please advise.SQLMANGR.exe is the manager program in the task tray at the bottom of your
screen that allows you to stop and start SQL processes. Right click on the
icon that looks like a little server with a red or green arrow and close
it... or you can kill the sqlmangr.exe process from Task Manager...
--
Brian Moran
Principal Mentor
Solid Quality Learning
SQL Server MVP
http://www.solidqualitylearning.com
"TJ" <tajammalw@.msn.com> wrote in message
news:075401c399c6$eab57240$a101280a@.phx.gbl...
> I am unable to de-install 120 days evaluation version of
> SQL Server from my desktop running Windows XP Home
> edition. While attempting to un-install, I get the
> following message:
> " unInstallShield has detected that 'C:\MSSQL7
> \BINN\sqlmangr.exe' is in use. Please close the
> application using this file and unInstallShield again."
> Please advise.