ColdFusion caching SQL Server credentials?

I have been using ColdFusion's storedProc() service for a while with no issue.  However, I have run into a scenario where I have a local stored procedure executing a remote stored procedure.  When I attempt this via ColdFusion, I receive a very cryptic error:
The DBMS has returned the command code 224...
The following is the code I am using:
variables.storedProcService = new storedProc();
variables.storedProcService.clear();
variables.storedProcService.setAttributes(datasource="DATASOURCE", procedure="STOREDPROCNAME");
variables.storedProcService.addParam(cfsqltype="CF_SQL_INTEGER", type="in", value=0);
variables.storedProcService.execute();
However, executing the exact same procedures from SQL Server Management Studio results in no issues.
Then, when I use the following code:
variables.storedProcService = new storedProc();
variables.storedProcService.clear();
variables.storedProcService.setAttributes(datasource="DATASOURCE", procedure="STOREDPROCNAME", username="USERNAME", password="PASSWORD");
variables.storedProcService.addParam(cfsqltype="CF_SQL_INTEGER", type="in", value=0);
variables.storedProcService.execute();
The execution runs without issue.  My question is this, does ColdFusion cache SQL Server/Datasource credentials?  Why does it [seem to] not use the credentials I provided in Jrun?

HiTopp wrote:
variables.storedProcService = new storedProc();
variables.storedProcService.clear();
variables.storedProcService.setAttributes(datasource="DATASOURCE", procedure="STOREDPROCNAME", username="USERNAME", password="PASSWORD");
variables.storedProcService.addParam(cfsqltype="CF_SQL_INTEGER", type="in", value=0);
variables.storedProcService.execute();
The execution runs without issue.
I can actually just include the password attribute and the stored procedure runs just fine.

Similar Messages

  • Using SQL Server credentials with Secure Store Target Application for Data Connection in Dashboard Designer

    [Using SharePoint 2013 Enterprise SP1]
    I would like to use SQL Server credentials in a Secure Store Target Application, and
    this page makes it look like it's possible but when I attempt to use the new Target Application ID as authentication for a Data Connection in Dashboard Designer, I get a generic "Unable to access data source" with no error logged in SQL Server
    logs.
    I am able to use a Target Application with AD credentials to access the SQL db without a problem. Suggestions?

    Hi,
    1. Make sure that the credential is set to
    Secure Store Target Application. Navigate to the Central Administration. Click on the
    Application Management. Click on the Manage Service Applications. Click on the
    Secure Store Service Application. Select the application ID and from the ECB menu click on the
    Set Credentials. Enter the Credential Owner, Windows User Name and the
    Windows Password.
    2. Make sure that in the Dashboard Designer “Use a stored account” is selected in the “Authentication” and the proper application ID is mentioned.
    Please refer to the link below for more information:
    http://www.c-sharpcorner.com/Blogs/14527/unable-to-access-data-source-the-secure-store-target-applic.aspx
    Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected] .
    Rebecca Tu
    TechNet Community Support

  • Coldfusion - Microsoft SQL Server Traffic Encryption

    Hi,
         have someone tried/managed to encrypt traffic from coldfusion to SQL Server?
    Please share if you don't mind
    Thanks

    I've not used the SSL features of JDBC but you might start in the documentation.
    With bundled CF drivers
    http://help.adobe.com/en_US/ColdFusion/9.0/Admin/WS70f0d54f063b9b08238ab6dc122b1a20785-800 0.html
    If you are using the Microsoft JDBC driver, not the one bundled with CF.
    http://msdn.microsoft.com/en-us/library/bb879935%28SQL.90%29.aspx
    You *may* need to import your SSL certificate so that it will be recognized
    http://go.adobe.com/kb/ts_kb400977_en-us

  • Coldfusion and sql server reports

    hi all,
    we wish to have a reporting tool that goes well with coldfusion. we wish to use sql server reporting with coldfusion. can anyone provide some examples for this. i have seen integration only for crystal reports and report builder. does it support sql server reporting too. please help......

    If I had ever used SQL Server reporting I would have said something...
    But you are embarking on an unusual task and unusual tasks are not usually done be lots of people.
    So how does SQL server reporting work?  What does it produce?  How do you want to tie into it?  What do you want to happen?
    With all the ways one can tie into other services through ColdFusion and its underlining Java, I suspect there might well be some way to do something.  Wether that something is good enough and|or simple enough to be worth the effort I can not say and will require a good amount of knowlege on how SQL server reporting actually works.

  • Connect coldfusion with sql server

    HI everybody
    I need to know if i can  use sql server as a database and coldfusion as the webpage interface builder???? Can these 2 program work together (be connected to each-other)?? if yes can anybody explain how it  can be done or any link or something???????????                                                                                                 
    thnx in advanced
    aldo

    In addition to Ken's suggestion, you might want to look at how datasources work: http://livedocs.adobe.com/coldfusion/8/htmldocs/datasources_ADV_MJS_01.html.
    But, to be honest, this is such a fundamental question to be asking, I think you pretty much need to get hold of the CFWACK and read that: http://www.amazon.co.uk/Adobe-ColdFusion-Web-Application-Construction/dp/032151548X.
    Or take a Fast Track to ColdFusion course or something.
    Adam

  • SQL Server 2008 self-signed certificate is 1024bit or 2048bit?

    When there is no user defined certificate available, SQL Server will generate a self-signed certificate when service starts, We have a tool scans and finds that in SQL 2005 the self-signed certificate is 1024bit,  does someone know the default self-signed
    certificate is still 1024bit or is it 2048bit in SQL 2008? Thanks a lot!!!

    I will begin my answer by making an emphasis that the best way to protect your data in-transit is using a 2048 bit certificate signed by a trusted certificate authority (CA) instead of relying on the self-signed certificate created by SQL Server.
     Please remember that the self-signed certificate created by SQL Server usage for data in-transit protection was designed as a mitigation against passive traffic sniffers that could potentially obtain SQL Server credentials being transmitted
    in cleartext, but nothing more. Think of it as a mitigation against a casual adversary.
     The self-signed certificate usage was not intended to replace real data in-transit protection using a certificate signed by a trusted CA and encrypting the whole communication channel. Remember, if it is self-signed, it is trivial to spoof.
    After making this clarification, the self-signed certificate generated by SQL Server uses a 1024 bit key, but that size may be subject to change in future versions of the product. Once again, I would like to strongly discourage relying on the self-signed
    certificate created by SQL Server for data in transit transmission.
    BTW. Azure SQL Database uses a 2048 certificate issued by a valid certificate authority.
    I hope this information helps,
    -Raul Garcia
     SQL Server Security
    This posting is provided "AS IS" with no warranties, and confers no rights.

  • MS SQL Server 2000 Problem to Connect

    Hi There
    I have a problem with MS SQL Server 2000 with Service Pack 3 and JDBC from Microsoft
    My tools are:
    - Windows 2003 Server Standart Edition
    - MS SQLServer 2000 with ServicePack 3
    - JDBC from Microsoft with ServicePack 3
    I want to connect in the database using JDBC.
    At first time, I follow the example to chance the authentication of SQL
    Server
    http://www.banmanpro.com/support/sql2k.asp
    Now, when I will try out to connect in the SQL Server, I receive this error
    message
    java.sql.SQLException: [Micro$oft][SQLServer 2000 Driver for
    JDBC][SQLServer]Login failed for user 'Administrador'.
    I'm trying to connect in SQL Server using my Windows Account, in other
    words, I'm using the ADMIN account of Windows and which was registered in
    the SQL Server.
    In then DriverManager.getConnection line from Java, the Username and
    Password is same the operation system, but I receive the error below.
    Maybe Can you help me please?

    You can't log in using Windows credentials using the MS driver (yes, I know that sounds kind of funny). Use jTDS for that, if you really need it (or if you encounter any other problems with the MS driver). Otherwise log in using SQL Server credentials (try with user sa and blank password if not sure).
    Alin.

  • I want to impersonate user when I access Microsoft SQL Server from powershell

    Hi,
    Actually I have to perform some SQL operation on my MSSQL server database. but problems is that I have given all credentials (windows fix login/password which can access database) in connection string. but when I execute the script then it is always using
    my windows login and password and then giving error that not able to connect with it.
    My personal windows credentials does not have access to my enterprise database that is why I am using service ID.
    I came to know that I have to do user impersonation of user when i access database but how to do that?? can you guys give me the syntax for that as i have to perform all sql operation using impersonation.
    Please reply me as soon as possible as i stuck since long
    Vipul Mistry Sr. Embedded Engineer www.eInfochips.com

    Hi Guys,
    thanks a lot for your support and replies but I found the solution. With below code i was able to do my task and I used $AuthType =3 for my purpose. Hope this will help others also.
    $varDBServer = "N0SQL104,1675"
    $varDBInstance = ""
    $varDBSchema = "Data_Dev"
    $varDBUser = "S0060VMSD"
    $varDBPassword = "SDCFG345D"
    #### Choose authentication type (0=SSO, 1= SQL, 2=Domain)
    $AuthType = 3
    #### Load the required assembly for sql server administration
    #### Requieres SQLServerNativeClient, SQLSysClrTypes and SharedManagementObjects
    [reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo") | Out-Null
    $varSQLServer = New-Object -typeName Microsoft.SqlServer.Management.Smo.Server -argumentList "$varDBServer\$varDBInstance"
    switch ($AuthType) {
    1 {
    #### Access the SQL-Server with your current credentials (pass-through)
    $varSQLServer.ConnectionContext.LoginSecure = $true
    2 {
    #### Access the SQL-Server with SQL-Server credentials in mixed mode authentications
    $varSQLServer.ConnectionContext.LoginSecure = $false
    $varSQLServer.ConnectionContext.Login = $varDBUser
    $varSQLServer.ConnectionContext.Password = $varDBPassword
    3 {
    #### Access the SQL-Server with given domain user credentials
    $varSQLServer.ConnectionContext.LoginSecure = $true
    $varSQLServer.ConnectionContext.ConnectAsUser = $true
    $varSQLServer.ConnectionContext.ConnectAsUserName = $varDBUser
    $varSQLServer.ConnectionContext.ConnectAsUserPassword = $varDBPassword
    } default {
    Write-Host "Please select an authentication type: 0=SSO, 1= SQL, 2=Domain"
    exit -1
    #### Try connection to SQL-Server with given parameters
    Write-Host "`nTry connection to SQL-Server with given parameters`n"
    try {
    $varBuildOfSQLServer = $varSQLServer.Version.get_Build()
    Write-Host "Build of SQL-Server '$varDBServer' is $varBuildOfSQLServer"
    } catch {
    Write-Host "ERROR: Cannot access SQL-Server '$varDBServer'. Exit script!"
    exit –1
    Vipul Mistry Sr. Embedded Engineer www.eInfochips.com

  • CF Hash and SQL Server

    Hi,
    Basically,  I receive a hash of a pk and would like to compare that hash value a pk in SQL Server.  There is no stored hash value in that table.  So I have to use CF function Compare to compare while looping the whole table.  As a result, it's slow down.  Is there any functions in SQL server or something that I can get a quicker comparison result?
    Here is basically the loop of the table and comparing.
    <cfquery name="name">
         SELECT id
         FROM tbl
    </cfquery>
    <cfloop query="name">
         <cfset hashID = HASH(name.id,"SHA")>
         <cfif COMPARE(url.id,hashID) EQ 0>
              [do something]
         </cfif>
    </cfloop>

    Not sure which version of SQL Server you are using, but take a look at the HashBytes function.  You could then do:
    <cfquery name="name">
         SELECT id
         FROM tbl
         WHERE HashBytes('SHA', id) = <cfqueryparam value="url.id" cfsqltype="CF_SQL_VARCHAR">
    </cfquery>
    <cfif name.RecordCount>
              [do something]
    </cfif>
    I'm not sure if "CF_SQL_VARCHAR" is the right cfsqltype, or if it needs to be "CF_SQL_BLOB" (I think hashes are still essentially text, but SQL Server returns a VARBINARY from HashBytes).
    EDIT: Make sure that ColdFusion and SQL Server are producing the same results, as they use different hashing libraries.  Also, if you are hashing the table id in the URL for security, SHA is a pretty weak hashing algorithm.  If you are using SQL Server 2012 or above, you should consider bumping that up to at least SHA-256 (SHA2-256 on the SQL Server side).
    -Carl V.

  • Sql server reporting services and coldfusion

    I want to using sql server reporting services ,and create report after i want to call this reports in my coldfusion page.is it possible

    Hi,
    Please try setting the credentials of the datasource.
    1. Double click and open the datasource in your project.
    2. Click on the credentials tab, and click on option button 'Use this username and password'
    3. Enter the username and password to connect to the datasource
    4. Deploy or upload the datasource to the report server and try accessing the reports.
    Hope this helps.
    Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful.
    BH

  • Data Compression in ColdFusion 9 for SQL Server 2008

    Hi,
    I need to store fairly large blocks of HTML text in SQL Server (I won't go into why, unless necessary).
    Unfortunately even after stripping out the white space, the text string gets so long that the INSERT/UPDATE query times out.
    I'm looking for a way to compress that text on the fly and send over just the compressed string.  Then uncompress it when it's retrieved from DB.
    The only way I can think of doing it is using CFZIP to create a temporary zip file, then read it in and send that binary string to SQL Server.  But I don't know if that'll speed things up any, cause of all the file operations.  Ideally I would just do it in memory.
    I also looked into GZIP for ColdFusion, but I don't think there is much difference.
    Any suggestions?

    I don't really want to go into too many details as to why, but in this particular scenario just caching the page doesn't work.
    It's used by TV talent to view scores, and has to be almost instant.  The scores are coming in from 100 different sources constantly, so if I cache, then the first user who gets to that page has to wait too long for it to load, and I have to keep clearing the cache like every 5 sec. Plus it's on a clustered server, so what I'm doing is I'm doing all the heavy lifting in a separate process that might even run on a different server, and then simply getting the generated HTML from SQL.
    When a score comes in it triggers an EventGateway that runs a process to generate all different variations of screens for TV talent in the background.
    Then when TV talent looks at any screen in loads instanly cause there are no calculations to be done, and the data is only delayed by how long the process takes.  The actuall process is about 10 sec, but it's getting slowed down a lot because the query that sends the HTML over to SQL Server to store, is HUGE.
    If I can compress that HTML and store the compressed text, then when I do the SELECT from SQL uncompress it and send it back to the users, that would work just fine.
    But I can't figure out how to compress text in ColdFusion.  I'm trying to do GZIP but it's not working.
    Please let me know if you know how to compress a long string in ColdFusion using either GZIP or any other method.
    Thanks.

  • ColdFusion caching WSDL credentials

    We are running ColdFusion 9 (version 9.0.1.274733) on Windows 2003 with IIS 6.  The server is shared across a few different groups within our organization each with more than one active development project currently underway. 3 of the projects are attempting to consume a .Net webservice hosted on another server.  The webservice is using basic authentication to identifiy who is accessing the service.  Our problem is that when ColdFusion accesses the service the first time it caches the WSDL proxy/stubs along with the username and password.  This presents a problem when the next application attempts to access the service.  The second attempt can access the service but since ColdFusion is using the credentials ofthe first application the second application gets permission problems from the application behind the service.  Example is application A hits the service with username A this is followed by application B with username B but IIS sees username A, application C does the same thing, IIS sees the access attempt with username A.  If we clear the WSDL from the admin or use the refreshWSDL attribute it works one time, with subsequent access attempts using the first set of credentials.  Forcing each application to always use the refreshWSDL attribute kind of defeats the purpose of caching.
    So my question is this:
    Is there any way to get ColdFusion to NOT cache the username/password information when it creates the stubs?

    Have you tried creating multiple named instances of the webservice via the cf administrator? I haven't tried it but it looks like you should be able to assign a different username/password to each instance.  Then in your code just instantiate it by the name rather than the wsdl url, eg.
    <cfset svc = createobject("webservice", "mywebsvc_appA") />

  • Using SQL Server in Window Authentification mode from Coldfusion

    I've received the following private message and don't know
    how to answer. Can anyone else help?
    quote:
    Is there any some simple way to use the sql server in windows
    authentication mode from coldfusion??? Other the creating the ODBC
    Socket.

    Hi Colum,
    get these quite often, which is why I turn PM off most of the
    time.
    Just send them to the right forum:
    http://www.adobe.com/cfusion/webforums/forum/index.cfm?forumid=1
    Cheers
    Craig

  • How to backup/restore credentials in sql server 2012

    Hi, Can any one direct how to restore credentials using T-sql or GUI on SQL Server 2012.
    As per BOL, we know how to create credentials. 
    http://msdn.microsoft.com/en-us/library/ms189522.
    But looking for taking backup/restore credentials sql serve 2012.
    Thanks

    Hi,
    I highly recommend to go from step 1 to the end in this tutorial, but if you realy want to just only to restore than you can start in Lesson 4: Perform a Restore From a Full Database Backup
    http://msdn.microsoft.com/en-us/library/jj852091(v=sql.110).aspx
      Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]

  • SQL Server 2005 and ColdFusion 7

    Hi all,
    I am using SQL Server 2005 and ColdFusion 7 (standalone) on
    XP 64 Bit. I was using the exact setup a couple of weeks ago, but
    had to reinstall my O/S due to hardware problems so am back to the
    beginning. I remember having a nightmare setting datasources up in
    the past, but did manage to find a solution.
    I have tried the following:
    SQL has TCP/IP Enabled
    SQL is set to Mixed Authentication
    SQL has a login set to the same as my Windows Username and
    password
    My database has a user (dbo) by the same name as the login
    set in SQL
    When I add a datasource in the administrator I enter the
    windows username and password (I have tried without either as
    well), the server name as localhost and the port as the default
    1433.
    I always get the following error:
    Connection verification failed for data source: DATABASENAME
    java.sql.SQLException: [Macromedia][SQLServer JDBC
    Driver]Error establishing socket. Connection refused: connect
    The root cause was that: java.sql.SQLException:
    [Macromedia][SQLServer JDBC Driver]Error establishing socket.
    Connection refused: connect
    Can someone offer any advice? This is driving me proper nuts.
    TIA,
    Paul

    when i did it, i had to update my jdbc driver
    http://msdn.microsoft.com/data/ref/jdbc/

Maybe you are looking for