Showing posts with label denied. Show all posts
Showing posts with label denied. Show all posts

Saturday, February 25, 2012

Connection error : SQL Server does not exist or access denied

hello , i'm very new to sql server.

i'm using sql server 200 & winXP. I have a local server called "JO" and a dsn named "LocalServer".

Authentication is sql server authentication & window with username of "cying" and password "admin"

i can ping my server "JO" but cannot telnet it's sql_server_tcp_port.

this is the error code i obtained when try to open the connection:

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.

my connection string is as below :

set objcon = server.CreateObject("ADODB.Connection")

strConnection = "Provider=MSDASQL;Driver={SQL Server};Server=local;Data Source=LocalServer;User ID=cying;Password=admin;Persist Security Info=False"

objcon.open, strConnection

is there anything wrong with my connection string or setting?

pls help, thanks in advance


ok, i can now connect to sql server but another error occurs:

Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'Provider=MSDASQL'.

my connection string is as below :

strConnection = "Provider=MSDASQL;Driver={SQL Server};Server=(local);User ID=cying;Password=admin;Persist Security Info=False;"

do i need to put in data source? i created the user id under enterprise manager, (local) > serucity > logins. server access is set to permit. i even try log in with sa account but still comes out the same error.

pls help, thank u

|||

Hi,

It looks like you're running into a known problem described in the BOL (http://msdn2.microsoft.com/en-us/library/ms190204.aspx):

Note:

To enhance security, SQL Server 2005 disables TCP/IP connectivity to SQL Server 2005 for new installations of the Developer, Evaluation, and SQL Server Express editions. OLEDB applications connecting with MDAC 2.8 cannot connect to the default instance on local server using ".", "(local)", or (<blank>) as the server name. To resolve this, supply the server name, or enable TCP/IP on the server. Connections to local named instances are not affected, and connections using SQL Native Client are not affected. Installations where a previous installation of SQL Server is present might not be affected.

Try changing "(local)" to the name of the server.

Il-Sung.

|||

i manage to connect to db finally after changing the code, here's my new connection string

strConn = "Provider=MSDASQL;Driver={SQL Server};server=(local);uid=cying;pwd=admin;database=cying"

II-Sung, i'm using sql server 2000 and hav TCP/IP enabled

i think the cause of problem is uid & pwd, previously i used user name & password and failed to establish a connection

thanks for ur help though =)

Friday, February 24, 2012

Connection denied. Please help

Hello, everyone. I'm new in Reporting Services 2005. I encountered a confused connection problem. I'm running a named instance (called 'sql05') of SQL Server 2005 Standard Edition(a SQL Server 2000 instance as my default) on my Windows XP Professional machine. I log in Windows XP as a member of Administrators group. When I came into SQL Server Management Studio and connect to my local reporting server using Windows Authentication, the report server denied my connection request 'actively'. The service is running but it denied my connection. But when I use the same method to connect to my database engine and Analysis Services in Management Studio, no problem has happened. Does anyone have similar experiences? I appreciate for any help. Thank you!Ha, I found the solution. I mistakely altered the settings in Reporting Services Configuation Manager. On the 'Database Setup' page, I mistakely changed the 'Credential Type' from 'Service Credentials' to 'Windows Credentials' and input my WindowsXP username and password. This seems error-prone. When I changes back to 'Service Credentials' and apply it, the problem above solved. Can you help me distinguish between these Credential Types? Which type is suitable?

Sunday, February 19, 2012

connection

how to overcome this error "SELECT permission denied on object 'UserDetails', database 'LOGIN', schema 'dbo'."

you have to give your user, or all users (public) rights to select from this table

USE LOGIN;GRANT SELECT ON OBJECT::dbo.USERDETAILS TO PUBLIC;GO
|||

for this question

"(how to overcome this error "SELECT permission denied on object 'UserDetails', database 'LOGIN', schema 'dbo'.")"

u have given answer the answer as

you have to give your user, or all users (public) rights to select from this table

USE LOGIN;
GRANT SELECT ON OBJECT::dbo.USERDETAILS TO PUBLIC;
GO

Where I have to write the code given by u

my requirement is asp.net2.0 using sqlserver.

I have created a Login database in sqlserver2005 and trying to access the connection but it is giving the error as

"SELECT permission denied on object 'UserDetails', database 'LOGIN', schema 'dbo'."

plz say how to set permission in sqlserver to access the data"LOGIN" ,schema 'dbo'"

Sunday, February 12, 2012

Connecting to SQL Server,,,Error Server Does not exist or access denied

Hello

please assist me I will appreciate it

I have a problem in my scripting I gues,I "ve done the config and server registrations and allow a public permission ,but stil giving me trouble

well this is my coding:::::::
<

