Showing posts with label dts. Show all posts
Showing posts with label dts. Show all posts

Monday, March 26, 2012

Getting stored procedures and permissions from 6.5 to 7.0

I am trying import my database from Sql Server 6.5 to 7.0 and can only
seem to get the tables.
I am using DTS and I can transfer the tables fine, but there doesn't
seem to be an option to move the other objects. There is a third button
that copies data between 7.0 databases, but that is greyed out since I
am coming from a 7.0 database.
There is a query button, but I don't how that would help me.
Thanks,
Tom.> I am trying import my database from Sql Server 6.5 to 7.0 and can only
> seem to get the tables.
> I am using DTS and I can transfer the tables fine, but there doesn't
> seem to be an option to move the other objects. There is a third
> button that copies data between 7.0 databases, but that is greyed out
> since I am coming from a 7.0 database.
You have to script your other objects to T-SQL script, but keep in mind that
your 6.5 stored procedures may need changing to work correctly in 7.0. You
may want to read in addition to above:
INF: Frequently Asked Questions - SQL Server 2000 - Upgrade
http://support.microsoft.com/defaul...b;en-us;q261334
INF: How to Upgrade SQL Server 6.5 and 7.0 to SQL Server 2000 (White Paper)
http://support.microsoft.com/defaul...b;en-us;Q322620
SQL Server Upgrade Recommendations and Best Practices
http://www.edgewoodsolutions.com/re...erUpgrade_1.asp
sincerely,
--
Sebastian K. Zaklada
Skilled Software
http://www.skilledsoftware.com
This posting is provided "AS IS" with no warranties, and confers no rights.|||Although I suspect one of the articles Sebastion pointed you to contain this
information... You should consider using the database upgrade wizard... IT
should appear under a program group called "Microsoft SQL Server -
Switch"... It will move everything including permissions and logins...
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Thomas Scheiderich" <tfs@.deltanet.com> wrote in message
news:40622890.4020207@.deltanet.com...
> I am trying import my database from Sql Server 6.5 to 7.0 and can only
> seem to get the tables.
> I am using DTS and I can transfer the tables fine, but there doesn't
> seem to be an option to move the other objects. There is a third button
> that copies data between 7.0 databases, but that is greyed out since I
> am coming from a 7.0 database.
> There is a query button, but I don't how that would help me.
> Thanks,
> Tom.
>|||Wayne Snyder wrote:

> Although I suspect one of the articles Sebastion pointed you to contain th
is
> information... You should consider using the database upgrade wizard... I
T
> should appear under a program group called "Microsoft SQL Server -
> Switch"... It will move everything including permissions and logins...
Found it.
I tried to run this and got the message "The local Sql Server is running
under LocalSystem priviledges, preventing the Upgrade Wizard to connect
to the Export Server". Why is this? How do I get it to run the way the
wizard wants?
Thanks,
Tom.

>

Wednesday, March 7, 2012

Getting mdb file path at runtime for Dts package

Hi everybody..

I am creating a Dts package for transferring data from an Access mdb file to SQL server 2000 database.

The package itself is being invoked from a .Net program using dtsrun.

What i want to know is that I need to get the mdb files' path at runtime and accordingly run the Dts package for that mdb file path..

So how do i do that?
Thanks

try to include the mdb files in the same path as the .NET program is. then make an iterators or any trick to find the files at run time.

Friday, February 24, 2012

Getting file names from path?

Hi,
Need some help here.
Is there a way to get a list of file names from the file system using T-SQL?
Or is there some other method (DTS or Setting up a linked server) which will
accomplish this? I need to provide a list of file names from a folder where
I will provide the path statement and SQL will return the file names that
exist within that particular folder. From there I can concatonate the path
with the file names then store the full path statements with file name into
a table.
Thanks in advance.
CurtYou can use sp_OA* methods to do this. Another option is to use xp_cmdshell
with a dir command like:
EXEC master..xp_cmdshell 'DIR C:\ /B'
Anith|||Hi
To add to Anith's suggestions you could write an ActiveX script in a similar
way to using the sp_OA* commands see http://www.sqldts.com/default.aspx?292
John
"Fishman" wrote:

> Hi,
> Need some help here.
> Is there a way to get a list of file names from the file system using T-SQ
L?
> Or is there some other method (DTS or Setting up a linked server) which wi
ll
> accomplish this? I need to provide a list of file names from a folder wher
e
> I will provide the path statement and SQL will return the file names that
> exist within that particular folder. From there I can concatonate the path
> with the file names then store the full path statements with file name int
o
> a table.
> Thanks in advance.
>
> Curt
>
>|||You could use a CLR TVF like so:
using System;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using Microsoft.SqlServer.Server;
using System.IO;
using System.Collections;
public partial class UserDefinedFunctions
{
/// <summary>
/// Returns a table with one column (Name) representing all files within
the path that match the criteria.
/// </summary>
/// <param name="path">The path to search. Can be relative</param>
/// <param name="searchPattern">The wildcard search pattern. Use "*" or
null for all.</param>
/// <param name="allDirectories">Search all directories under
path.</param>
/// <param name="includeFullPath">Include the full path in the
results.</param>
/// <returns>Table</returns>
[SqlFunction(FillRowMethodName = "FillFileNameRow", TableDefinition =
"Name nvarchar(300)")]
public static IEnumerable GetFileNames(string path, string
searchPattern, bool allDirectories, bool includeFullPath)
{
if (searchPattern == null)
searchPattern = "*";
string[] files = Directory.GetFiles(path, searchPattern,
allDirectories ? SearchOption.AllDirectories :
SearchOption.TopDirectoryOnly);
if (includeFullPath == false)
{
for (int i = 0; i < files.Length; i++)
{
files[i] = Path.GetFileName(files[i]);
}
}
return files;
}
/// <summary>
/// Break the row into columns for sql.
/// </summary>
public static void FillFileNameRow(object obj, out string Name)
{
string fn = (string)obj;
Name = fn;
}
};
Usage
--
select * from dbo.GetFileNames('c:', null, 0, 1)
Name
c:\AUTOEXEC.BAT
c:\boot.ini
c:\cmds.txt
c:\CONFIG.SYS
c:\dc100a.doc
c:\desktop.ini
...
William Stacey [MVP]
"Fishman" <qwpit@.kcnet.com> wrote in message
news:OWdCp5aJGHA.1676@.TK2MSFTNGP09.phx.gbl...
| Hi,
|
| Need some help here.
| Is there a way to get a list of file names from the file system using
T-SQL?
| Or is there some other method (DTS or Setting up a linked server) which
will
| accomplish this? I need to provide a list of file names from a folder
where
| I will provide the path statement and SQL will return the file names that
| exist within that particular folder. From there I can concatonate the path
| with the file names then store the full path statements with file name
into
| a table.
|
| Thanks in advance.
|
|
| Curt
|
||||You can use the FileSystemObject to enumerate a list of files. This example
is within the context of Office VBA scripting, but the syxtax for using it
with a DTS package / VBScript Task would be very similar if not the same.
http://msdn.microsoft.com/library/d...mfilesystem.asp
"Fishman" <qwpit@.kcnet.com> wrote in message
news:OWdCp5aJGHA.1676@.TK2MSFTNGP09.phx.gbl...
> Hi,
> Need some help here.
> Is there a way to get a list of file names from the file system using
> T-SQL?
> Or is there some other method (DTS or Setting up a linked server) which
> will
> accomplish this? I need to provide a list of file names from a folder
> where
> I will provide the path statement and SQL will return the file names that
> exist within that particular folder. From there I can concatonate the path
> with the file names then store the full path statements with file name
> into
> a table.
> Thanks in advance.
>
> Curt
>