Hi I am in need of help please as I am not familiar with the folder permissions stuff. Everyone has access to a particular folder where the files are held. Q1. The folder permissons have 'EVERYONE' set to tick on everything Full control Modify Read & Execute List Folder contents Read There is also [company name]/Administrators - they have the same settings as above. There is another group for everyone [CompanyName]/[CompanyName] How can we prevent access to this folder for everyone? The problem is in the VB.Net application, there are some forms that creates a file in that folder and 'everyone' who logs into this application are allowed to generate a file that is written to this folder BUT we don't want them having access to the folder to see all the files. The software (VB.Net) actually generates files by a logged in user but they shouldn't be able to access the folder when they go to the My Computer->Network->Folder. We need to make sure it is creating the files and can view documents within the software only. What can be done on the folder for Q1? Would appreciate the help
Seuss
Posts
-
Folder Permissions - Urgent Help Please -
SQL Server 2012 Agent Job & stored procedure issue URGENTI have created a step 1 in the SQL Agent Job: DECLARE @LastDayOfYear Date, @GetHour INT , @NextNewDate DateTime SET @LastDayOfYear = DATEADD(yy, DATEDIFF(yy,0,GETDATE()) + 1, -1) SET @GetHour = datepart(hour, GETDATE()) -- returns hour --Get Today date to compare to the last day of December in current year IF (FORMAT(GETDATE(), 'yyyy-MM-dd') = FORMAT('2014-05-28', 'yyyy-MM-dd')) AND (@GetHour >=15) BEGIN SELECT 2 END ELSE EXEC msdb.dbo.sp_stop_job @job_name='Testjob' Then created step 2 to call the stored procedure I have created I then created a scheduler to test it out with today date starting from 11am and every 5 mins with recurring mode. For some reason, it nevers call the stored proc which should have from step 1 to step 2 Any ideas please?
-
SQL Server 2012 Agent Job & stored procedure issue URGENTReally tricky - you are right about the leap year as well. Still googing to find out how a job can be done every 2 years. Whether implementating a job step with some code to check the dates? I can't find an example on google yet.
-
SQL Server 2012 Agent Job & stored procedure issue URGENTAh I think I understand what you are saying, have the SQL Job Agent set up and each month - when it calls the stored procedure - if the dates don't match up - it needs to exit out of the SQL Job Agent? I have also been googling and there were some examples where you could implement a job step code to do it? Not sure if this is feasible or a good idea? Huge thanks to you for your patience. I know I am a bit persistent on this matter :-)
-
SQL Server 2012 Agent Job & stored procedure issue URGENTHi Again "so run the job every month, if it does not meet your criteria then let it wait for next month." Would it mean I have to somehow implement a code within the Job Step List in the SQL Agent Job? Many Thanks
-
SQL Server 2012 Agent Job & stored procedure issue URGENTDoes this look efficient and OK? DECLARE @LastDayOfYear Date, @GetHour INT , @NextNewDate DateTime SET @LastDayOfYear = DATEADD(yy, DATEDIFF(yy,0,GETDATE()) + 1, -1) SET @GetHour = datepart(hour, GETDATE()) -- returns hour --Get Today date to compare to the last day of December in current year IF (FORMAT(GETDATE(), 'yyyy-MM-dd') = FORMAT(@LastDayOfYear, 'yyyy-MM-dd')) AND @GetHour >= 20 BEGIN --If Equal - then increase the next 2 years SET @NextNewDate = FORMAT(DATEADD(YEAR, 2, @LastDayOfYear), 'yyyy-MM-dd HH:mm:ss') END ELSE SET @NextNewDate = FORMAT(@LastDayOfYear, 'yyyy-MM-dd HH:mm:ss') PRINT @NextNewDate WHILE (CONVERT(DATE,@currDate, 101) <= @NextNewDate) BEGIN Second Issue - "so run the job every month, if it does not meet your criteria then let it wait for next month." How do you make it meet your criteria i.e. if it falls on 31st December of each year?
-
SQL Server 2012 Agent Job & stored procedure issue URGENTCould you kindly explain please, I am not sure about the mod with year component? I am rather saying I don't quite understand please. I still don't know how to get the second issue to call the stored procs every two years as SQL Agent Job doesn't seem to offer the solution.
-
SQL Server 2012 Agent Job & stored procedure issue URGENTHi all, I am in desperate need of help please. I have created a stored procedure with a while loop using a hard coded date 31-12-2014 to compare against current date produced in a while loop. I need to make the hard coded date reflect every two years i.e. 31-12-2016, 31-12-2018 etc. How can the date be automatic instead of hard coded please? i.e While (currdate <= '31-12-2014') Second issue, how do I make the stored procedure to run every two years as well? SQL Agent Job doesn't have a yearly frequency at all. Can someone please offer an example coding and suggestions to those two issues which I will be grateful please. :confused: Thank You!