Change Proxy Names for Existing Jobs Using TSQL - sql-server

I have over 50 jobs in my SQL Server and most of them are using Proxy accounts. I want TSQL query that goes through every job and change the old proxy account to the new proxy account.
For example, my old proxy account is JJ_OldProxy and after the script runs I want to see JJ_NewProxy
There are multiple proxies in there but I am targeting to change only one specific proxy (JJ_OldProxy) and I know the proxy id.
I had googled and tried to find out a solution but all what I found out is updating existing proxy but I need script that can go through every job and change specific proxy account into new one.

Related

SQL Server Deployed SSIS package won't open files despite SA account having access to folder

I posted a similar question before, but I have now came back to the point where I need to deal with this and after some tuning I have managed to get rid of all the errors, except one warning that basically tells me that the path provided to the package not finding any files in the directory (which is false). This almost makes me want to believe this is again a permissions issue. As when I run the package locally it all works fine. Here is the warning:
Same message appears when I right click SSIS package under the catalogue and directly try to execute the job.
I made sure that the caller has full permissions to the folder in question
SQL Server Agent Job calls the job like so
With a single step in it to execute the SSIS package from the catalogue:
The history of the executions is all successful and the history of SQL Agent job is all green
One of the suggestions I got was to open SQL Server Configuration manager but I don't appear to have access to that. I am new to this whole process so I am not sure if authentication has something to do with it or the sa account's permissions.
Note: I am working on this on a remote dev server and not directly on my pc.
Any help would be greatly appreciated.
Since you're running the package as the Agent Service Account:
The permissions need to be applied to the SQL Server Agent Service Account or its per-service SID.
You can see the service account with PowerShell like this:
PS C:\Users\david> (Get-WmiObject win32_service | where Name -eq "SQLSERVERAGENT").StartName
NT Service\SQLSERVERAGENT
Turns out the database instance was on a whole different server that I wasn't even given access to. That server obviously didn't have the path specified in the SSIS package, so what I had to do is create a folder for files in the correct server, reroute my files there, and change the SSIS package path after obtaining the access to the server where DB instance lives. Me being new to all this, it was absolute frustration especially since our team is small and I am new in it I can't just ask someone questions about this all the time. Hopefully this will save someone a lot of time.

My Proxy account for running SSIS job was working fine but now i am unable to edit or add new jobs using it

I am using a proxy account for running the SSIS jobs. I have few other jobs using same proxy account and are referring to a config file in shared folder location, which are working fine. But it isn’t allowing me to do that when I create any new job or edit an existing one.
Can someone help me with this?

Change system user for a domain in Plesk

I have a server with Plesk installed, running a couple of webs.
One of them, the-subdomain.com, started as a subdomain of another one, the-domain.com. They were created using the same system user and it was hosted in a subdirectory of httpdocs (httpdocs/the-subdomain).
Now I want to change the-subdomain.com to its own system account, but Plesk does not have the option to do it.
Is there an easy way to do this?
This is how I did:
Firs, I created another subscription (the-subdomain2.com), as Oleg said
Then, I copied all data to new subscription
After that, I tested all was working fine touching my local hosts file
Then, I deleted the old subscription
The last step was to rename the-subdomain2.com to the-subdomain.com
Unrelated to this, while playing with susbscriptions, I created a system user which then I needed to delete. Plesk hasn't the option to delete the user, so I deleted the account on the machine (userdel -r THE_USER_TO_DELETE) and then on the Plesk database (use psa; delete from sys_users where login='THE_USER_TO_DELETE';)

Creating an autoupdate for my program and its database

I've already an offline updater as a download but I want to make it automatically. It's a client/server software and a ms sql database.
3 parts have to be updated:
update of a proprietary software (setup.exe with next, next, type login/password for server service, finish) which delivers a WinClient and a Service for the server. Autoupdate is only needed for server, the autoupdate for clients by the server works already.
one .hug file which contains new customized program version. The path is a directory in the above software and can be determined with registry.
MS SQL database update with new content (in a .bak file) and structural changes. The database server is sometimes another server as application server. At the moment you have to type in the SQL instance when running the udpater.
My ideas are these:
a updater program in the tray on application server and database server
updater searches with a timer for newer versions on my ftp server and downloads the files if existing
on application server it runs the setup.exe and copies the .hug file. Maybe I could make it silent with command prompt commands. But still need to fill in login/password for the service user.
on database server I configure the autoupdater once with instance name. Updater downloads .bak-file and runs sql script with insert, update and alter statements.
but one big problem which can cause problems is when users are still logged in. Don't know in the moment how I could solve that.
So, how would you realise such a project? Or have you already done something similiar? Is its generally possible?

How to remove url reservation in SSRS

During a recovery process I have uninstalled and re-installed Sql Server 2008 R2 a couple of times with different instance names. I have recovered the database and want to configure the report server the way it was before.
My problem occurs in Reporting Services Configuration Manager when I try to apply defaults for the web service url. I get this error:
Reserving url http: //+:80 The Url has already been reserved.
How do I un-reserve the url so that it can be applied to the new installation?
Make sure your current binding isn't from IIS or another webserver process, as deleting it could cause... badness
Ensure your old SSRS instance is completely uninstalled (as the uninstallation process should free these bindings). Next, fire up a command prompt window in admin mode (must be in admin to delete), and do:
Check your existing reserved URLS:
netsh http show urlacl
Delete the URLs you don't want, using the exact same values shown on the "Reserved URL" line from the "show" command:
netsh http delete urlacl URL=http://+:80
You might consider binding your next install to a more specific URL, as the current wildcard binding will take all web (port 80) traffic coming to the server.

Resources