Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...database access in DNNdatabase access in DNN
Previous
 
Next
New Post
3/2/2015 2:47 PM
 

This is the first time that I will be accessing an existing DNN application. Due to that fact, I have the following database questions:

1. Would you show me how to access the database connections that are setup in DNN?

2. Would you show me how to find and run the following kind of statements in a sql server 2012 database when accessed by DNN:

a. select,

b. insertt,

c. update,

d. delete,

e. stored procedures, and

f. functions?

 
New Post
3/2/2015 4:27 PM
 
1. DB Connection is stored in web.config.
2. unless you are using user instance DB (connedtion string contains "database.mdf"), you should be able to Connect to SQL Server using SQL Server Management Studio.
DNN accesses the database usually via stored procedures to prevent SQL injection. You will find hundreds of stpred procedures (and a few functions) in the database, besides tables and views.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
3/2/2015 4:57 PM
 
Thanks for your response so far!

I have the following additional questions to ask based upon your answers:
1. 'DB Connection is stored in web.config'. Can you tell me the path of where I can find the web.config file?
2. 'You should be able to Connect to SQL Server using SQL Server Management Studio'. Would you show me how to connect to sql server management studio 2012 a way DNN accesses the database? I know how to use SQL Server Management Studio but I do not know how DNN accesses the database.






DNN accesses the database usually via stored procedures to prevent SQL injection. You will find hundreds of stpred procedures (and a few functions) in the database, besides tables and views.
 
New Post
3/3/2015 3:18 AM
 
1. web.config file resides in the root of the application folder (root folder of the IIS website, if DNN is not installed in a subfolder)
2. in connection string, you'll find the login credentials for sql server. unless you are using integrated security, you should be able to use same account to access the database in SSMS. On the database node, you may open a new query and type "EXEC MyProcedure Params" to call stored procedures the way DNN does. If you are using a commercial version of SQL Server Tools, there should be a link to SQL profiler in SSMS Menu Tools, where you may follow the calls being made with associated parameters.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...database access in DNNdatabase access in DNN


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out