SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


connect Database server


connect Database server

Author
Message
SqlUser-529296
SqlUser-529296
SSChasing Mays
SSChasing Mays (626 reputation)SSChasing Mays (626 reputation)SSChasing Mays (626 reputation)SSChasing Mays (626 reputation)SSChasing Mays (626 reputation)SSChasing Mays (626 reputation)SSChasing Mays (626 reputation)SSChasing Mays (626 reputation)

Group: General Forum Members
Points: 626 Visits: 754
Hi All,

How to connect Database server(local) through Query?

---
Paul Randal
Paul Randal
Hall of Fame
Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)

Group: General Forum Members
Points: 3601 Visits: 1717
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
not.agan
not.agan
Grasshopper
Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)

Group: General Forum Members
Points: 12 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?
not.agan
not.agan
Grasshopper
Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)

Group: General Forum Members
Points: 12 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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search