Wacky SQL Server requirement

Get help on databases - MySQL, Oracle, Access, etc.
Post Reply
RuadRauFlessa
Registered User
Posts: 20576
Joined: 19 Sep 2003, 02:00
Location: Bloodbank

Wacky SQL Server requirement

Post by RuadRauFlessa »

Hi ppls... so I sit with this wonderful system I have to do some stuff on... but... and it is a big but... all updates to any data is only allowed o be made through their own scripting language. Now the good news is that this scripting language of theirs can take SQL queries and execute them. Now the bad news... It will only run said query if it starts with a SELECT. Some good news... it does also allow update... even more bad news... the piece of ******* checks the query and if you try to update certain relations, what they call tables, it throws you a finger.

Solution I was looking at was to create a Scalar valued function to do the work... buuuut... more bad news... You can not run any statement within a function that updates a data storage area that is not declared within the function... otherwise stated... you can only read now write. So second thought naturally goes to stored procedures... good idea as you can run all your update and/or inserts and such... but again with the bad news... I can't for the life of me find a way to call on a stored procedure from a select statement....

Oh yeah... almost forgot to mention... I already set up a linked server to the localhost and tested out the use of OPENQUERY([LINK SERVER], 'SQL COMMAND') but to no avail. The command works if I run it directly on the server but if I run it through the link it returns with what I would expect but without any of the updates to the data made.

Anyone got any ideas it would be brilliant.
:rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock:
Spoiler (show)
Intel Core i7-2600k @ 3.4GHz
Corsair Vengence 2x4GB DDR3 2000MHz
Thermaltake Toughpower 850W
ASUS nVidia GTX560 1GB
CoolerMaster HAF 932
User avatar
hamin_aus
Forum Moderator
Posts: 18363
Joined: 28 Aug 2003, 02:00
Processor: Intel i7 3770K
Motherboard: GA-Z77X-UP4 TH
Graphics card: Galax GTX1080
Memory: 32GB G.Skill Ripjaws
Location: Where beer does flow and men chunder
Contact:

Re: Wacky SQL Server requirement

Post by hamin_aus »

Can you not run SQL through management studio?
If you have sysadmin rights in SQL find out how they do this and remove those restrictions..
It's most likely some funky implementation of Policy-based management if it's SQL Server 2008.

Who decided this rubbish was a good idea to use?
Image
RuadRauFlessa
Registered User
Posts: 20576
Joined: 19 Sep 2003, 02:00
Location: Bloodbank

Re: Wacky SQL Server requirement

Post by RuadRauFlessa »

Nothing to do with SQL Server itself. As said I can do everything I want to in SQL Server but the framework we have to work in sux.... I won't mention what.
:rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock:
Spoiler (show)
Intel Core i7-2600k @ 3.4GHz
Corsair Vengence 2x4GB DDR3 2000MHz
Thermaltake Toughpower 850W
ASUS nVidia GTX560 1GB
CoolerMaster HAF 932
Post Reply