Well I don't want to look through months of sql or event logs because I have no idea when the problem started and have no way of narrowing it down, something I am sure you said would be a slow and laborious task unless I knew what specific terms to search for in these logs?
Do you know what terms I should be looking for to find when the "generate scripts as" feature stopped working?
If there is a way to scan the logs for certain events that relate to this feaure stopping then thats different but I'm not scanning months of SQL and Event logs not knowing what to look for when I can easily live without this feature.
I did not set up an instance specifically, I just installed SQL server express on my laptop and then restored the DB. It was working with the same Server name up until a point in time I am not aware of. It was only when I posted my problem about a Dutching algorithm and wanted to provide the DDL so people could replicate the problem that I noticed the error. When it stopped working I have no idea.
If you know what server name I should be dropping and the name of the server to add please let me know.
I am not buying SQL developer editon or a production version to run on my laptop. The whole point of me using Express is our production DB cannot work on a French hosting server so I am migrating it to my local laptop to use a Windows Service and SQL Express locally instead and the service won'tbe running 24 hours a day as it used to as it needed to run multiple websites as well as my Betting BOT, I am just trying to get my Betting BOT working again locally.
I will read those links when I can and if they solve the issue it meams I don't have to scan the logs which is good.
The Windows Service does already write to a custom event log so I can see any errors related to my service and if an error occurs that stops the service from running it is logged as an error so I can fix it whilst informational messages log when the service starts or stops or is paused or when timer initiated jobs fail.
As for RegEx I said they are all cases that were ran from Ms Agent jobs previously so no front end code is involved and they are all replacing code where multiple LIKE/PATINDEX function calls were being used.
If I could change the code to be front end code I would but its not that easy without a big rewrite and I just want to get the existing system up and running first before changing anything as I know it works as long as I can replace the use of MS AGENT with tiner initiated jobs.
For example I have a backend process to flag important races that day to be imported into a temp table for certain bets. It used to pass a racename into a function that flagged it as important by doing @racename LIKE '% grade[1-3]%' OR LIKE '% group[1-3]%' OR LIKE '% listed %' etc etc.
Replaced by SqlRegExMatch(@racename, '.+?(grade|group|listed|classic|prix du).*$')=1
Because the data for races I have scraped has changed formats over the years many times and sources have changed as well as well as the format of racenames. I just save the racename from the data source and a batch job flags any events that are "quality" races e.g group/grade/listed/classics (French, German or English) so that certain systems can use them.
In theory I could pass another parameter into the system when a racename is a classic but that doesn't help with analysing previous classic races where the data is already in the database but I still need to know if a race 10years old in a different format was a classic for KPIs and reporting as well as building up ROI on all previous classic races I have and so on, all backend jobs.
New races could have flags passed in but the historical data has been scrapped from multiple sources and getting the racename was key, finding out the type of race depending on a computer generated system comes once the races are in the system and for historical stats it needs to flag old races. The same flag from the front end could be used and stored so this process isn't repeated daily I know but this is just an example off the top off my head and I am sure without knowing the system you could think of imaginary solutions such as running a one off cursor to set a flag to update an important type of race in the DB for historicals and then use front end code to handle new races but that is leaving out a lot of logic I can't explain without scanning the code which I am not near at the moment.
Races are not just classics due to grade/group/listed but also racenames with certain words in e.g .*\b(King|Prince|Queen)\b(James|of Wales's|Anne|Mother)\b(stakes|chase).*$
You can inagine the LIKEs I had in the where clause and this is just a basic example for demonstration purposes. I have the "class" stored and that is group1 to 3 grade1 to 3, listed, classic etc. This is saved on input but the "important Races" backend job that fills the table up that is then looped through each day to set the flag is a backend job. It is a lot easier to change the regular expression in the backend UDF than the code as it handles historical and new events, which also often change formats as well as well as foreign classics where the racename is saved.
It is a bad example but the only one I can think of without searching the code for uses of SqlRegEx which I have said were minimal. So are you saying behind the scenes multiple LIKE/PATINDEX functions do not use any C++ regular expressions hidden by TSQL functions or do they use procedural loop string parsing instead? Which surely must be slowler the more LIKE/PATINDEX functions you use?
Anyway thanks for your replies I will check the links out tomorrow if I am feeling better. Think I am coming down with the Coronavirus so I haven't been well enough to code latley. It's hard enough just to breathe.
However I appreciate your comments.