Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I have a .sql job that I want to run once every day between 2PM to 5PM. How can I schedule this?
1.Expand the SQL Server Agent node and right click the Jobs node in SQL Server Agent and select 'New Job'
2.In the 'New Job' window enter the name of the job and a description on the 'General' tab.
3.Select 'Steps' on the left hand side of the window and click 'New' at the bottom.
4.In the 'Steps' window enter a step name and select the database you want the query to run against.
5.Paste in the T-SQL command you want to run into the Command window and click 'OK'.
6.Click on the 'Schedule' menu on the left of the New Job window and enter the schedule information (e.g. daily and a time).
7.Click 'OK' - and that should be it.
Use the SQL server agent.
This is a service that comes with SQL server, and can be configured via enterprise management studio to execute SQL jobs at preconfigured times
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I have free Oracle Cloud always free instance. I was not able to connect to it by ssh and it looks like it was stopped.
I cannot re-run it. I get:
Unable to start instance: Instance ocid1.instance.oc1.eu-frankfurt-1.antheljscauatxycmb7qvp36l6jmfffvhfjqspjo6zz3xzbjletwexs7fvsa is disabled and will not accept any action requests. Please contact customer support to reenable.
Customer support doesn't work. Any idea what to do and why it was stopped ?
Is that an ampere A1 flex instance that was stopped? are you within the initial 30 days free trail or it got expired?
I discovered the same issue today with my always-free VM. This Redit post from a few months back is really helpful.
The solution is to create a backup of the boot volume, then terminate the stopped VM instance without deleting the associated boot volume, and finally create a new instance matching the specs of the original VM using the "Create Instance" option from the boot volume page.
The Redit post provides a nice, clear set of instructions. Worked perfectly for me.
As to the reason for Oracle disabling the instance in the first place, #Anupam's answer is very helpful, though I'm not sure where this info came from. I certainly didn't get a heads-up email like the one sent out when Oracle indicated they were going to pause my transaction database.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Is there any tool to monitor the Data in SQL Server in case it has been changed manually not through the system.
I want to check if our DB Administrator edited any record manually or not
You can do this in many ways, but one feature should actually be set up, either on MSSQL Server or mysql server. In the first case, you should switch auditing for specific database. In case you didn't do it before, you can dog the transaction logs:
https://solutioncenter.apexsql.com/read-a-sql-server-transaction-log/
But it's time consuming and can bring no conclusive results.
For MySQL there is a plug-in using audit api, delivered by mysql from version 5.5.3. There are number of plug-ins developed, Oracle delivers one with their enterprise solution, percona delivers one, I believe there are others as well.
In this case also, you can dig the bin logs, analyze sql query log (if set up), slow query log (if set up). But again - it is time consuming and actually you may not be able to definitely find 100% proof.
Only auditing can deliver hard evidence but it must be set up before, not after.
But you must also know, that if you db admin knows passwords of application users, and he can log in to application servers, then he can log to database using that app user, do the changes, and there will be pretty much no way to say it wasn't an app that changed the record (unless there are app roles set up in the database, which can be used only by application).
You Can create Triggers
Triggers will be fired when a record is inserted, deleted or updated and msdb.dbo.sp_send_dbmail should be used to send an email alert to a specified email recipient, immediately:
CREATE TRIGGER t_Pers
ON Person.Person
AFTER INSERT, UPDATE, DELETE
AS
EXEC msdb.dbo.sp_send_dbmail
#profile_name = 'ApexSQLProfile',
#recipients = 'marko.radakovic#apexsql.com' ,
#body = 'Data in AdventureWorks2012 is changed',
#subject = 'Your records have been changed'
GO
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Is there any way I can write back to the database in the report?
I know that I can use the parameters at the top to pass a value and insert the data into the database with sql.
I'd like to have an editable field in my report with an initial value and the possibility to save the changes to the database.
Any chance to do this with SSRS?
Maybe some kind of add-on?
If not, is there an free alternative reporting engine that can do the job?
I know Infor BI can be used for such tasks, but the licenses are expensive, especially if this is the only benefit.
You cannot have an editable field on a report for any reason (doesn't exist). Like others have alluded to, you can use parameters to insert values back into the database, or have a button image that reloads the page with a new hidden parameter value that then gets inserted into a database.
You will need a different application/technology to achieve what you are looking for.
Yes there is, when do you a dataset you can set it to be retrieved from a query.
for some reason the image is not showingm basically when you configure your dataset in dataset properties, go the query menu on the left, select a datasource, and on the query type choose text and from there you can put any sql you want : for example :
Make sure your user has write permission on the database
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Is there some ready off the shelf solution that would periodically connect to MySQL server, check for crashed tables and automatically initiate repair and/or send administrator an email?
MySQL has come up with a MySQL Enterprise Monitor web applciation tool that helps you to monitor the MySQL Servers. It can also be used to send an alert the administrators of errors.
I resorted to writing a simple Scheduled task that runs myisamchk periodically
It is not ready off the shelf, but very easy solution - every table crash is written to MySQL error log (usually .err in data directory. You can create very simple script that is awaken every X minutes and checks this log file (using tail -XXX command for example) for entries with 'marked as crashed'. Then it can alert in any way.
Is it crash a lot? if it is crashing a lot , I think you have to find the reason for why it is crashing. May be there is a hardware problem or another problems.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I got an error with my Msaccess DB.
multiple users are using this DB's frontend. I do not know why I am getting this error message as follows
Error 3218 Could not update; currently locked
can someone help me please......
Get everybody out of their mdb files. Someone might be trying to update the same record. It might even be you, in another instance active on your PC.
The elephant in the room here is that multiple users are using the same front end. This is generally the first step down the road of access pain that often leads to access getting tarred with the “Access is not fit for more than 5 users” brush.
First thing is to get every user to have their own copy of the front end on their local drive. You can use the excellent access auto FE updater to make rolling out a new version easy
www.autofeupdater.com
This is weird. I got this error message because there was no enough space in the Shared drive, I just removed 1GB of some unneccessary files from the shared drive and the application works fine now.
But, took some time to figure it out.