Solved

Microsoft SQL Server Data Source Set Up On ColdFusion and How To Do It

Posted on 2007-11-20
23
165 Views
Last Modified: 2013-12-24
I'm in the ColdFusion Administrator and it requires the following information to set up a data source for SQL...

CF Data Source Name
Database
Server
Username
Password
Description

The information I'm mostly unsure about is DATABASE, SERVER and DATA SOURCE and exactly where I get this information. I've tried the usual names and database name but for some reason it doesn't work.

This is the line in the summary window in SQL
ZYPHER\SQLEXPRESS (SQL Server 9.0.3042 - ZYPHER\HP_Administrator)

My Database name is...
SC  (short for shoppingcart)

password etc I'm sure I know if I can get into SQL management I must know it or is it different per database.
0
Comment
Question by:Ryan Bayne
  • 11
  • 9
  • 3
23 Comments
 
LVL 52

Expert Comment

by:_agx_
ID: 20325373
> for some reason it doesn't work

What settings did you use?

What error did you get?
0
 
LVL 2

Author Comment

by:Ryan Bayne
ID: 20325379
OK Just realised I used 'Windows Authentication' for sign in. Its MySQL I use a password and user name for so at the moment I have no idea what they could even be!!!

Bumping up the points because I'm racing towards a university deadline and need this working lol

cheers
0
 
LVL 52

Expert Comment

by:_agx_
ID: 20325395
I don't know what else to tell you unless you can answer the questions above :-)

Good Luck
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 2

Author Comment

by:Ryan Bayne
ID: 20325407
There's a datasource 'Summary' after you add the datasource. The summary is highlighted in orange and has error in the the far right column.

The page itself obviously results in  Data source SC could not be found. I've tried using numerous different settings but on first guess I used something like...

CF Data Source Name: SC
Database: SC
Server: localhost
Username: root
Password: ###########
Description: N/A

I considered Server being 9.0.3042
and username being ZYPHER

no luck however
0
 
LVL 2

Author Comment

by:Ryan Bayne
ID: 20325414
lol I added my comment at same time as you qxl so that was just an update ;)

I gota say I've learned plenty from u guys I wish you I paid you my university tutor fee's!
0
 
LVL 30

Expert Comment

by:nmcdermaid
ID: 20325449
>> Its MySQL

Is it MySQL or SQL 2005 that you are using?
0
 
LVL 2

Author Comment

by:Ryan Bayne
ID: 20325460
SQL 2005
0
 
LVL 52

Expert Comment

by:_agx_
ID: 20325465
lol.  Timing is everything.

So you've created a database named SC.   Did you also create a sql server login named "root"?

For "Server" try either the IP address:  127.0.0.1  or  (localhost)  -- note the parenthesis around it
0
 
LVL 2

Author Comment

by:Ryan Bayne
ID: 20325470
Missed a bit, Port is 1433! Which I get the feeling is not correct or is that ok.
0
 
LVL 52

Expert Comment

by:_agx_
ID: 20325475
The default port is _usually_ 1433, so that should be okay.
0
 
LVL 2

Author Comment

by:Ryan Bayne
ID: 20325480
No I never set up any login at all, its login in through "Windows Authentication" which is what is confusing me on the password and user name situation
0
 
LVL 2

Author Comment

by:Ryan Bayne
ID: 20325488
Tried my IP that is dislayed and your one 127.0.0.1  and local host neither work in the current settings!

And I also tried user name and password blank..surprise doesnt work lol
0
 
LVL 52

Expert Comment

by:_agx_
ID: 20325496
I don't normally use windows authentication, but I think you leave user/password blank for windows authentication.
0
 
LVL 52

Expert Comment

by:_agx_
ID: 20325499
What do you mean doesn't work?
0
 
LVL 52

Accepted Solution

by:
_agx_ earned 425 total points
ID: 20325526
1) Have you enabled TCP/IP ?

2) Did you temporarily turn off any firewalls (they can prevent CF from connecting)

You might also want to look at these two articles
http://kb.adobe.com/selfservice/viewContent.do?externalId=kb400255&sliceId=1
http://www.mattwoodward.com/blog/index.cfm?commentID=211
0
 
LVL 2

Author Comment

by:Ryan Bayne
ID: 20325586
Enabled TCP/IP where?

and nope no firewall changes
0
 
LVL 2

Author Comment

by:Ryan Bayne
ID: 20325639
Well there has been a change in the ColdFusion error after doing what those pages said however the ColdFusion summary for datasource still shows error. I'm going to assume now it is a password and user name issue and probably another question because I set a user up and it doesnt work so I have no idea

Thanks for that
0
 
LVL 2

Author Comment

by:Ryan Bayne
ID: 20325642
Error Executing Database Query.
SQLException occurred in JDBCPool while attempting to connect, please check your username, password, URL, and other connectivity info.
 
The Error Occurred in C:\CFusionMX\wwwroot\SC2\Application.cfm: line 19

17 :             insert into Clients(int_CFID, txt_CFTOKEN)
18 :             values(#CFID#,'#cftoken#')
19 :     </cfquery>
20 :
21 :     <cfquery name="queryGetClientIDValue"
0
 
LVL 52

Expert Comment

by:_agx_
ID: 20325762
> however the ColdFusion summary for datasource still shows error.

What was that error message?  Its probably more accurate than the error you get from the query.
0
 
LVL 2

Author Comment

by:Ryan Bayne
ID: 20326021
I'm accepting this solution because the issue now is defining the correct password and username which in itself is another question as at no point during set up does it request a user name and so that leaves a beginner like me confused.

Thanks once again for your great help
0
 
LVL 30

Expert Comment

by:nmcdermaid
ID: 20326349
>> No I never set up any login at all, its login in through "Windows Authentication" which is what is confusing me on the password and user name situation

When you log in under windows authentication it logs in under whatever using is running the process.

So you need to find out what that user is and add it as a login to SQL Server, then give it access to the database.
0
 
LVL 30

Expert Comment

by:nmcdermaid
ID: 20326352
.. so what windows user is the internet server service running under? You need to add that windows user as a login and give it access to the database.
0
 
LVL 52

Expert Comment

by:_agx_
ID: 20330006
nmcdermaid is correct.  By default ColdFusion usually runs under the "system" account.  If that account does not have sufficient permissions, you can change it by going into control panel > services > click the Log On tab  . Then change the account ColdFusion runs under from "Local System Account" to whatever windows account you want.

Or you could add a sql server login and use sql server authentication that instead.  This assumes you've enabled "mixed mode" authentication.  Of course you would also need to enter the sql server user login/password in the datasource screen.
0

Featured Post

Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Domino Website - Redirection 12 84
SQL query with cast 38 51
SQL Server Configuration Manager WMI Error 11 16
Need help in debugging a UDF results 7 16
So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question