Showing posts with label requires. Show all posts
Showing posts with label requires. Show all posts

Sunday, March 11, 2012

Connection to SQL Server with network login id when not logged

I have a scheduled task that executes a program that, among other
stuff, every morning connects to a SQL Server that requires a login by
network login id. The problem is that, even if that scheduled task runs
as the network user, it doesn't work if that user is not logged on.
Is it any way to make ir connect when not logged?
Thanks in advance.
By "scheduled task" I assume that to mean that it is set to run using SQL
Agent. If so, then you need to assign the SQL Agent service to run as a
specific windows domain id and that id in turn needs to be granted access to
your SQL Server instance and database(s).
--Brian
(Please reply to the newsgroups only.)
<axl@.todojuegos.com> wrote in message
news:1123149165.623223.184430@.g44g2000cwa.googlegr oups.com...
> I have a scheduled task that executes a program that, among other
> stuff, every morning connects to a SQL Server that requires a login by
> network login id. The problem is that, even if that scheduled task runs
> as the network user, it doesn't work if that user is not logged on.
> Is it any way to make ir connect when not logged?
> Thanks in advance.
>

Connection to SQL Server with network login id when not logged

I have a scheduled task that executes a program that, among other
stuff, every morning connects to a SQL Server that requires a login by
network login id. The problem is that, even if that scheduled task runs
as the network user, it doesn't work if that user is not logged on.
Is it any way to make ir connect when not logged?
Thanks in advance.By "scheduled task" I assume that to mean that it is set to run using SQL
Agent. If so, then you need to assign the SQL Agent service to run as a
specific windows domain id and that id in turn needs to be granted access to
your SQL Server instance and database(s).
--Brian
(Please reply to the newsgroups only.)
<axl@.todojuegos.com> wrote in message
news:1123149165.623223.184430@.g44g2000cwa.googlegroups.com...
> I have a scheduled task that executes a program that, among other
> stuff, every morning connects to a SQL Server that requires a login by
> network login id. The problem is that, even if that scheduled task runs
> as the network user, it doesn't work if that user is not logged on.
> Is it any way to make ir connect when not logged?
> Thanks in advance.
>

Thursday, March 8, 2012

Connection to Oracle fails when using SQLNET.AUTHENTICATION_SERVICES = (NTS)

I'll say up front that this is going to be a long post because I plan on explaining my situation and what I've tried up front. It requires some explanation of how our application is secured since that appears to be interfering with SSIS being able to connect.

First the background scenario.

My company writes software that can use MS SQL or Oracle as the back end. I've begun work on an initiative to extract data to a star schema prior to purge in an attempt to improve reporting and analysis available to our customers. Initial plan is to use MS SQL Integration/Analysis/Reporting services for this. Even for our Oracle customers.

The problem symtoms.

I'm attempting to get a connection to Oracle with either an OLE DB or .Net provider. I've tried all available and get a ORA-12638: Credential retrieval failed error on all of them. I validate that a development username and password work using both SQL*Plus and Toad so troubleshooting begins. After some research I find that if I change my line for SQLNET.AUTHENTICATION_SERVICES in my sqlnet.ora file on the server from NTS to NONE that I can now get a connection with the SSIS Connection Manager.

The problem is, our application is secure and having this value set to NONE will never happen in production. I don't use it in dev or qa either. I also found that once I set this to none I could no longer connect with integrated security (EXTERNAL in Oracle speak) with Toad.

How our application is secured and why.

When setting up our application with Oracle as the back end we create only two users. One is the schema and owns all objects. It can't even log into the server though. The other is an external user. This users only rights are to log on and membership in a role. The role can execute stored procedures and nothing more. The application server services for our software run under the username of the external user in Oracle. That way we can use integrated security and no usernames or passwords are hard coded anywhere. Using an external user allows us to have our Windows application server work correctly with Oracle regardless of the OS that is hosting Oracle. This has made it easy on my developers since they just code for using integrated security and we have nearly identical data abstraction layers for both MS SQL and Oracle.

