What's going on, guys?
It is Bernardo and today is all about migrating your WSUS
database to another SQL, so let's get right into that.
All right, so I am finally going to migrate my WSUS
database to another server and the reason why is because I suppose to.
I mean, any admins suppose to log into their configuration manager
or the endpoint configuration manager and then go inside the monitor tab,
go inside system status, site status,
and then make sure that everything is green here.
I haven't done that for a long time.
And when I finally did, I noticed that my software update
point was critical.
I know, right?
So what I did was I right click on it, I went to show messages,
I clicked on error, I skipped this
and I started looking into the logs.
When I was looking into the logs, everything pointed to my WSUS database,
okay.
And I recently made a huge change.
A while back, I made a huge change and that was me migrating my database
into another server and I shut down all the services locally,
but I forgot that my WSUS database was also running
locally within my Endpoint Configuration Manager server.
So that was a problem.
So basic troubleshooting,
I opened up my update services and I saw that I got this.
I did reset the server node.
I kept on doing that and nothing happened.
I went into services, I started the services, nothing.
I then launched
the server management studio and I was trying to login into the SQL server.
I clicked on Connect and I got this.
I went inside services and I noticed that the SQL server service,
as well as the SQL Server Agent service was down.
So I basically just manually
started them, both of them once both of them were up and running,
I went back inside my management studio and I connected.
I was able to connect and I was able to go inside databases
and there goes my WSUS database. Yes.
All right.
So the next thing that I did was I went back inside the update services
console, I restarted it and it launched with no problem.
This is a good thing, right?
But it's time for us to migrate it over
to my new SQL Server
and my SQL Server, this is my BJ-SQL.
This is where I actually migrated my endpoint manager database here.
I want to migrate that WSUS database into this server.
So this is how you do it.
Within my SCCM server, I clicked on the start button, I
right clicked on the Windows PowerShell and I ran it as an administrator.
The first command that I did on this machine was
I wanted to stop the IIS admin services.
I hit enter here and all the services were stopped.
The next command that I ran was to stop the WSUS service
hit enter and you're done.
Now, don't get me wrong, you are able to open up services
and locate those two services and just right click and just stop them.
But I did a little PowerShell, you know, why not?
Now, the next thing that we did is within the, my SCCM server
and within management studio,
it is time for us to detach that WSUS database.
We're going to right click on our WSUS database, click on tasks,
we're going to locate detach and then click on it.
You're going to get this now on the Drop Connection column.
We're going to give it a check mark and then click okay.
It's going to start executing and once it's
done, it's going to disappear, so don't freak out.
It's just detached. It's gone for now.
Now locate that database file as well as the log file.
It is located within this path.
I actually dropped it on the D drive by default It is located on the C Drive,
program files, Microsoft SQL server,
MSSQ12.MSSQL Server,
MSSQL and the data folder.
It's a long path, but typically it's in there
and those two files, I am going to highlight them.
All right.
Because those two files, we need to move them over into our new server.
I open up file Explorer and I navigated into my SQL Server
remotely and I went into this path.
Now, on my local server, I'm going to right click on those two files
on the database and the log file, and I'm going to copy
and go back into your server that you want
to drop these files into right click on it and then click on Paste.
It's going to start pasting those two files and then we're done.
So we're going to head back into our SQL Server.
Now, within your SQL server, we're going to highlight databases.
We are going to right click on it and we're going to click on attach,
within the attach window, we're going to click on ADD,
and it's going to directly take you to the data folder, which is a good thing.
You're going to see your WSUS database, so select it, click okay.
And done, it's going to automatically pre
populate the log file for you and you should be good to go.
Just click okay.
And then you're going to see your WSUS database attach
within your new SQL server.
Your database is attached.
There it goes, your probably saying to yourself
that you're done, but you're not really done.
So we're going to head back inside the SCCM server, right.
Within my SCCM server, I'm going to right click on the Start menu and then click
on Run and I'm going to type in Reg edit and then click Okay.
Within the registry, we need to make some modifications
because by default the SQL Server name
key is still stating local host.
We need to change that.
Remember we moved it somewhere else.
So within the H key local machine, we're going to go
to software, within software, we're going to go to Microsoft.
Within Microsoft, go to update services, then
click on server and then click on set up.
And then within the setup folder, you're going to locate the SQL Server name key.
By default, it is configured to local hosts
when not locally hosting our database anymore.
We moved it somewhere, so let's double click on it.
And the value data now is going to be the full quantified
domain name of your new SQL Server.
For me, this is it, so click Okay.
The next thing that we need to do is go back inside Windows PowerShell
and I'm doing the Windows PowerShell within my SCCM, right.
Because we need to restart those two services that we initially,
you know, stopped at the very beginning.
So we're going to start the services of IIS admin hit Enter
and the next command is we're going to start the WSUS service hit enter.
Now you're done now to confirm that everything is working.
Click on Start,
go all the way to the bottom and locate the Windows Administrative tool folder
and then locate your Windows Server Update Services application and click on it.
And this should start.
If it doesn't start and you get the whole server reset node,
I kind of advise you
to restart the entire server, but this is a good sign and that's it.
Hopefully guys enjoy this video and I catch you guys on the next one peace out.