Showing posts with label connection. Show all posts
Showing posts with label connection. Show all posts

Friday, March 23, 2012

Is it possible to enable TCP/IP connection to SQL Server programmatically? Is there any function

Anyone know? I'm making an installation package and I want my installation program (which is a custom action class inherited from Installer Class) to adjust the network configuration of SQL Server, for example enable TCP/IP. What can I do? Is that any function in SMO package that can do this for me?Hi,

that is a registry setting, you have to switch the appropiate network protocol values in this section to get it working:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer\SuperSocketNetLib

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

Is it possible to enable TCP/IP connection to SQL Server programmatically? Is there any func

Anyone know? I'm making an installation package and I want my installation program (which is a custom action class inherited from Installer Class) to adjust the network configuration of SQL Server, for example enable TCP/IP. What can I do? Is that any function in SMO package that can do this for me?Hi,

that is a registry setting, you have to switch the appropiate network protocol values in this section to get it working:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer\SuperSocketNetLib

HTH, Jens Suessmeyer.

http://www.sqlserver2005.desql

Monday, March 19, 2012

Is it possible to change the connection dynamically.

Hi guys,
We have 2 database one in US another in UK. I am developing 2 reports one
for US and another for UK..
Is there any way to pass/give the connection dynamically?
Regards,
SriOn Apr 26, 11:22 am, Sriman <Sri...@.discussions.microsoft.com> wrote:
> Hi guys,
> We have 2 database one in US another in UK. I am developing 2 reports one
> for US and another for UK..
> Is there any way to pass/give the connection dynamically?
> Regards,
> Sri
The only options I can think of are:
- Have a report parameter (possibly hidden) passed to the query/stored
procedure that is sourcing the report and based on that parameter,
select the correct database (via opendatasource, etc).
- If an ASP.NET application is an option, dynamically set the desired
datasource as part of a custom RDL building process (dynamically) as
part of the <Datasources><Datasource Name="SomeDatasource"></
Datasource></Datasources> tags.
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||So one report connects to US with US database and the other connects to UK
database is it right ? then while creating dont use shared data source
instead create a seperate data source from data tab for each server and each
report.
Sounds simple. Let me know if my understanding is right
Amarnath
"Sriman" wrote:
> Hi guys,
> We have 2 database one in US another in UK. I am developing 2 reports one
> for US and another for UK..
> Is there any way to pass/give the connection dynamically?
> Regards,
> Sri|||wow..both options sounds good to me.
Thanks alot ..
Regards,
Sri
"Amarnath" wrote:
> So one report connects to US with US database and the other connects to UK
> database is it right ? then while creating dont use shared data source
> instead create a seperate data source from data tab for each server and each
> report.
> Sounds simple. Let me know if my understanding is right
> Amarnath
> "Sriman" wrote:
> > Hi guys,
> >
> > We have 2 database one in US another in UK. I am developing 2 reports one
> > for US and another for UK..
> > Is there any way to pass/give the connection dynamically?
> >
> > Regards,
> > Sri|||On Apr 27, 8:06 am, Sriman <Sri...@.discussions.microsoft.com> wrote:
> wow..both options sounds good to me.
> Thanks alot ..
> Regards,
> Sri
> "Amarnath" wrote:
> > So one report connects to US with US database and the other connects to UK
> > database is it right ? then while creating dont use shared data source
> > instead create a seperate data source from data tab for each server and each
> > report.
> > Sounds simple. Let me know if my understanding is right
> > Amarnath
> > "Sriman" wrote:
> > > Hi guys,
> > > We have 2 database one in US another in UK. I am developing 2 reports one
> > > for US and another for UK..
> > > Is there any way to pass/give the connection dynamically?
> > > Regards,
> > > Sri
You're welcome. Let me know if I can be of further assistance.
Regards,
Enrique Martinez
Sr. Software Consultant

Monday, March 12, 2012

Is it possible run C# .net Standard against SQL Server 2000?

Hi all!

I keep getting an error when I try and create a new data connection. This is the error I'm getting:

Unable to connect to database.
It is only possible to connect to SQL Server Desktop Engine databases and Microsoft Access with this version of Visual Studio.

I can connect to Access without any problems. Is there anyway around this?
I'm using C# .net Standard with SQL Server 2000.

Thanks for any help.>>It is only possible to connect to SQL Server Desktop Engine databases and Microsoft Access with this version of Visual Studio.

What version?? "C#.net standard" ??

What version of the .NET framework are you using? What IDE are you using?|||Thanks ehorn for reply

I'd like to runVisual C#.net 2003 Standard IDE against SQL Server 2000

I'm using Framework 1.1|||Given that you say this is the error:

Unable to connect to database.
It is only possible to connect to SQL Server Desktop Engine databases and Microsoft Access with this version of Visual Studio.

