ASP Classic Connection to SQL Server 2008 error 80004005 Login Failed - sql-server-2008

I'm trying to setup a connection between ASP Classic and SQL Server 2008 Express on a Windows 7 local environment. Today has been my first attempt ever at this, and I have spent hours and hours researching to no avail. The best I can do is get a failed login.
Here's the connection string (one of many tried):
Provider=SQLOLEDB;Data Source=mycompname\sqlexpress;Initial Catalog=theDBName;Integrated Security=SSPI
The error:
Microsoft OLE DB Provider for SQL Server error '80004005'
Cannot open database "theDBName" requested by the login. The login
failed.
What I want:
Just anything that will connect a database to my ASP Classic page (I normally work in LAMP)! This is not for a live site, so for the time being, that's my only consideration. Just getting it done. :(
Any ideas?

You've specified Integrated Security=SSPI, which means that the user owning the process making the connection must be allowed access to the database. That means that the web service must have access. Have you done that?
It might be easier if you create a named user, give it a password, and use that in your connection string.

Related

How Can I stop the users from accessing ODBC?

I have a mysql backend and a ms access 2013 frontend, I configured a odbc connection at system level so it´s available to all users in the computer. But Now I realized that you can easily just open a new database and pull all my tables from that odbc connection and see the credentials.
I´ve already try with user level odbc, the database simply doesn´t log.
How can I stop the users from being able to do such a thing?
Use a DSN-less connection plus connection caching.
Both are explained in this answer: https://stackoverflow.com/a/23430539/3820271
Then distribute your frontend as accde, so the source code isn't available.

MVC4 publishing website on Arvixe giving error

I have published the website on Arvixe system pointing to MySQL database.
When i try to access the website, its working fine, but somehow after some page accessing, it start giving the error as:
Server Error in '/' Application. A network-related or
instance-specific error occurred while establishing a connection to
SQL Server. The server was not found or was not accessible. Verify
that the instance name is correct and that SQL Server is configured to
allow remote connections. (provider: SQL Network Interfaces, error: 26
- Error Locating Server/Instance Specified)
I have pointed my website to MySQL database, but it is giving the error of SQl server.
For a check, when i run the website pointing to arxixe database from my local machine, its working absolutely perfect.
I have hosted the MySQL database onto Arvixe server itself.
Any help on this would be highly appreciated.
You will want to check 2 things:
1.You are using "localhost" or "127.0.0.1" in the connection string for the script on the server.
2.There may be another connection string in the code, that is connecting to the MSSQL server.
There is a 3rd option:
Contact Arvixe's support as they will have exact details of what would be happening.
Good luck!

Cannot to connect to SQL server 2008?

I have been trying all kinds of tricks - from enabling TCP/IP, adding exception to firewalls to poking bill gates vodoo doll. But nothing seems to work for me. Is it really that difficult to connect to sql server 2008 via management studio ? Maybe, robbing a bank would be easier.
While i figure out which bank to rob, can you help me to fix the problem ?
When I try to login to sql server 2008, this is the error i get-
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)
The links i tried so far -
blog.sqlauthority.com/2009/05/21/sql-server-fix-error-provider-named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server-microsoft-sql-server-error/
and some more random links on the net.
When you installed SQLServer, there are several options that may affect the way SQLServer runs and how you have to connect to it. The link you included in your question that points to the sqlauthority blog has an additional thread posted by Vince. Be sure to follow those instructions so that SQLServer will be set to listen on port 1433 and not a dynamic port.
Also, when you log-in, if it tells you that the login fails (e.g., for xxx\yyy), then you probably missed the option in the install to add the current user as an authorized users. In that case, you will have to log in through SSMS using SQL Server Authentication, and provide sa as the username and the password that you set during the install.
After you log in, you can add your Windows user account to the list of authorized users by expanding the root Security folder in the SSMS object explorer, right-click Logins and select New Login. From there you can search for your user account and add a Windows authentication user. That will make it possible for you to log in using Windows Authentication so you won't have to type your password every time you launch SSMS.

