Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

connect Database server Expand / Collapse
Author
Message
Posted Monday, January 28, 2008 11:11 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Wednesday, October 14, 2009 1:56 AM
Points: 438, Visits: 754
Hi All,

How to connect Database server(local) through Query?

---
Post #448685
Posted Monday, January 28, 2008 11:29 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 2:09 PM
Points: 2,035, Visits: 1,655
If you're on the machine that has SQL Server on, and there's a default instance, try one of the following:

sqlcmd /E

for integrated security, or

sqlcmd /Uusername /Ppassword

for SQL Server security. If there's a named instance you want to connect to, add

/S./instancename

Hope this helps - sqlcmd /? will give you all the options.


Paul Randal
CEO, SQLskills.com: Check out SQLskills online training!
Blog:www.SQLskills.com/blogs/paul Twitter: @PaulRandal
SQL MVP, Microsoft RD, Contributing Editor of TechNet Magazine
Author of DBCC CHECKDB/repair (and other Storage Engine) code of SQL Server 2005
Post #448693
Posted Thursday, March 11, 2010 4:53 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, April 13, 2010 7:07 AM
Points: 2, Visits: 6
Hi, I am new to SSRS and I am using 2005 version.

http://www.sqlservercentral.com/articles/Development/2945/

I tried the solution to use dynamic connection string. I followed the instrunctions as stated and the report works fine when I hard code the server and database. But once I switch it (to use parameters for the server and database) and deploy, it does not run.

I am using a stored proc to retrieve the data for the report.

="Data Source=" & Parameters!Server.Value & ";Initial Catalog=" & Parameters!Database.Value

I get the following error...

An error has occurred during report processing. (rsProcessingAborted)
Error during processing of the ConnectString expression of datasource ‘RptData’. (rsDataSourceConnectStringProcessingError)

Can someone help me out?

Post #881422
Posted Friday, March 12, 2010 8:08 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, April 13, 2010 7:07 AM
Points: 2, Visits: 6
Hi. I figured out the problem and it is working now.

The server and database parameters must come before any other parameter the report is expecting.
Post #881812
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse