Accessing External Webservice Or Webpage From SQL 2005

Sep 22, 2006

Is it possible to access a webservice from within SQL 2005?
What I am looking to do is place  a trigger on a specific table, and detect if a specific column is being updated.  If it is, I want to launch a robust process that does x, y and z.  Something like this:
1) record is updated indicating that an account is closed.
2) SQL launched a webservice/ aspx page that builds an HTML email template and then mail it.
thanks!

View 2 Replies


ADVERTISEMENT

Calling External Webservice Using Certificate

Apr 28, 2006

I'm trying to call an external webservice which use https and certificate. I load certificate into MSIE and then made *.cer file. The problem is that if I compile simple console program which use this certificate - than all is OK. But when I compile simple rutine for SQL server and trying to run it - an exception is issued after this line:

service.ClientCertificates.Add(X509Certificate.CreateFromCertFile(certFile));

Exception is:

Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.


Do you have any advices?

MiSu

View 1 Replies View Related

Windows Control Library In A Webpage Accessing Sql Has A Security Error

Aug 23, 2006

I know this should be the easiest thing in the world but I cant seem to find out how to allow my windows control library dll which is loaded in a webpage to access sql.
It works perfectly from within visual studio though, what do I need to do allow my webpage dll to access sql without throwing a security exception?
Any links or help would be greatly appreciated.

View 1 Replies View Related

Problem Accessing Database Via .asmx Webservice

May 12, 2008

I just added a .asmx webservice to my project.
When i try to retrieve some information of the database using the webservice, despite using the same code as in a code behind .aspx file, it doesn't work.SqlConnection conn =
new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["LocalSqlServer"].ConnectionString);DataTable dt = new DataTable();
conn.Open();
String sql = "SELECT * FROM aspnet_Users";
//But i would suggest you to use parameterize queries or SP for security reasonsSqlCommand cmd = new SqlCommand(sql, conn);cmd.CommandType = CommandType.Text;
cmd.ExecuteNonQuery();SqlDataAdapter ad = new SqlDataAdapter(cmd);
ad.Fill(dt);
conn.Close();
 
Using this code in .aspx.cs it works, but in my .asmx it doesn't. The 'cmd.ExecuteNonQuery()'  returns '-1' in the .asmx.
I have to use the webservice because i have a Silverlight client in my application, whichs has to retrieve data from the database.
Any ideas why it works for the .aspx.cs and not for the .asmx file?

View 4 Replies View Related

Accessing Webservice W/ Custom Dll - WebPermission Request Fails

Feb 21, 2007

I'm running rs2005 sp2, and the dll was made with .net 1.1. Before, there were no issues with this version crossing of .net 1.1 and 2.0.

In the RS IDE, the webservice call works fine. I've read that this execution is done with full trust - so I've tried to tackle the CAS issue.

When I try to call the webservice from the dll, I catch the exception, and it's:
Request for the permission of type 'System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Now what confuses me is, why is the version of WebPermission 2.0 when the dll is 1.1? Maybe there is translation done and the dll is really run w/ the 2.0 framework?

Anyways, this I've done are:

* Added this right before my webservice call. Is something missing?
// We need to ensure that this library is permitted to access the webservice url
// http://support.microsoft.com/default.aspx?scid=kb;en-us;842419
System.Text.RegularExpressions.Regex urlRegEx = new System.Text.RegularExpressions.Regex(@"http://server/.*");
System.Net.WebPermission p = new System.Net.WebPermission(NetworkAccess.Connect, urlRegEx);
p.Assert();

* Gave the 'All_Code' group permission of full trust in both .net 1.1 and 2.0 configurations to see if it helped - it did not, and I checked the report after I did an iisreset. This should have done it!!

* I also tried changing: rsmgrpolicy.config and rssrvpolicy.config

and updated these lines to have version 2.0.0.0:
<SecurityClass Name="SecurityPermission" Description="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<SecurityClass Name="WebPermission" Description="System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>

iisreset was done, and the code executed was still complaining about the permission request failing for WebPermission.