I imagine that the problem is exactly what it says. That is, the version you are using will NOT allow you to access SQL Server. However, if you install the MSDE on your machine (which is binary compatible with SQL Server) you will be able to access that.|||Thanks Douglas for reply!

It was exactly what I did but now trying to install MSDE I'm getting the error:
'The instance name specified is invalid.'

Will I have to remove SQL Server first then try again?|||I expect so, or alternately, specify an instance name while installing MSDE.

Is it possbile to define Database server and web server on different machine (Not same phy

Hi All,

Is it possbile to define connection string for web and database server which is running on different machine. Note( Not same LAN).

E.g (My Web Server is in London and Database server in Sydney).

Please can any one help me.??

Thanks in advance...

Dj

They dont need to be on the same LAN, but you'll still need a viable WAN link.

To connect you could use the remote servers IP address with sql credentials.

data source=192.x.x.x;initial catalog=yourDatabase;user id=yourUsername;password=yourPassword;

Is it posiable to close the screen

Hai

Is it possiable to close the current connection screen in the query
analyser , not to close the query analyser.

With Thanks
RaghuControl+F4 or click the window close button.

--
David Portas
SQL Server MVP
--

"Raghuraman" <raghuraman_ace@.rediffmail.com> wrote in message
news:66c7bef8.0402150118.44139866@.posting.google.c om...
> Hai
> Is it possiable to close the current connection screen in the query
> analyser , not to close the query analyser.
> With Thanks
> Raghu|||
Dear Portas

Thanks for your suggestions. Actually i meant that query thru code .

Eg

The shutdown command(sql server7.0) removes the network connection from
sqlserver.Like wise is there any command to close the current screen of
the query analyser.

With thanks
Raghu

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!|||No. Transact SQL isn't an application development language - it doesn't
control the client GUI at all.

Use another language to execute your SQL or, if you want to run some batched
process without a GUI, run the OSQL utility from the OS command line.

--
David Portas
SQL Server MVP
--

Monday, February 20, 2012

Is data sent via DTS encrypted?

Hi all,

I may have a requirement to send data from a SQL Server at site A to an Oracle server at site B. These sites have no network connection between them, and the current suggestion is to use ftp, but the transfer (or username and password) will not be encrypted.

If I create a DTS package transferring data from site A, will that transfer be encrypted?

If not, is there an option with SQL Server DTS to ensure that the data is sent in an encrypted form?

Thanks in advance.No, data isn't automagically encrypted when using DTS. You can use a secure (VPN) link that will encrypt the data. You can put the data into a file and encrypt the file (if you do, compress it first to improve security). You can even create an encryption/decryption DTS task (using VC) and make that part of your DTS toolbox.

-PatP|||Thanks Pat.

Not sure that secure VPN is an option to be honest I'm afraid.

The current favourite is actually to ftp an encrypted .csv, I just wondered if DTS could handle the encryption and make my life easier :-)

BTW, what is VC ( or am I just having a blonde moment? )|||VC is Visual C, part of Microsoft's Visual Studio.

The only way I know to add new tasks to DTS is to write them in Visual C. This allows all kinds of interesting things to happen!

Blonde moments are expected, at least now and then. Unfortunately, I don't have blonde hair (heck, I don't have much hair), so I have to attribute those moments to other things... I'm not quite to the point where I can comfortably attribute them to senior moments yet, although from an IT perspective I'm already somewhat older than dirt!

Yes, go ahead and create the CSV file, then use an Execute Process (effectively a command line) Task to handle the encryption.

-PatP|||Thanks for all the advice Pat. I'll investigate that process.

I too am quite far from blonde, but hey, we all have the moments :-)|||Unless I'm having a Blonde moment I'm almost certain DTS tasks can be written in C# and VBScript (the tools I've used) just to name a few.|||I only know how to create a new task that you can add to the DTS designer Task Panel using Visual C. You can certainly add steps to a DTS package using C# or VBScript, but that is a completely different thing in my opinion.

-PatP|||Why not just create a stored procedure?|||There are more ways to skin that cat than there are cats, but that is no reason to stop looking for new ways!

A script or stored procedue would be easy to implement. A custom task would be more efficient to use, since you could for instance just create a step that generated your data, then feed it to the task just like you do with the FTP task.

I did something like this to move data to our mainframe using the 7.0 EM a while ago, and the task was wildly popular with our power users. It just saved them a lot of monkeying around for a task that they did rather frequently.

-PatP|||I only know how to create a new task that you can add to the DTS designer Task Panel using Visual C. You can certainly add steps to a DTS package using C# or VBScript, but that is a completely different thing in my opinion.

-PatP

Ah.. yes. Your looking to make a new task for the DTS toolbar. I missed that. C# could probably handle it but I have doubts about scripting languages.