Showing posts with label net. Show all posts
Showing posts with label net. Show all posts

Friday, March 30, 2012

Load Data using ADO.NET in SSIS

Hi,

How to extract and Load Data using ADO.NET in SSIS.i hope to extract data we have DataReader source .but how to load (Insert) data with ADO.NET ?.and is ADO.Net quicker than OLEDB ?

Thanks

Jegan.T

Where are you loading it to? SqlServer and OleDB Destinations will be the easiest, and most performant since they will do a bulk insert.|||

Sean,

Thanks for the Informations.But still as a part of our analysis .we need to load in to Oracle Database. can i know how to load data using ado.net .

Thanks

Jegan.T

|||

Jegan,

you can use .NET, Ole DB or ODBC providers to load data in to Oracle Databases, and these are all possible via ADO.NET.

Both Microsoft and Oracle, as well as other 3rd party vendors have Ole DB, .NET and ODBC connectors for Oracle databases. It all depends on your requirements on what version of Oracle and what features you'd like in your connection.

We recommend our customers to use Oracle's OleDB provider, and ODBC providers could be a bit slower, because SSIS uses the .NET-ODBC bridge, not native ODBC connections for data source components.

Another option could be using the native ODBC provider inside the ExecSQL Task, load the recordset, and use it in the data flow task, which could be cumbersome to do.

I think your best bet would be to use Oracle's OleDB provider.

|||Deniz Thanks.

Monday, March 26, 2012

Load .RDL file in a Report

I have a .RDL file.
I need to show it as a Report in a internet Explorer using Asp.net.
Simply,
I have a .RDL File and using ReportServer i have to view .RDL in a Report
Format.
Thanx
Karthik.AToday you have to deploy the report to Reporting Services server. Then you
can use either URL integration or web services to integrate the report with
your app.
With version 2 there will be webform and winform controls but that will be
awhile until they are released.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Karthik" <Karthik@.discussions.microsoft.com> wrote in message
news:9D34BC28-B872-4C0E-9955-D2BAD8D6472C@.microsoft.com...
> I have a .RDL file.
> I need to show it as a Report in a internet Explorer using Asp.net.
> Simply,
> I have a .RDL File and using ReportServer i have to view .RDL in a Report
> Format.
> Thanx
> Karthik.A
>
>sql

Monday, March 19, 2012

List the System names has sql Server installed

hi,
I need to display the system names which has sql Server installed. How it can be done in vb.net.
Help me plz
regards
Somu

All things System are in the Master Database, spend some time with there are almost 1000 stored procedures in it, those and the tables are Microsoft Property try not to use them. Hope this helps.

Monday, March 12, 2012

List post with report

Im developing a program where i would like to export to excel. I found the report function, but cant get it to work
Im developing in VB.net and in a form i would like to have this form.

I have a dataset with some fields. I add the fiels into a table. It works but it only show the first record. Not the secound one. It dont give me the oppertunity to step forward or backward.

I if i could i would like all the posts in the database to be show in the same report for exampel

Firstname Lastname
John Mcgreen
Daniel Johnsson
George Anderson

Right now only the first person shows in the report.

Greatful for help

/Mitmit

I got this working by adding a listcontrol.

But i have some other information that i want to add.

Under John Mcgreen i would like to add every record in another table that is included in my dataset.
John have i id the tbl_person and this ID is FK in another tabel called tbl_record

I want every record that is registed to be shown under John that is connected to him.

John Mcgreen
1. First song from John

2. Second song from John

Daniel Johnsson

1. First song from Daniel

2. Second song from Daniel

|||Just to let you know im developing in vb.net 2.0 and uses MS Sql 2005 and Visual Studio.net 2005 and the built in report tool in VS.net.

If you dont understand my problem or have any question, please ask. This i so important for me to solve as soon as possible.

Best regards.

Wednesday, March 7, 2012

List of All SSIS packages stored in MSDB

Hi,

I am writing one program in vb.Net where I need to bind a treeview with all the SSIS packages stored in SQL server MSDB database.

Is it possible to get all the SSIS packages by using T-SQL query or Object model ?

Thanks