* These blocks were added to rsmgrpolicy.config and rssrvpolicy.config, in respective sections:
<CodeGroup class="UnionCodeGroup"
version="1"
PermissionSetName="CompanyPermissionSet"
Name="CompanyRS"
Description="">
<IMembershipCondition class="UrlMembershipCondition"
version="1"
Url="file://C:/Program Files/Microsoft SQL Server/MSSQL.3/Reporting Services/ReportServer/bin/Company.RS.dll"/>
</CodeGroup>

<PermissionSet class="NamedPermissionSet"
version="1"
Name="CompanyPermissionSet">
<IPermission class="SecurityPermission"
version="1"
Flags="Assertion, Execution"/>
<IPermission class="WebPermission"
version="1">
<ConnectAccess>
<URI uri="http://server/"/>
<URI uri="http://*.Company.com"/>
</ConnectAccess>
<AcceptAccess>
<URI uri="http://server/"/>
<URI uri="http://*.Company.com"/>
</AcceptAccess>
</IPermission>
</PermissionSet>

View 1 Replies View Related

Creating A Database Based Webservice And Accessing It Through Windows Application

Jun 11, 2008

Geekz,
My problem is that , I had setup blog on server say, blog.xyz.com [I am using blogengine.net, which is in ASP.Net]. It is using sql server2005 as a backend for storing its blog's posts. After settingup blog, i tried  to access its database through my windows application. But while development I was getting error that
"An error has occured while establishing a onnection to the server. When connecting to SQL server 2005, this failure may be caused by the fact that under the defaukt settings SQL server doesnot allow remote connections.(Provider Named Pipes, error :40 - Could not open a connection to SQL Server)"
 I am using  [String ConnectionString = "Data Source=sql-v123.mesa11.1Server.net; Initial Catalog=abc; User ID=xyz; Password=xyz123";]
Then I decided to created a webservice that will access the data from databse blog and store it somewhere in datatable  and using windows application i will retrieve those data for end user. So I want to to know that whether i can access the datatable of webservice holding the blog data from windows application or not. if answer is Yes, then please provide me with source or some great links. Or if There is any other option so that I can access my database directly from windows application, then it would be better. Looking for your answers.
 Thanks and regards

View 3 Replies View Related

Option For Accessing External DLL's From The CLR

May 3, 2006

What are my options for calling external DLL's from SQL CLR, I used to use the sp_OA method but these have been converted to .Net assemblies and I do not want to use interop for several reasons. Any suggestion would be greatly appreciated.



J-

View 5 Replies View Related

Accessing External Data From SQL Server

Mar 21, 2007

Hi,I have a Sybase dataserver containing lots of (huge) tables that Iwould like to access from SQL Server (two different applications,using two different datasources, now want to talk to each other). MSAccess has a feature for 'linking' external data. Can I do similarstuff in SQL Server?Basically, I am trying to avoid having to duplicate the data in boththe dataservers and worry about keeping them in sync.Regards,Tanveer

View 3 Replies View Related

Accessing External Data Within A Report

Jan 2, 2008

I have created a report using Visual Studio that brings back the expected information from the database when either run from within VS or is deployed to the server and run through Internet Explorer. The problem that I have is that records on the database each has a field that contains the location of a photograph file which is located on a different server. When I run the report from within VS on my PC it correctly includes the photo but when I run it from the server the picture just shows the icon denoting a broken link - although all of the database information is correctly displayed.

I think this may be a security problem as my workstation user has Domain Administrator capabilities but I am not sure which user is being used by Reporting Services when it tries to access the photo files from the other server. I have made sure that the user configured in Windows Service Identity also temprarily has Domain Admin rights but this has not made any difference.

Can anyone shed any light on which user the server uses when it runs on the server and tries to access network based information.

Thanks

View 1 Replies View Related

Consuming Sqlserver 2005 Webservice From Asp.net 1.1

Oct 4, 2006

Is it possible to consume the sql 2005 web service from 1.1? When I try and do so I receive the following error:Type 'http://schemas.microsoft.com/sqlserver/2004/sqltypes:varchar' is not declared or not a simple type. An error occurred at , (1, 2452).

Thanks,

Olja

View 1 Replies View Related

Error Connecting To SQL 2005 Through Webservice Using SQL Authentication

Sep 26, 2006

Running a SQL 2005 Database under a Default instance. i.e. (SERVERNAME) and not (SERVERNAME/SQL2005)

View 3 Replies View Related

Reporting Services 2005 And XML DataSource (as WebService)

Apr 25, 2006

I'm trying to build WebService to use result as DataSource for RS 2005 (XML DataSource).

But I have a strange problem.

I have WebMethod with parameters.

When I'm testing my WS in browser then everything works just fine.


But... When I'm trying to call this web-service from VS2005 environment then something strange happens.

Looks like VS passing parameters incorrectly to my WS (not passing at all!)


I've created very simplyfied version just to check parameters:

using System.Xml;
using System.Xml.Serialization;
using System.Messaging;
using System.Text;
using System;
using System.Web.Services;
[WebService(Namespace = "http://company.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class GetRemoteData : System.Web.Services.WebService
{
[WebMethod]
public XmlElement GetData(string CompanyName, string FunctionName, string ParameterList)
{
XmlDocument xmlDocument = new XmlDocument();
XmlElement xmlElement1;
xmlElement1 = xmlDocument.CreateElement("parameters", "values", "urn:errors");
xmlElement1.InnerText = String.Format("{0}, {1}, {2}", CompanyName, FunctionName, ParameterList);
return xmlElement1;
}
}



In the browser WS returns all passed parameters back correctly. VS - not.


What's wrong with my code? Why MSDN example works fine?
Do I need to specify some undocumented (soap specific) attributes?


Where I can find full tutorials how to create RS-compatible web-service?

(Sorry for cross-posting but I have no single reply...)

View 3 Replies View Related

Sql Server 2005 Reporting Services And XML Webservice DataSource

Dec 14, 2007

I am new to both Reporting Services and Webservices implementation so I am just trying to use a simple example. I found a Webservice on the internet that returns movie information:

http://www.ignyte.com/webservices/ignyte.whatsshowing.webservice/moviefunctions.asmx?wsdl

I am trying to call in using XML DataSource and with absolutely no luck. Here are the steps I have followed:

DataSource type: XML
Connection String: http://www.ignyte.com/webservices/ignyte.whatsshowing.webservice/moviefunctions.asmx

Report Data Quert:

<Query>
<SoapAction>http://www.ignyte.com/GetUpcomingMovies</SoapAction>
<Method Namespace="http://www.ignyte.com/whatsshowing" Name="GetUpcomingMovies">
<Parameters>
<Parameter Name="month">
<DefaultValue>12</DefaultValue>
</Parameter>
<Parameter Name="year">
<DefaultValue>2007</DefaultValue>
</Parameter>
</Parameters>
</Method>
<ElementPath>RunQueryResponse{}/RunQueryResult{}/diffgram{}/DataSetName/TableName</xmldp:ElementPath>
</Query>


I am getting an error: The XmlDP query is invalid. (Microsoft Report Designer)


Any help? I am trying to figure out this simple example so I can apply it to my own webservice.

Thanks

View 1 Replies View Related

Communicate With WebService From MS SQL 2005 CLR Procedure, Quick Steps

Jan 14, 2008

-> Communicate with WebService from MS SQL 2005 CLR Procedure, Quick Steps

1- Create SQL project in V.S 2005.


2- Add new Trigger Class, right click on project select Add -> New Item.


3- Add Web Service reference.


4- Use impersonation technique to communicate with Service.


Example:


using (WindowsIdentity id = SqlContext.WindowsIdentity)
{
WindowsImpersonationContext context = id.Impersonate();


/////////////////////////////
proxy = new WebServiceProxy();

proxy.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;

proxy.HelloWorld();

/////////////////////////////


context.Undo();
}


5- Set SQL Project Permission Level to External, change from the project properties Database Tab


"Permission Level Select the permission level from the drop-down list to specify a set of code

access permissions granted to the assembly when accessed by Microsoft SQL Server. The value can be

Safe, External, or Unsafe; these values correspond to the SQL Server permission sets SAFE,

EXTERNAL_ACCESS, and UNSAFE, respectively. Safe is the default.

This setting corresponds to the PERMISSION_SET argument for the SQL Server CREATE ASSEMBLY command.
" MSDN


6- "The TRUSTWORTHY database property is used to indicate whether the instance of SQL Server trusts

the database and the contents within it. By default, this setting is OFF, but can be set to ON by

using the ALTER DATABASE statement.

Note:
To set this option, you must be a member of the sysadmin fixed server role." MSDN


ALTER DATABASE [Database Name] SET TRUSTWORTHY ON
.



7- Build and Deploy assembly.

8- The web service reference generates XmlSerializers assembly, there are many ways to resolve
this issue, a quick way would be to add the XmlSerializers assembly to the database where the
main CLR assembly is deployed.


From "SQL Server Management Studio" select the target database, goto "Programmability" then ->
"Assemblies", there right click "New Assembly" and specify reference.





Hope this is helpful to others.
Regards
Rabeeh Abla

View 1 Replies View Related

Using External Tools In Sql Server 2005

Jul 5, 2007

I have seen the
Tools------>External tools
in sql server 2005 window

What external tools are used ? How they are used?
Plz give me the link to study this

Thanks,
Swati

View 3 Replies View Related

External Stored Procedure In SQL Server 2005(x64)

Aug 9, 2006

I have generated a DLL file in VC++ 2005 by a 'C' file. It works fine when I put in a 32bits machine(32bits Windows Server 2003 + 32 bits SQL Server 2005).

However, when I build it into 64 bits, it doesn't work in a 64 bits machine. I have checked by Dependenct Walker, the DLL generated is linked with KERNEL32.DLL / OPENDS60.DLL / MSVCR80D.DLL, all of these DLL files are on the 64 bits machines and linked correctly.

I used the command


sp_addextendedproc 'abc', 'C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLBinnabc.dll'

to create a ext. stored procedure. When I run it, the error message shows that

Could not load the DLL C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLBinnabc.dll, or one of the DLLs it references. Reason: 126(error not found).

I would like to ask what is cause of the problem? Do I need to use CLR instead?

Thank you very much!!~

View 2 Replies View Related

Using The External Activator Sample On A Shared Hosting SQL 2005

Mar 30, 2007

Hi,



I'm trying to get the External Activation Sample to work on a shared hosting Sql Server. The error seems to indication that I might be able to enter my db un/pw to get it to work. Where in the code or app.xml can I provide credentials? Here's the EA log. Thanks!



3/29/2007 4:47:39 PM STATUS: External Activator initialization completed.
3/29/2007 4:47:42 PM WARNING: Failed to connect to Notification SQL Server 'sqlb2.webcontrolcenter.com' and Database: 'xyz' because: Login failed for user ''. The user is not associated with a trusted SQL Server connection.
3/29/2007 4:48:17 PM STATUS: External Activator is shutting down...



Stacy

View 1 Replies View Related

Link SQL Server 2005 Tables To External Database Through ODBC

Sep 24, 2007

Hi
I'm a newbie at SQL 2005 and I'm trying to create linked tables to our ERP system through ODBC. I can do this in MS Access or vb.net by using the ERP system's ODBC driver, but I am lost when it comes to SQL Server 2005.
Thanks for any help

View 1 Replies View Related

Connecting To An External SQL 2000 Server From A Vista Machine With SQL 2005 Installed

Nov 26, 2006

hi there - I'm praying someone here can shed some light on this - after many google and web searches, I have found users with similar issues, but have yet to find a solution.
Problem: I have recently upgraded my desktop from Windows XP to Windows Vista Ultimate (clean install) and have migrated my local machine to SQL Server 2005. However I have a number of .Net projects that access databased on another server running SQL Server 2000 - prior to my upgrade to Vista, I was running SQL Server 2000 on my desktop as well. During the install, everything seemed to go well, and I also installed the SQL Server 2005 Service pack as instructed via the MSDN site.  However, when attempting to test my .net projects on my desktop pc (ie visit http://localhost), I encounter the error:
An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
 note that the server I am attempting to connect TO is the old SQL 2000 server - NOT 2005.  I specify my connection info in the web.config - and it points to an external ip address on the web.
Can anyone shed some light on this?  I've tried enabling remote access on my local SQL 2005 install, but I'm fairly sure thats for servers that want to connect to my desktop, rather than my desktop attempting to connect to external servers. Any help is greatly appreciated - I'm pulling my hair out over trying to figure this out! :)
 To summarize my setup (if it helps)
Desktop PC:Windows Vista (Ultimate)SQL Server 2005Visual Studio 2005II 7.0.Net 2.0 (ASP.Net Application)
External Server (co-located at a datacenter)Windows Server 2003SQL Server 2000IIS 6.0.Net 2.0 (ASP.Net Application)
 
 Much appreciated,
Ted
 

View 5 Replies View Related

Accessing AS 2005 From ASP.NET Application

Nov 17, 2005

I have an asp.net application. This application provide consolidated information to the user using Analysis Services 2005. Within it, one aspx page uses MDX query to retrieve the information from the cube. However, we are unable to access AS 2005 because of authentication issues. What would be the easier to implement and deploy scenario?
How can I access AS 2005 from an ASP.NET application? Is there any feature to use?

View 1 Replies View Related

Accessing Remote SQL 2005

Jan 29, 2007

Hi Experts,

In SQL 2000, we have SQL Client which is used to access remote sql servers. What is there in SQL server 2005? I just want to install a client and not a server on my local boxes to access remote server.

Any help is appreciated.

Thanks
Sachin

Don't sit back because of failure. It will come back to check if you still available. -- Binu

View 8 Replies View Related

Regarding Accessing On Every Objects Within The Sql 2005

Jan 24, 2007

Hi guys , can I know is that any way to set up some authentication for user access all the objects within the database after login successfully. For example, after access login into the database server and would like to click on certain database (eg : A) , then pop up the user access login page again. Thx

View 7 Replies View Related

Accessing A Web Service Using Clr In SQL 2005

Aug 13, 2007

I need to access a billing webservice from SQL. I createde a new c# class project and made a web refrence to the web service "ProdBilling".

Here is the code of my assembly

using System.Data;
using Microsoft.SqlServer.Server;
using System.Data.SqlTypes;
namespace PaymentProc
{
public class PaymentProc
{
[Microsoft.SqlServer.Server.SqlProcedure]
public static void ChargeCard(int account, int amount)
{
string Response;
ProdBilling.Service serv = new ProdBilling.Service();
Response = serv.ChargeCard(account, amount);
SqlContext.Pipe.Send(Response);
}
}
}

I then ran WSDL

wsdl /oaymentProc.cs /naymentProc http://ProdWeb1/PaymentProc/PaymentProc.asmx

Then compliled

csc /target:library PaymentProc.cs

and added the assembly
CREATE ASSEMBLY PaymentProc from 'D:ProdCodePaymentProc.dll' WITH
PERMISSION_SET = UNSAFE


I cannot figure out how to refrence the chargecard method

I have tried

CREATE PROCEDURE PaymentProc
@Account int,
@Amount int
AS
EXTERNAL NAME PaymentProc.[PaymentProc.PaymentProc].ChargeCard

It seems wsdl.exe put all this serialization code

namespace PaymentProc {
using System.Diagnostics;
using System.Web.Services;
using System.ComponentModel;
using System.Web.Services.Protocols;
using System;
using System.Xml.Serialization;


///
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="ServiceSoap", Namespace="http://ProdWeb1/PaymentProc")]
public partial class PaymentProc : System.Web.Services.Protocols.SoapHttpClientProtocol {

private System.Threading.SendOrPostCallback ChargeCardOperationCompleted;

///
public PaymentProc()
{
this.Url = "http://ProdWeb1/PaymentProc/PaymentProc.asmx";
}

///
public event ChargeCardCompletedEventHandler ChargeCardCompleted;

///
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://ProdWeb1/PaymentProc/ChargeCard", RequestNamespace="http://ProdWeb1/PaymentProc", ResponseNamespace="http://ProdWeb1/PaymentProc", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public string ChargeCard(int account, int amount) {
object[] results = this.Invoke("ChargeCard", new object[] {
account,
amount});
return ((string)(results[0]));
}
.................

When I run

CREATE PROCEDURE PaymentProc
@Account int,
@Amount int
AS
EXTERNAL NAME PaymentProc.[PaymentProc.PaymentProc].ChargeCard


I get error


Method, property or field 'ChargeCard' of class 'PaymentProc.PaymentProc' in assembly 'PaymentProc' is not static.

Any ideas? This seemsed so straitforward in the beginning.

View 2 Replies View Related

How Do I Configure SQL Server 2005 Reporting Services To Deliver Subscription E-mails To Addresses External To My Windows Domain

Jun 10, 2007

Can anyone help me with a problem I have with SSRS 2005? How do I configure SQL Server 2005 Reporting Services to deliver subscription e-mails to addresses external to my windows domain?

I've been having trouble configuring the Report Server e-mail delivery component to send subscription e-mails to addresses outside the domain on which the report server is hosted.

For e.g. since my local windows domain is named "smartsystems.com", I have found that the Report Manager does not have any problems sending subscription mails to "eawagu@smartsystems.com" but throws up an error whenever I include "eawagu@yahoo.com" in the recipients' list.

Any insights?

View 1 Replies View Related

Best Practices For Accessing A Sql 2005 Db On The SAME Box As IIS 6.0 Serving Asp.net 2.0

May 17, 2007

I am re-posting this from the security Forum where it remains un-answered.

OK, Here's the set up.

I have a Windows 2003 box, soon to have SSL installed

On it is IIS 6.0, SQL 2005 Standard Edition (5Cal user lic)



SOON I'll have a prod enviornemnt where a web app being served by IIS is accessing SQL. I can go into SQL and set up a user account, call it MyAppSQLAcess, and code that into the connectionn string and lock it down to the tables/db it has access to. Or I can do it w/windows authentication, or I can do it a number of other ways, the question is this:

What is the best way for an asp.net app being server by IIS 6.0 to access data from SQL 2005 server when they are all on the same BOX? WRT Speed and security?



Thanks



Dan

View 2 Replies View Related

Accessing SQL Server 2005 Through Vista

May 10, 2007

I just bought a new HP laptop that has Vista installed. Not happy about the OS but it is what it is...

I need to use Enterprise Manager, or an equivalent, to access a remote server, running SQL 2005.

With XP, I always installed and used SQL Server 2000 Client features.

Vista does not play well with SQL 2000 so I am looking for an alternative to simply be able to access, and perform DTS functions, a remote SQL 2005 system.

Does SQL Server 2005 Express offer client alias features?

Can anyone recommend another approach or product?

Thank you,

Steve

View 7 Replies View Related

Accessing SQL Server 2005 Express

Feb 15, 2007

I recently downloaded SQL Server 2005 Express Edition. Everything was installed correctly without any problems. However, when I went to my Program list, the only thing listed for Microsoft SQL Server 2005, was Configuration tool.

Where is the actual program where I can write and run queries? How do I access the server?

View 3 Replies View Related

Accessing SQL 2005 Reports Externally

Mar 28, 2008



Hello,

I am trying to access some SQL 2005 reports externally from the network, however when i try to open the reports i get the following error -

· "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
The remote certificate is invalid according to the validation procedure."

Any ideas on how i could resolve this issue?

Thanks.

View 18 Replies View Related

Accessing 64-bit MS SQL Server 2005 From Classic ASP

Aug 20, 2006

I'm considering shifting my database server to 64-bit MS SQL Server 2005 for improved scalability and performance. I'm concerned, however, that my classic ASP website (which sits on a separate server) may have problems communicating via ADO/OLEDB because of communication problems between 32-bit IIS on the web server and 64-bit MS SQL Server on the database server.

My current set up (which works fine) is:

Web Server: Windows Server 2003, Standard Edition, SP1 - running IIS with a set of ASP websites
Database Server: Windows 2000 SP4, running MS SQL Server 2000

Connection String:

MyConnection="Provider=SQLOLEDB;Network Library=DBMSSOCN;SERVER=192.168.0.1;INITIAL CATALOG=MyDatabase;UID=MyUserID;PWD=MyPassword"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open MyConnection

My core question is:

If I change my database server to new machine with 64-bit Windows Server 2003 running 64-bit MS SQL Server 2005, will my (32-bit) web server be able to connect from ASP as it does now?

Thanks for your help!
Jed

View 2 Replies View Related

Accessing SQL Server 2005 Via Scheduled Task

May 27, 2007

I have a strange problem that I think deals with security on SQL 2005.I have a scheduled task that runs on a Windows 2000 machine. It callsa vb script which creates a connection to SQL Server.We migrated a database from SQL 2000 to 2005 which is on a differentbox. I changed the connection in the vb script to use the new sqlserver. The original connection to SQL 2000 used the 'sa' accountcoded into the connection string , which we don't want to use on thenew server, so I changed the connection string in the script to usethe below login information.Const strConnection = "Provider=SQLOLEDB;DataSource=SQLServer;Integrated Security=SSPI;Persist SecurityInfo=False;Initial Catalog=database;I created a domain user and gave it dbo rights on the new database onSQL 2005 as well as administrative rights on the local machine and thenetwork. The task runs fine for a while and then it will fail tostart. I have looked in the event log as well as the SQL log and havenot found anything else that ran when my task failed. Once it hasfailed, if I manually run the vb script on the 2000 machine, it runsjust fine, but the schedule won't work. If I change the name of theuser that is running the scheduled task, it will begin working again.I have run the profiler on SQL 2005 and watched the scheduled tasklogin as the correct user and update the database. There is nopattern to when the scheduled task will stop running. This has beenhappening for a few days now.This script and scheduled task worked fine for over a year on themachine when it logged into SQL 2000 and nothing else has changed,which makes me think it is related to the SQL 2005 server. Any ideas?

View 1 Replies View Related

Accessing Oracle Data In Sql Server 2005

Feb 20, 2008

HI,
I need some help regarding the data access.
I needs to access some data from tables which are in oracle and load it into sql server tables.
Please let me know the process for this.

Thanks in advance.

View 2 Replies View Related

Accessing Password_hash By Users In SQL Server 2005

Feb 28, 2007

In SQL Server 2000 we had a view that would show the user credentials and the password hash. The reason we need this is that we use SQL Server authentication on the database. To test users, we have a login with little access, and it should be able to see the view and compare the password supplied against what is in the database, and then let the code handle a graceful exit if the password is invalid. I am trying to do this with SQL Server 2005, and I am running into trouble. I am trying to do this with a function, since there I can set the EXECUTE AS clause (in theory) and leverage the privlidges of a specific user in the database. Here is an example function:




CREATE FUNCTION check_acct.fn_allusers (@test int)
RETURNS @users table (username varchar(50), passwd varbinary(256))
WITH EXECUTE AS caller
AS
BEGIN
INSERT @users
select name, password_hash from sys.sql_logins
RETURN
END
GO
GRANT SELECT ON fn_allusers TO user_acct

I cannot get to all rows in the sys.sql_logins table unless I first:



GRANT VIEW ANY DEFINITION TO CHECK_ACCT



then when I call this function from CHECK_ACCT, I am able to see the data. If I change the WITH EXECUTE AS 'CHECK_ACCT' and execute thsi function from USER_ACCT, I do not get the same results. Do functions not inherit VIEW DEFINITION proivlidges? Any suggestions on how to do this but limit access to these secure objects to this one function?



View 4 Replies View Related

Accessing SQL Server 2005 From C# Using Multithreaded Application

Apr 18, 2007

I have a C# program that access SQL Server 2005. The program have 4 threads that performs the same method and are used only to improve performance of the system
The C# accesses the SQL Server using OleDbConnection and

OleDbCommand classes. Sometimes (very rare) I get exception to method ExecuteNonQuery() with message: "Table does not exist.".
The command text for the query is a constant string in the format: "insert into my_table€¦".
Can any one tell me what could be the problem?

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved