I've inherited a web app, the local testing version has the following parameter on the end of its connection string:
;Database=ServiceDelivery;LastUser=sa
Can someone explain to me what "LastUser=sa" means? I know the sa account, but have never come across LastUser before.
Googling it hasn't produced any results.
It looks like it's not used any more:
http://www.installaware.com/forum/viewtopic.php?f=2&t=8597
Related
I have a Python package that I am able to run successfully on an Azure Data Science Virtual Machine. However, when I push it to Azure as a Function, I cannot successfully make a database connection. I was getting an error that the ODBC Driver 13 for SQL Server was not supported, so I changed the driver to ODBC Driver 17 for SQL Server and now I am NOT getting an error, but no data is being returned for a query that I know should return data.
Is there any other reason that data would not be returned? Firewall issues? do I need to add a binding? Do I need to separate out the connection string to feed each part (e.g., Driver, UID, PWD) into pyodbc.connect() separately? Right now I am feeding it in like this:
setting = os.environ("CONNECTIONSTRING")
conn = pyodbc.connect(setting)
This query works fine returning data when I run it on the VM using this code, just not as a Function.
(Note, this is different from my previous post regarding reading the Azure App Setting. That problem has been solved).
There are many parts where this could be breaking.
I'd suggest start by having a Profiler or Extended Events trace on your SQL Server to verify whether a connection is even being established. If not then you need to work through the the various points of connectivity to find out where it breaks. The identity, firewall, NSGs etc might all come into play here.
Once you see a connection then you can play with permissions to ensure that your query then returns your data.
Without a full picture of your infrastructure and settings it is hard to pin it down further.
Turns out it was not a database connectivity issue like I thought it was; it was a code error.
Today I have some strange error on SQL Server. Something like this:
I don't know what I should do. This is happening when I want to run query more than 200MB. But I guess, the size doesn't matter. Can anyone guide me to fix this problem?
And, for some reason, I can't export SQL Server data for more than 100MB, so can anyone help me ?
Your error messages say a couple of different things:
Login timeout expired
... Server is not found or accessible ...
Could not open connection to SQL Server
If you look over the command parameters for sqlcmd here.
You're passing in s which is col_separator, rather than server which is S (note the capitalization).
Next you're probably going to need an authorization strategy, whether that is E for Integrated Security, or using U and P for userid and password respectively.
Try those and see what you're getting.
You could, of course, always try using SSMS rather than sqlcmd.
Edit: Looks like integrated security is by default, so you don't need to specify E unless you just want to.
I was looking everywhere and still have not found clear answer to this simple question:
Is it possible to use SQL authentication with LocalDB, i.e. is it possible to use connection string containing
Integrated Security=False
?
Yes, last I tried it was possible. Just follow the steps from this MDSN article.
Keep in mind that it will still be user instance, running under the account that started it, and will be shut down shall the account log out. Also no remote access.
This isn't so much a programming issue, but i'm not sure where else to get this level of expertise.
In any case, the issue i'm having is getting a legacy application to run locally on my machine. it connects to a SQL server using this connection string
Provider=SQLOLEDB.1;Persist Security Info=False;User ID=UN;password=PW;Initial Catalog=DB;Data Source=IP
(where of course UN, PW, DB and IP are different, real, values)
I've changed it to this, to connect to a SQL Server Express instance on my local box:
Data Source=MY-PC-NAME\SQLEXPRESS;Initial Catalog=DB;Integrated Security=True
The app errors out with a generic cannot connect type error, which isn't helpful in the least bit.
Anyone have any advice? I don't have much more information on this blasted program ..
Try something like:
Provider=SQLNCLI10;Server=Server\SQLExpress;Database=myDataBase;Uid=myUsername; Pwd=myPassword;
VB6 used OLEDB syntax; your previous syntax was for .NET
This eventually worked Provider=SQLOLEDB.1;Persist Security Info=False;User ID=;password=;Initial Catalog=;Data Source=mypcname\SQLEXPRESS;Integrated Security=SSPI
I have no idea why. I needed to specify the integrated security.
Thanks for your help!
I know that connection string questions are a dime-a-dozen, but I've got a new one.
I created a System DSN to talk to an Oracle database that I have locally on my machine. I put in all the info and hit the test button, and it says that it's successful. I'm using the OraDb11g_home1 driver.
When I try to put together a connection string for an application that uses ODBC, of course I can't get it to work.
One of the connection string attributes that they say that they require in their documentation is something called "Provider." What is this?
One of the most recent strings that I've used includes the following.
Driver={Oracle in OraDb11g_home1};Server=\\localhost:1521\local;Uid=mike;Pwd=password
Can anyone please offer any suggestions? Thanks,
mj
I figured it out. I was trying to use an application that was using 32-bit ODBC and the DSNs that I created were 64-bit.