I've tried using the Integrated Security = True option in the .Net provider and still get the same error. I've tried passing / as the username and get the same error. I have a regular Oracle username/password in dev and qa environments that I provide the developers. It has more rights that the external user the services runs under so they can investigate what is happening behind the scenes. It works with Toad and SQL*Plus. When I use it in SSIS CM I get the same error message.

How do you use integrated security with Oracle from SSIS? I don't want to have to tell my boss that SSIS won't work for our Oracle customers.

Which Oracle driver are you using? The Oracle OLE driver, or the Microsoft OLE DB for Oracle?|||I've tried the Microsoft OLE DB Provider for Oracle, the Oracle Provider for OLE DB, and the .Net OracleClient Data Provider. The .Net driver is the only one that has an Integrated Security setting in the Connection Manager GUI. Normally with Oracle if I want to use integrated security I pass in a / for the User ID. If connecting with something like SQL*Plus I would use something like /@.TNSName or possibly /@.TNSName as sysdba if the user is a sysdba on the Oracle instance.

Sunday, February 19, 2012

Connection string for Remote Database connectivity(SQL Server2000)

hai,

I am working on ASP.NET 2003 with SQLServer2000. My application requires to be connected to the Database which is there in my Headoffice.

My SQLServerName is "MyDBServer\TestDB"

Database Name is "WebTO", UserID="******" and Password="******"

My Remote Server IP Address is "192.168.1.2" and its Static IP is "58.93.61.235"

I have specified the Connection string for my Remote Server as

"Provider=SQLOLEDB.1;Server=58.93.61.235\TestDB;UID=******;PWD=******;Database=WebTO"

(or)

"Provider=SQLOLEDB.1;Server=58.93.61.235\TestDB,1433;UID=******;PWD=******;Database=WebTO" (1433 is the Port number of the Remote SQLServer)

but it is giving the error " SQL Server does not exist or access denied".

if i execute the same application at my Headoffice (Remote Server) by changing the Connection string as

"Provider=SQLOLEDB.1;Server=192.168.1.2\TestDB;UID=******;PWD=******;Database=WebTO"

then, it is working fine.

Can anyone tell me where i went wrong or what i have to specify in my Connection string so that i can access my Remote Database Server.

Thanks in Advance,

Srinivas.

try

server=192.168.1.2,1433 ................... hope it will work

|||

192.168.1.2,1433 is also not working.

But, i don't know how can we access the Remote Server just by giving the IP without giving it's static IP.

|||

did u try with the static ip

58.93.61.235,1433

|||

My friend it seems that u aren't aware of my previos post where i have clearly mentioned that i have already tested with Static IP, 58.93.61.235,1433 but it is giving the error "SQL Server doesn't exist or access denied".

|||

Hi Srinivas,

have you enabled remote connections on your sql server? one more thing why are you specifying provider=SQLOLEDB?

do take a look at this link >>>>http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SQL-Server-2005/Q_22604523.html, under the threadhttp://forums.asp.net/t/1118398.aspx

migth be helpful to you

thanks,

satish.

|||

Hi Satish,

Thanks for ur reply.

Remote Connections on my SQL Server option is already in Enabled state. ( "Allow other SQL Servers to connect remotely to this SQL Server using RPC" check box is already in Checked state.)

And Regarding Provider=SQLOLEDB, when i am using OLEDB object, i need to provide the Provider information right?

And the link which u had given is asking to get registered in that site which is not a Free site.

Thank you.

Srinivas.

|||

Hi,

The IP (192.168...) works because you are in LAN. Each machine can be connected with each other and the IP of the remote machine is setting to "192.168..." (You can useipconfig -all to check it in command prompt.) You can't use Query Analyzer to connect the romote database by your static IP neither. So, just assign your machine with your static IP and have a try.

Thanks.