It was working fine earlier, when I was comparing schema of a database project in Visual studio 2012 with a remote database deployed on a network server, but I am unable to troubleshoot why it is failing now.
It works fine when I compare the schema with same database deployed on local PC. Therefore it seems that comparing tool works, but there seems to be problem with remote server. Any way I can troubleshoot the problem.
The error I am having comparing with remote server is below:
Error 52 Target is unavailable: Value cannot be null.Parameter name: catalogStamp SqlSchemaCompare2 0 0
I came across this same issue recently, probably not the same cause as the original poster but in my case it was down to the compatibility level of the database I was connecting to.
The database I was connecting to was Azure based and Microsoft have recently updated these to default compatibility level 140 (the equivalent of SQL 2017). Previous instances were running on earlier levels and had worked straight from the off, running the below fixed the issue for me:
ALTER DATABASE [Database_Name] SET COMPATIBILITY_LEVEL = 120
Obviously be sure to check any side-effects before you make a compatibility level change on any production db!
As Thibault commented below, if you want to check existing compatibility levels you can use:
SELECT name, compatibility_level FROM sys.databases
And if you want to see what versions the different compatibility levels relate to have a look here https://learn.microsoft.com/en-us/sql/t-sql/statements/alter-database-transact-sql-compatibility-level
You must specify a login and password when connecting to the SQL server. If you use a login without a password that turns this error.
My DB was Azure SQL DB and was facing this issue, It got resolved for me by using Visual Studio 2017 instead of changing compatibility levels.
Do you have remote access to the SQL DB enabled (is the TCP/IP service enabled) also if you are using SQL Server Login do your SQl Server Security options allow both Windows Authentication and SQL Server Logins ?
Related
Using Oracle SQL Developer I have migrated a very simple SQL Server 2012 database (with only 1 table) to Oracle 12c. Everything went as expected and the report looks as follows.
But when I try to connect the migrated database (Name - DummyDatabase) with username = DummyDatabase and Password = DummyDatabase, I am getting login failure issue as shown below. What might have went wrong?
Finally, I have figured out a fix. The login was failing because the user (i.e., DummyDatabase) itself is not created. This could be because of SQL Developer running generated script (i.e., master.sql) using container DB connection. And Oracle 12c won't allow any user to be created without "c##" prefix in container DB. Hence to fix this I have executed the following command to change the default behavior and then run the generated script in SQL Plus.
alter session set "_ORACLE_SCRIPT"=true;
I'm working on setting up MediaWiki but I'm having trouble connecting to the SQL Server database.
Credentials are good but I'm getting the following error:
Cannot access the database: No connection could be made because the target machine actively refused it.
I've followed along with some mentions of installing some additional DLL's to support this but I'm either not setting them up correctly or this isn't the correct way to do this.
Are you are using a MSSQL account or a windows account credentials, make sure your connection is set for the right one or at least set it to accepts both.
I have a database set up that is to gather planned vacation time that I need to put on sharepoint asap. It's completely done, except for that the application login is failing for anyone that tries to use it that does not have their corprate login (windows authentication) listed in the security logins folder.
The connection string is fine, as it works properly on my computer and another programmer's computer, but not on my boss's computer. I can also login to sql server using the application login that is listed in the connection string.
I'm using SQL Server Managment Studio 2008, the server is 2005.
Edit#1: Further research led to finding this page: http://sql-articles.com/articles/troubleshooting/troubleshooting-login-failed-error-18456/
And my error is state 11. It's listing a windows authentication in the error log even though I specified otherwise.
Edit#2: My Connection String is this:
Driver={SQL Server};Server=ServerName\ThingIdontUnderstand;Database=ReportingDevDB;Trusted_Connection=FALSE;uid=Derp;pwd=qwerty;
Edit#3: Solved! See comments on this post for answers since I can't answer my own questions yet.
You check for the version when you connect to the instance through SSMS it will show it beside the server name under Object Explorer. Or just use the query SELECT ##VERSION
I would suggest simply creating a corporate windows group and adding those individuals to it, and then simply add this group as a login to your instance of SQL Server.
So, I am using Visual Studio 2010 and was trying to create a new database that I could use in my project. I have vague idea of having used the Server Explorer in the past, although I'm not that sure about it. My experience with MSSQL is almost non-existent, anyway.
I don't remember having to configure anything, but it seems I have a server called Xyz already set up, as can be seen in the next picture:
I've tried to to create a new database, but I am getting the following error:
What might be wrong? What tools should I make sure are correctly running? Isn't there something like Oracle's Sql Developer which allows me easily to inspect what's happening with my databases?
Also, what about the authentication? I can't recall having configured anything when installing Visual Studio. Maybe I still have to configure something?
I'm quite lost here, I'd appreciate some light shed up on me on this issue. Thanks!
Sounds like you don't have a SQL server or you're lacking some permissions.
On the server go Start->Run and type in services.msc and look to see if you have the SQL Server process and it is running. Also verify it is not a named instance.
If you see "SQL Server (MSSQLSERVER)" it is a default instance and you should be able to reference it using the server name.
If you see "SQL Server (SomethingElse)" you have to reference it using servername\SomethingElse
You also need to verify you have named pipes enabled by running the SQL Server Configuration Manager -> SQL Server Network Configuration -> Client Protocols.
If the sql server is new, it is probably because named pipes isn't enabled.
Or it could be like Mrchief stated and you don't have permissions to access that server.
Actually I think you would get a permissions error if that was the case. Your error is specific to connecting to the sql box.
I had similar problem with the same set up.
This article helped: http://support.microsoft.com/kb/823938
It turns out that SQL Server 2008 is shipped with TSP/IP disabled by default and nobody can connect to it via network, even from localhost.
Here is the solution:
You can check in registry this key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQLServer\SuperSocketNetLib\Tcp\Enabled
It must be set to 1 for SQL Server to be listening for network connection.
If it is set to 0, change it to 1 and restart SQLSERVER service.
Run this on master database to see error log on the server:
exec Go Xp_readerrorlog
You should look for
SQL server listening on X.X.X.X: Y
This will be an indicator if network connections are allowed in the Server
I am migrating a classic ASP web app to new servers. The database back end is migrating from SQL Server 2000 to SQL Server 2008, and the app is moving from Win2000 x86 to Win2003R2 x64. I am getting the above error on every single stored procedure call within the application.
I have verified:
Yes, the SQL user is set up, using correct username and password
Yes, the SQL user has execute permissions on the stored procedures in the database
Yes, I have updated the TypeLib references to the new UUID
Yes, I have logged into the database via SSMS with the SQL user id and it can see and execute the stored procedures just fine in SSMS, but not from the web app.
Yes, the SQL user has the database set as its default database.
The most frustrating thing is it works fine on the DEV server, but not on the production server. I have gone through every IIS setting 5 or 6 times and the web app is set up precisely the same in both environments. The only difference is the database server name in the connection string (DEV vs prod)
EDIT: I have also tried pointing the prod web box at the dev database server and get the same error so I'm fairly sure the issue isn't on the database side.
Are you sure that you are really connected to the instance and database you think you are (in the App)? It only takes the wrong DB in the connection string to override the default database for the user.
Can you execute some inline SQL on the connection like:
SELECT ##SERVERNAME AS SERVERNAME
,DB_NAME() AS [DB_NAME]
,CURRENT_USER AS [CURRENT_USER]
It might be the schema. Have you set the default schema of your user in the database you are using?