Uninstall AD role from windows server 2008 - windows-server-2008

I am trying to uinstall AD from windows 2008 and following the link provided http://www.rebeladmin.com/2016/10/step-step-guide-migrate-active-directory-fsmo-roles-windows-server-2012-r2-windows-server-2016/
Trying to run the following command
Uninstall-ADDSDomainController -DemoteOperationMasterRole -RemoveApplicationPartition
If you go down the part of uninstalling AD role, I get commands not found in powershell. I have searched and says that windows server 2008 doesn't support this, but windows server 2008 R2 does.
What would be the similar actions needed to accomplish the task? I do run dcpromo and demote?

Also try removing the roles from Server Manager. Another option is to remove from network, then perform metadata cleanup to remove it from active directory.
Clean up Active Directory Domain Controller server metadata

Related

Creating setup in vb.net with sql server

Is there any possible way to create a setup in for my program written in vb.net using sql server as the backend.I have a module which creates the database code and i have also created a setup in vb.net for my project but i want this setup to run properly even in a system which doesnt have visual studio and sql server installed.I tried running it on a system which doesnt have both but the error i get is sql server 2005 doesn't allow remote connections in default settings,i tried changing some settings but nothing seems to work.Is it necessary for a server to be there for creating the database?
a little Google always does the trick...
To configure SQL Server 2005 to allow remote connections, you must complete these steps:
1.) Enable remote connections on the instance of SQL Server that you want to connect to from a remote computer.
2.)Turn on the SQL Server Browser service.
3.) Configure the firewall to allow network traffic that is related to SQL Server and to the SQL Server Browser service.
How To Configure Sql 2005 to allow Remote Connections
When I write programs that require SQL Server to be installed on the client, I use the following logic :
Determine if SQL Server is installed on the client machine
If it is not installed, I prompt the user to download it (or download it for them using your installer script. I use NSIS installer). Make sure to install the appropriate version for the user based on your requirements (and the client's operating system). I typically use SQL Sever 2008 R2 Express Edition, SP1.
I then execute the SQL installer using my installer script command. In NSIS, it's ExecWait. In VB.Net you have something like this. You'll have to install it via command line parameters. Here are the list of command line parameters: http://msdn.microsoft.com/en-us/library/ms144259(v=sql.100).aspx
Here's what I use:
C:\PathToMySQLDownload\SQLEXPR.exe /QUIETSIMPLE /SkipRules=RebootRequiredCheck
/ACTION=install /IACCEPTSQLSERVERLICENSETERMS=1 /FEATURES=SQL
/INSTANCENAME=MSSQLSERVER /SECURITYMODE=SQL /SAPWD=MySAPassword /NPENABLED=1
/TCPENABLED=1 /SQLSVCACCOUNT="NETWORK SERVICE" /SQLSYSADMINACCOUNTS="NETWORK SERVICE"
/AGTSVCACCOUNT="NETWORK SERVICE" /ASSVCACCOUNT="NETWORK SERVICE"
/RSSVCACCOUNT="NETWORK SERVICE" /ISSVCAccount="NETWORK SERVICE"
/ASSYSADMINACCOUNTS="NETWORK SERVICE
You can include SQL Server Express in the Pre-requisites for your setup project.
When you build the setup project, it will pick up the packages that are required for the installation from C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages
You can then amend the package.xml file for SQL Express to change how it is configured by the installation. Look for the Command Arguments element, and then to switch on Mixed mode authentication add SECURITYMODE=SQL
to enable remote access add DISABLENETWORKPROTOCOLS=0
(or for SQL 2008 r2 it's /tcpenabled=1 )
When the end user runs the isntallation, SQL Express will be installed first, with the options you have specified.

Listing Windows Server 2008 Enterprise local User Accounts without logging in

I have a Windows Server 2008 Enterprise installation on a server and I cannot remember the local user-accounts or passwords, so I'm unable to log in to the server. (This server was not been used for a while). Is there anyway that I can list the local user-account names without logging in?
You could use tools like ERD Commander, however I'm not sure whether it works with W2K8

Can't log into SQL server after changing computer name

I installed Windows Server 2008 and SQL Server 2008 R2, after joining to domain I changed computer name and mistakenly I deleted the administrators group from SQL Server login users and now I am not able to login.
Any suggestion?
I know this is old but I just used the Gui instead.
Step 1. Start SSMS
Step 2. Select the server name drop down and click browse more.
step 3. select local or network tab based where the server is and expand Database engine and select the correct computer name\sql server
Follow the steps in this article: http://v-consult.be/2011/05/26/recover-sa-password-microsoft-sql-server-2008-r2/
Basically you have to modify the SQL Server Service settings so that it starts in admin mode. This will only allow one connection to it. Once you start it up you can create a new sysadmin user that you can use from then on.
Also I do know that you need to run certain scripts on a SQL Server if you change the hostname of the server. You should find them if you google them.
If you have mixed mode authentication enabled on the SQL Server instance, you can login using the sa account, with the password that you specified during installation.
If you have only Windows authentication enabled, I'm not sure. You could try running setup again and seeing if it will let you change the authentication mode, but somehow I doubt that it will let you do anything without first connecting to the instance with your Windows identity.
As a last resort, you could try uninstalling and re-installing the SQL Server instance, then re-attaching all your databases.
Add the new name of the computer and you should be able to login again..

sql server agent start disabled (grayed out)

I've just built a new dev machine and I can't get SQL Server Agent working. What I've done so far:
Install VS 2010 (I think this installed an express version of SQL Server)
Install SQL Server 2008 R2 Developer edition.
I'm not sure if I did something wrong in step 2. All I want is a fully working version of SQL Server with SQL Server Agent running and no limitation on the amount of data I can store (I will need more than 10GB).
Currently, in SSMS I have the following instance: ./SQLEXPRESS. I thought that during step 2, this would have been upgraded, but it doesn't seem so.
Can anyone help?
Note: I ended up resolving this by uninstalling everything that had "SQL Server" in it in Control Panel > Programs and Features. I then reinstalled from scratch.
Note: I ended up resolving this by uninstalling everything that had "SQL Server" in it in Control Panel > Programs and Features. I then reinstalled from scratch.
The agent account is disabled. If you aren't able to enable it through configuration manager, try enabling it through services. After its enabled, try starting the serivce. If you still have issues starting the agent, try changing the account the service is running under. There may also be an issue with the account that the SQL Server service is running under. Trying changing the SQL Server service account and restarting it. The agent should then start up successfully.
You have two installations, with two named instances. The Express named SQLEXPRESS and the developer edition named MSSQLSERVER (unless you changed this during install). connect to .\MSSQLSERVER and see, it should be there available to be started.
SQL Server Express does not ship with the SQL Server Agent.

SQL Server 2008 R2 First Time Login

I've just started work on a new computer in which I had to download all the software fresh.
I've just download a copy of SQL Server 2008 R2, and I'm trying to connect to SQL Server Management Studio without success. I vaguely remember last time I installed this, it asked me to choose between windows, or sql server authentication, however this didn't happen for this installation.
If I try to login via Windows Authentication (where the username and password fields are greyed out, localhost as server name) it gives the following error:
"A Network-related or instance
specific error occured while
establishing a connection to SQL
Server. The server was not found or
was not accessible. Verify that the
instance name is correct and that SQL
Server is configured to allow remote
connections. (provider: Named Pipes
Provider, error: 40 - Could not open a
connection to SQL Server) (Microsoft
SQL Server, Error: 2)"
I have checked everything in SQL Server Configuration Manager, and everything bar VIA is enabled.
If I try SQL Server Authentication, It asks me for a username and password which I definiately have not set yet. Also, under SQL Server Services in configuration manager, there is nothing there.
Any help would be appreciated :)
Thanks
PS: I don't know if it's worth mentioning but I am running Windows 7 as a virtual machine on a Mac.
Are you sure you have the correct instance name? If it was SQL Server 2008 R2 Express Edition then the default instance name is .\SQLEXPRESS.
Also if your using sql authentication to connect try running sql management studio as admin, if you are a limited user your identity might not be mapped to an account in sql server yet but i believe the Administrators user group is.
You need to check if your services are running.
Please type
net start mssqlserver
in your command prompt. Then try to login.
Ended up reinstalling completely and doing a fresh install from a fresh download. When I did this I was brought through the steps of selecting the default instance, and selecting authentication modes.
Working fine now :)
After checking tons of sites looking for an answer to this question, I think I have a simple solution.
Open the sql Server Configuration
Click on the sql server services node
Right Click on Sql server
Click Start.
I have been screwing around with this forever, and this simple method actually worked.