Cannot drop old domain user in SQL Server 2008 R2 - sql

I would like to ask your help to re-sync old AD user (let's say AD\username) with new AD user (AD\username - the same name but different SIDs) in SQL Server 2008 R2.
I looked at the question "SQL Server Windows Login - Same Name Different User (SID)" but in my case the old user owns schema and tables in multiple DBs and cannot DROP the old username.
Can anyone help, please?
Thank you in advance
CI

You can use a few methods:
sp_help_revlogin was created for SQL Server 2005 and is still used quite often. This support article explains it in-depth and shows how to use it.
dbatools.io is an open source community tool suite created in PowerShell by some very generous folks. There are a few blogs showing how to use their scripts, but here is one to handle the logins.
Find other scripts which do the same thing, like this one which is for AGs but still applies.

Related

Appropriate action installing another SQL application at work

hope everyone are okay...
I need to install any Sofware for the use of SQL. I'm just a begginer and started an online course. We have a account at work called Administrator and the only account has acces to SQL Managment studio 2014. Inside there are multiple databases linked to the external objects for stock contol purposes to collect data and view data, database was created by another company not us. Id like to download an SQL Software to run simple queries. But would need to know if it would affect any other databases or servers inside our network?.. just need to set it up for my local use.
Thanks

How to connect to SQL developer using my own database

I'm currently using SQL Developer 4.5.1.21 and want to take some time to learn language, run queries etc etc. I'm using a database that Oracle provides called "HR Schema" that is free for download. Now I know that I need to create a "connection" in order run queries onto this database. I begin running into trouble when I want to create my own connection. Can anybody walk me through the steps of creating a new connection? What I do is click the "+" button and click "new connection".
The major problem you have here is that you need to have an Oracle database instance installed before you can have something to connect to.
You have a couple of options here...
Download and use the free version of Oracle: Oracle Express Edition
You mentioned that you are a student. Check with your professor to see if they offer a more robust edition of Oracle for student use, such as:
a. Oracle Personal Edition
b. Oracle Standard Edition
c. Oracle Enterprise Edition
If you have the available funds, and you intend on persuing a future in database work, you could purchase a license of one of the above mentioned editions.
You can read more about the various editions of Oracle here.
One thing to keep in mind here is that you are wanting to use the sample schemas that Oracle provides, in particular the "HR" schema. Taking a look at the installation documentation over at the Oracle site, I do not see mention of the Express edition of Oracle server on the availability table, but that may not mean that it wont work.
To address the connection portion of your question, once you get your database set up and running, you should be able to connect to it by providing the hostname (localhost for connecting to your local machine), port, and various other information such as username and password. In all, your connection string would likely look like the following:
Host=localhost; SID=MyOracleServer; port=1677; Min Pool Size=1;
Connection Lifetime=600; User ID=EhBabay; Password=secretpassword123;
Or within SQL Developer you should be able to connect to your local instance of the Oracle database fairly easily, without having to create a connection string. The connection string would still be used though, within any applications you write that you want to connect to the database with.
The main thing here, however is that you need to have an instance of an Oracle database installed and running somewhere that you have access to.

Track all logins on to a single SQL Server database

Thanks in advance for any help.
We have a particular database on a SQL Server 2012 box along with about 20 other databases.
What I require is a method/script/audit (open minded about the solution) that will simply track anyone who logs in (successfully / unsuccessful) to this one particular database on the server (the single database is the key as the end user does not want information on any of the other databases that sit on the server), it also has to log time the attempt was made and it must track the logins via SQL Server or the application itself that is attached to the database.
Once we have this information we need to simply store that somehow. I say somehow as the storing part depends on the solutions recommended to me, so I’m open minded about this too.
Any help would be great as I'm scratching my head on this one.
There's actually a tool built into SQL Management Studio for this.
Please see the attached link for Configure Login Auditing
Once it has been setup, all events will be recorded in the error log.

SQL Server 2005 Management Studio Express

I am using xp. I want to learn SQL.
I have SQL Server Management Studio Express.
I dont know how it works but when I open it ,it says couldn't connect to server.
It asks for server name and instance name, I don't have any idea where to find server name and instance name.
Also looked for solutions related to server name and instance name but dont find SQL manager. Please tell me how to practice SQL?
I am Learning for the first time.Please help me.
Hope these videos will help you to make first steps in studiyng SQL Server.
If you want to study just SQL (not specially SQL Server), you may like lessons on w3schools

Limit Database Items To Which I Don't Have Access

I created a few databases within a large hosting provider network. When I use Microsoft SQL Server Management Studio 2008 R2 to connect to the SQL instance I see a list of every SQL database on the server. Is there a way I can tell Management Studio to only display the tables I have access to?
I found a few articles online that said to deny my user the permission to view the other databases. That wouldn't be an issue, except I don't think I can do that from my end. I'd like to solve my problem without having to call my hosting provider. Regards.
Unfortunately what you are asking is NOT possible at this time. I know this is NOT what you are looking for :-)