October 13, 2018 at 9:06 pm
Hi,
We have Stored procedure to create the database using xp_cmpshell , it works fine in SQL Server 2012 but we ran this stored procedure on SQL SERVER 2017 displays following error message.
microsoft odbc driver 13 for sql server : domain\server login failed error. can anyone provide the solutions to reslove this error.
Regards,
Ram
October 14, 2018 at 1:38 pm
Why are you using xp_cmdshell to create a database? What's wrong with the CREATE DATABASE syntax?
Also, without knowing the actual SQL you're running, this is going to be hard to debug.
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
October 14, 2018 at 9:07 pm
we are using seperate sql file for Create Database and running that sql in Stored procedure. Is there any SQL Security login permission Issues?
October 15, 2018 at 1:45 am
sram24_mca - Sunday, October 14, 2018 9:07 PMwe are using seperate sql file for Create Database and running that sql in Stored procedure. Is there any SQL Security login permission Issues?
This still sounds like a bad idea. What would happen, for example, if someone were to change the SQL within the file? If it's parametrised then deploy a Stored Procedure to your server, doin't use xp_cmdshell.
At a guess, your not a sysadmin on your server?
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply