Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All -
Our DBAs are suspicious of a connection string that we are using in our scripts. They asked if I could run Select @@SERVERNAME to verify the connection, but I'm not sure how to make it work or if it's possible.
Any ideas?
Thanks!
Mike
If SELECT * FROM table does not work, there is definitely an issue with the permissions in the user that QlikView has n the connection string or the one defined in the DSN. If you cannot run queries with that user, then I don't know how else you can provide any useful data. They can see which IP is connecting the server, if that matches with Production server you are hitting then Production.
While LOAD is always a good idea, for this test there is no need to use it.
Yes, you can do that in the script, for example. If the driver supports that, that will return a field with the servername.
Thanks, Miguel. But I guess I'm doing something wrong.
I simply have the connection string, then:
@@SERVERNAME;
But get an error:
OLEDB read failed
Select @@SERVERNAME
The driver is:
Provider=SQLOLEDB
Do you see anything there that would make it fail?
mike
If you do any SELECT * FROM table does it work? (A simple one just to test that the connection is OK)
Has the user permissions to check that variable (i.e.: logging in as that user in SQL and selecting, does it return anything)?
SELECT * FROM table does work. I used the command from SQL Management Studio and it worked.
The database that we think we're hitting is a replicated reporting DB, but the DBAs seem to think it's hitting production. So they asked me to do this to prove it one way or the other...
Would it need some LOAD statement before the @@SERVERNAME ?
If SELECT * FROM table does not work, there is definitely an issue with the permissions in the user that QlikView has n the connection string or the one defined in the DSN. If you cannot run queries with that user, then I don't know how else you can provide any useful data. They can see which IP is connecting the server, if that matches with Production server you are hitting then Production.
While LOAD is always a good idea, for this test there is no need to use it.
Thanks!