SQL Server Error 223 When Connecting

I recently changed SQL Server 2008 from windows authentication mode, to mixed. I created a new user 'taraw' and set a password. I'm connecting to localhost - which works perfect when using windows authentication, however if I want to use SQL Server authentication with my user - taraw, I get the following error:
Shared Memory Provider, error: 0 - No
process is on the other end of the
pipe (Microsoft SQL Server, Error 233)pipe (Microsoft SQL Server, Error 233)
I know the password is correct as I've just created it, I've also tried creating different users, to which I get the same result. I've read somewhere that Namespipes might be disabled? But I haven't found out where or even how to enable this. (EDIT: I have since found this, and it is enabled)
If anyone has any advice it would be MUCH appreciated.
Thanks
I have since solved this problem. I was previously restarting the server within SQL SERVER MANAGEMENT STUDIO, this was incorrect.
I simply restarted the SQL Server within SQL Server Configuration Manager and it worked.

Migrating from MS SQL to MySQL: SQLOLEDB? Migration kit login error?

I've been put in charge of migrating a customer's website of MS SQL/ASP to PHP/MYSQL. I have zero experience with MS SQL.
I'm trying to figure out the best way to get the current data migrated to MySQL so I can begin PHP development.
Some details:
I downloaded SQL Server Mangement Studio Express. I found the following string in a connection file:
MM_connCompanyName_STRING = "provider=SQLOLEDB;data source=IP_ADDRESS;database=DATABASENAME;uid=USERNAMEpwd=PASSWORD;"
Using the IP, username, and password from this string, I could successfully connect using Studio Express.
I downloaded the MySQL Migration Toolkit and entered the same info, but get the following error:
Connecting to source database and retrieve schemata names.
Initializing JDBC driver ...
Driver class MS SQL JDBC Driver
Opening connection ...
Connection jdbc:jtds:sqlserver://IP_ADDRESS:1433/DATABASENAME;user=USERNAME;password=PASSWORD;";charset=utf-8;domain=
The list of schema names could not be retrieved (error: 0).
ReverseEngineeringMssql.getSchemata :Login failed for user 'USERNAME'.
I don't have admin or physical access to the current SQL server. I've tried to run some exports through Studio Express, but it saves them to the file system, which I don't have access to.
I can reach the current/old webmaster, but because he no longer works for the company, his responses are slow and usually un-helpful. So no help there...
The former admin sent me an MDF file ... no idea what to do with that.
I found this note above the connection info on the current server (if it means anything):
'this connection is being used because
ODBC was causing weird errors,
switching to OLEDB fixed them
My questions:
Any idea why this would be failing with the same login credentials that works with Studio Express? I'm assuming it has something to do with the driver, but I don't know what next steps to take.
Is there a better/easier/more effective way to migrate this data? (I'm hoping I don't find myself running "SELECT *" statements in Studio Express and copy/pasting data into Excel...please god, no)
Thanks in advance for your help.
Eww, this is going to be scary (connection string indicates it was tool generated from Dreamweaver, never a good sign).
Any idea which version of SQL Server? You should be able to SELECT ##VERSION. 10.x is 2008, 9.x is 2005 and 8.x is 2000. If it is 7.x run.
The MDF file is the actual database. If I were you, I would buy a developer edition of SQL 2005 (or 8 if it is 2008 which is unlikely), it will be worth the $99 or so it costs.
This will give you the ability to locally install the DB by ATTACHing the MDF file. Once you have a locally running copy, you can use the SQL Server ETL tools with the MySql ODBC drivers to push the data to MySql in a repeatable manner.
I believe you can export data from MSSQL choosing different SQL dialects; I believe there's one that's reasonably MySQL compatible. It doesn't solve all your problems, of course, because while you may get the structure properly, stored procedures and triggers and the like will take a bit more work. But that should get you started.