Reference assembly Microsoft.SqlServer.ManagedDts.dll and create Application object (in Microsoft.SqlServer.Dts.Runtime namespace). To get list of packages use Application.GetPackageInfos method:

http://msdn2.microsoft.com/en-us/library/microsoft.sqlserver.dts.runtime.application.getpackageinfos(SQL.90).aspx|||

Alternatively the following query returns the list of stored packages from MSDB database:

SELECT * FROM msdb.dbo.sysdtspackages90

Thanks,
Loonysan

List of All SSIS packages stored in MSDB

Hi,

I am writing one program in vb.Net where I need to bind a treeview with all the SSIS packages stored in SQL server MSDB database.

Is it possible to get all the SSIS packages by using T-SQL query or Object model ?

Thanks

Reference assembly Microsoft.SqlServer.ManagedDts.dll and create Application object (in Microsoft.SqlServer.Dts.Runtime namespace). To get list of packages use Application.GetPackageInfos method:

http://msdn2.microsoft.com/en-us/library/microsoft.sqlserver.dts.runtime.application.getpackageinfos(SQL.90).aspx|||

Alternatively the following query returns the list of stored packages from MSDB database:

SELECT * FROM msdb.dbo.sysdtspackages90

Thanks,
Loonysan

Friday, February 24, 2012

List available SQL servers in VB.Net

Hi,
I want to list all available SQL servers in the LAN in my VB.Net application
.
Therefore I use SQLDMO and the following code:
Private SQLServerDMOApp As New SQLDMO.Application
Sub SomeSub
SQLServerDMOApp = New SQLDMO.Application
....
' get available servers
Dim nl As SQLDMO.NameList
nl = SQLServerDMOApp.ListAvailableSQLServers
Dim i As Integer
For i = 1 To nl.Count
MsgForm.ComboBox_Servername.Items.Add(nl.Item(i))
Next
...
End Sub
The problem is, that the SQL server name list contains only (local) and not
the other available server names (which are available as can be verified in
Enterprise Manager).
Can anybody give me a hint! Thanks in advance.
Best regards
HenryHere's a very quick way to do it in C#, you can translate it...
Create a new console application, and add this reference:
Project | Add Reference | COM | Microsoft SQLDMO Object Library
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
SQLDMO.Application sqlDmoApplication = new SQLDMO.Application();
SQLDMO.NameList serverList;
serverList = sqlDmoApplication.ListAvailableSQLServers();
foreach(string serverName in serverList)
{
Console.WriteLine(serverName);
}
}
}
}
That's it... now, as others might mention, this isn't 100% accurate, because
some servers in your network may be "hidden," and the service also has to be
started to be detected this way.
"Henry" <henryoneal@.nospam.nospam> wrote in message
news:2FFDB242-B974-4446-9B6B-414D3EC570CC@.microsoft.com...
> Hi,
> I want to list all available SQL servers in the LAN in my VB.Net
> application.
> Therefore I use SQLDMO and the following code:
> Private SQLServerDMOApp As New SQLDMO.Application
> Sub SomeSub
> SQLServerDMOApp = New SQLDMO.Application
> ....
> ' get available servers
> Dim nl As SQLDMO.NameList
> nl = SQLServerDMOApp.ListAvailableSQLServers
> Dim i As Integer
> For i = 1 To nl.Count
> MsgForm.ComboBox_Servername.Items.Add(nl.Item(i))
> Next
> ...
> End Sub
> The problem is, that the SQL server name list contains only (local) and
> not
> the other available server names (which are available as can be verified
> in
> Enterprise Manager).
> Can anybody give me a hint! Thanks in advance.
> Best regards
> Henry|||On Mon, 19 Sep 2005 03:48:04 -0700, "Henry" <henryoneal@.nospam.nospam> wrote
:
in <2FFDB242-B974-4446-9B6B-414D3EC570CC@.microsoft.com>

>Hi,
>I want to list all available SQL servers in the LAN in my VB.Net applicatio
n.
>Therefore I use SQLDMO and the following code:
>Private SQLServerDMOApp As New SQLDMO.Application
>Sub SomeSub
> SQLServerDMOApp = New SQLDMO.Application
>....
> ' get available servers
> Dim nl As SQLDMO.NameList
> nl = SQLServerDMOApp.ListAvailableSQLServers
> Dim i As Integer
> For i = 1 To nl.Count
> MsgForm.ComboBox_Servername.Items.Add(nl.Item(i))
> Next
>...
>End Sub
>The problem is, that the SQL server name list contains only (local) and not
>the other available server names (which are available as can be verified in
>Enterprise Manager).
>Can anybody give me a hint! Thanks in advance.
>Best regards
>Henry
If you have any type of firewall running that interferes with communications
even for a fraction of a second, you will see only local instances and named
instances will appear as the server name absent the instance name.
Stefan Berglund|||Hello Henry,
The following KB describs the similar method. However, it may have issues
with MSDE instances
287737 INF: How to Enumerate Available SQL Servers Using SQLDMO
http://support.microsoft.com/?id=287737
If so, you may want to work around this by using the NetAPI function
NetServerEnum, looking for a
server type of SV_TYPE_SQLSERVER.
Also, you could list servers by using "osql -L " command.
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.
| From: Stefan Berglund <keepit@.in.thegroups>
| Subject: Re: List available SQL servers in VB.Net
| Date: Mon, 19 Sep 2005 10:01:37 -0700
| Message-ID: <d8rti1tud8ndlvbne5gbkb8f6vml553peq@.4ax.com>
| References: <2FFDB242-B974-4446-9B6B-414D3EC570CC@.microsoft.com>
| X-Newsreader: Forte Agent 3.1/32.783
| MIME-Version: 1.0
| Content-Type: text/plain; charset=us-ascii
| Content-Transfer-Encoding: 7bit
| Newsgroups: microsoft.public.sqlserver.programming
| NNTP-Posting-Host: pool-71-108-242-232.lsanca.dsl-w.verizon.net
71.108.242.232
| Lines: 1
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.programming:119288
| X-Tomcat-NG: microsoft.public.sqlserver.programming
|
| On Mon, 19 Sep 2005 03:48:04 -0700, "Henry" <henryoneal@.nospam.nospam>
wrote:
| in <2FFDB242-B974-4446-9B6B-414D3EC570CC@.microsoft.com>
|
| >Hi,
| >
| >I want to list all available SQL servers in the LAN in my VB.Net
application.
| >
| >Therefore I use SQLDMO and the following code:
| >
| >Private SQLServerDMOApp As New SQLDMO.Application
| >
| >Sub SomeSub
| > SQLServerDMOApp = New SQLDMO.Application
| >....
| > ' get available servers
| > Dim nl As SQLDMO.NameList
| > nl = SQLServerDMOApp.ListAvailableSQLServers
| > Dim i As Integer
| > For i = 1 To nl.Count
| > MsgForm.ComboBox_Servername.Items.Add(nl.Item(i))
| > Next
| >...
| >End Sub
| >
| >The problem is, that the SQL server name list contains only (local) and
not
| >the other available server names (which are available as can be verified
in
| >Enterprise Manager).
| >
| >Can anybody give me a hint! Thanks in advance.
| >
| >Best regards
| >
| >Henry
|
| If you have any type of firewall running that interferes with
communications
| even for a fraction of a second, you will see only local instances and
named
| instances will appear as the server name absent the instance name.
|
| --
| Stefan Berglund
|

Monday, February 20, 2012

List all SQL/VS.NET objects on an aspx page?

Hi guys,

Being new to ASP.NET, I may be asking something that is dead simple, but please bear with me!

How would I go about listing all the tables, stored procedures and views from a SQL database within an aspx page? I understand how to connect and return a dataset etc, but that's about as far as I can get. I want to be able to list all of these objects from a given db - any ideas?

Additionally (this may not be possible) - is there a way I can list all of the objects within a visual studio.net solution, again within an aspx page?

Thanks for any help,

JonSQL has a number of procs and views that allow you to get at the meta data of its database. It's also got some weird foreach functions that help too.

select * from sysobjects
is one place to start, but there are nicer views.

As for .net you can use reflection and work your way around that.

System.Reflection.Assembly.GetExecutingAssembly();
is another good starting place.|||Thanks alot - that gives me some useful pointers.
I shall have a go and post results (if anyone else is interested in how it's done).