<script language="vb" runat="server"
Dim MyConnection As SqlConnection

Sub Page_Load(Sender As Object, E As EventArgs)

MyConnection = New SqlConnection("server=(localHost);Database=CampusLANDB;Trusted_Connection=yes")

If Not (IsPostBack)

Dim DS As DataSet

Dim MyCommand As SqlDataAdapter

MyCommand = New SqlDataAdapter("Select distinct State from Authors",MyConnection)

DS=New DataSet()

MyCommand.Fill(DS,"tStudents") ' This is where the pro underlies

MySelect.DataSource=DS.Tables("Name").DefaultView
MySelect.DataBind()
End if
End Sub

sub GetName_Click(Sender As Object,E As EventArgs)

Dim SelectCmd As String = "Select From tStudents Where Name =@.Name "

Dim DS As DataSet
Dim MyCommand As SqlDataAdapter

MyCommand = new sqldataAdapter(SelectCmd, MyConnection)

MyCommand.SelectCommand.Parameters.Add(New SqlParameter("@.Name",SqlDbType.VarChar,2))
MyCommand.SelectCommand.Parameters("@.Name").Value = MySelect.Value

DS= new DataSet()
MyCommand.Fill(DS,"tStudents")

MyDataGrid.DataSource=DS.Tables("tStudents").DefaultView
MyDataGrid.DataBind()
End sub

</script
and I will apreciate if anyone vcan help me urgently

PPMFor this to work, you must make the ASPNET Windows user a user in SQL Server, and give that user rights to the database in question.|||can you run any queries in the QA ?|||Your connection string is incorrrect. Use on of the following syntax (preferably the first one):

server=(local); Database=CampusLANDB; Trusted_Connection=yes
server=localhost; Database=CampusLANDB; Trusted_Connection=yes
server=MACHINE_NAME; Database=CampusLANDB; Trusted_Connection=yes
server=IP.ADD.RE.SS; Database=CampusLANDB; Trusted_Connection=yes (not really sure)

Regards

Connecting to SQL SERVER over the Internet comes up with access denied error

I have set up an MSDE SQL Server in my Win XP Pro PC and am able to connect to it on the host PC, and over my LAN. However, when I try to connect to it over the Internet my connection is refused with the following message:
SQL server does not exist or access denied. ConnectionOpen (Connect())
Some background:
I have router/NAT firewall and have opened port 1433 (I have even tried a DMZ to the SQL Server machine). The Router is definitely going to the SQL Server PC! I am fairly certain that the connection string is correct.
Any help would be most gratefully received.

Try connecting to the SQL Server from your web server and make sure you can connect from there. If not, you will need to get a dedicated connection the server.
Are you using an aliased connection name for the server like DBServer or something instead of the IP? If so, make sure it is in DNS or your web servers host file.

Nick|||

Hi

Sorry for the delay... Had to shoot off elsewhere... Does this mean I have to have web services up and running on the PC that is hosting the SQL Database?

Thanks

Paul

|||

It Depends. How are your web pages connecting to your sql server? Do you have 2 seperate boxes, one for web site other for sql server, or is it all on one server? Can you show your connection string to your server (remove the user name password info)?

Nick

|||

Currently done have a web server at all! I am just trying to connect to the SQL database using an internet connection. I can use either a direct IP or NO-IP.com to connect to the PC. Its once I'm on the PC that I get kicked out by the SQL server.

Thanks

Paul

|||

It sounds like you can make a connection to the server, but cant get authorization into the server? Try this:

Start>Control Panel>Admin Tools>Data Sources(ODBC)>System DSN>Add>SQL Server.
In the name, enter anything you want. For the server, enter the IP address and click next. Depending on how you connect (either with windows NT or SQL Server info into the machine, you will need to check the corresponding radio button. If you use NT and a different user name for SQL, uncheck the checkbox and enter your credentials and click next. If something is incorrect, it will tell you here. If not, you can make a good connection to your server. Let me know what it returns.
Nick

|||

Hi! i'm having the same issue as Paul. I added the new datasource and it came up with this error:
Microsoft SQL Server ODBC Driver Version 03.85.1025

Running connectivity tests...

Attempting connection
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server does not exist or access denied.

TESTS FAILED
i'm doing everything through NT auth and i'm on 2 servers. My work won't allow me to have an IIS and a SQL server on the same machine.
Any help would be great! thanks
Joel

|||The Network configuration of SQL Server can be accessed at the Server properties in Enterprise Manager, if you don't have access tell who have access to configure it. Let me explain you are connecting to SQL Server through either Named Pipes, NWLink IPX/SPX, Apple Talk, Banya Vine and VIA but not TCP/IP so you or who have access have to make the changes in the Network Configuration section of Enterprise Manager. Hope this helps.