Tuesday, March 20, 2012
Data Pump
what approach i should take...help me out plsSet up a DTS package to send the data from SQL Server to Oracle.
Create a scheduled job to run the package every five minutes.|||In SQL Server 2000 replication can solve your problem but I do not know about SQL Server 7.0.
Blindman's idea is easy & will be work for you...|||I can't recommend that anybody include DTS packages as part of any long-term solution now that SQL Server 2005 no longer supports them.|||I can't recommend that anybody include DTS packages as part of any long-term solution now that SQL Server 2005 no longer supports them.I suppose that by the strictest definition that is true, but I tend to think of SSIS (http://msdn.microsoft.com/SQL/bi/integration/default.aspx) as being the descendant of DTS.
-PatP|||Descendent, bastard child, unholy spawn, however you want to call it...|||Descendent, bastard child, unholy spawn, however you want to call it...So, how do you really feel about SSIS? You don't have to hold back, we understand. ;)
-PatP|||select @.Functionality/@.Documentation
----
Msg 8134, Level 16, State 1, Line 1
Divide by zero error encountered.
Saturday, February 25, 2012
Data migration in MSDE
I have a set of distributors who use MSDE as their
database and have VB as the front end. I am planning to
have a second version to my application.
During this upgrade new tables are being added, old
tables modified and some tables modified.
What would be the best approach for this migration.
Rgds
Kudla
hi Kudla,
"Kudla" <johnvellaip@.yahoo.com> ha scritto nel messaggio
news:135201c4a13d$18f54260$a401280a@.phx.gbl
> Hi
> I have a set of distributors who use MSDE as their
> database and have VB as the front end. I am planning to
> have a second version to my application.
> During this upgrade new tables are being added, old
> tables modified and some tables modified.
> What would be the best approach for this migration.
in order to install both a database from scratch, or updating existing ones,
I do personally use another companion (still VB6, at the moment) application
provided with our main apps..
this other application, via SQLDMO (but you can use whatever access method
of your choice like ADO, Ado.Net, ..) will create/update the database(s)
from a reserved defintion file described like:
[Database]
Name=xxx
DataName=logical_name|physical_name
DataNameN=logical_name|physical_name ; for additional .Ndf files
LogTo=logical_name|physical_name
LogToN=logical_name|physical_name ; for additional .Ldf files
other key to specify additional settings
each database is described in it's structure by another reserved file which
list all actions, .sql DDL files, BCP to be executed, like
<BOF>
SQL=\Tables\MasterTables.sql
'which is a T-SQL DDL file including CREATE TABLE statements
SQL=\Tables\otherTB.sql
SQL=\Views\Views.sql
SQL=\SP\StoredProcedure.sql
.....
SQL=\general\CreateLogins.sql
SQL=\general\Grant.sql
SQL=\general\Deny.sql
.....
SQL=\Populate\TableXXX.sql
'which is a T-SQL INSERT INTO file to load tables
....
BCPIN=\PopulateBCP\tableYYY.txt|table_name|
'which performs a BCP IN bulk load
....
EXEC=INSERT INTO .....
EXEC=UPDATE ...
'which are T-SQL statements to be directly performed
....
<EOF>
personally I based this app on SQLDMO... the app will parse the file, read
references to the described files (\Tables\MasterTables.sql) and execute
it's contained statements or perform the appropriate task based on the
action prefix..
this app takes command line parameters in order to upgrade existing schema
too, to subsequent schema changes stored in version folders like
\00000001\
\00000002\
\0000000n\
the migration path will then generate the new objects executing all listed
and required DDL scripts and perform migration via standard INSERT
statements, or first provide BCP out with successive BCP in, or generate
INSERT INTO DML scripts for specific tables to be later executed...
Red-Gate now provides a new product that should be able to perform the same
task... have a look at http://www.red-gate.com/sql/sql_packager.htm
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.9.1 - DbaMgr ver 0.55.1
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
Friday, February 24, 2012
data loss
I have a big problem with a database in MS SQL SERVER 2000.
the rows into the some tables, for the second time, have been mixed between
they without appearing reason.
the application that uses the db is totally TRANSACTIONAL and they do not
exist query that they do not have clause WHERE.
The database is on a computer with NAS architecture.
I have this problem for the first time in 5 years of use of MS SQL SERVER
Can someone help me?
TIA"Stefano Ferrante" <s.ferrante@.staffmedia.it> wrote in message
news:c2flov$sqc$1@.lacerta.tiscalinet.it...
> Hi,
> I have a big problem with a database in MS SQL SERVER 2000.
> the rows into the some tables, for the second time, have been mixed
between
> they without appearing reason.
I have no idea what you mean above. Inserted rows are disappearing?
Or rows appear to be in a different order when you do a select?
Remember, a table is a collection of rows. There is NO order unless you use
an ORDER BY clause. It doesn't matter what order they are inserted in.
> the application that uses the db is totally TRANSACTIONAL and they do not
> exist query that they do not have clause WHERE.
> The database is on a computer with NAS architecture.
SQL Server does NOT normally support a NAS architecture. Are you sure
you don't mean SAN? That's more common.
> I have this problem for the first time in 5 years of use of MS SQL SERVER
> Can someone help me?
> TIA|||Stefano,
SQL Server is behaving normally if it is randomly sorting data. Data is not
supposed to be sorted any particular way and you are not supposed to write
code that relies on a particular sort. If you did write code that depends
on a particular sort, shame on you--but a view with an ORDER BY clause may
get you the sort you need. However--most of the time ORDER BY also means
the data isn't updateable so if the reason for the sort is to update things
you may be SOL.
"Stefano Ferrante" <s.ferrante@.staffmedia.it> wrote in message
news:c2flov$sqc$1@.lacerta.tiscalinet.it...
> Hi,
> I have a big problem with a database in MS SQL SERVER 2000.
> the rows into the some tables, for the second time, have been mixed
between
> they without appearing reason.
> the application that uses the db is totally TRANSACTIONAL and they do not
> exist query that they do not have clause WHERE.
> The database is on a computer with NAS architecture.
> I have this problem for the first time in 5 years of use of MS SQL SERVER
> Can someone help me?
> TIA
Tuesday, February 14, 2012
Data from Derived Table
I am looking to run two different queries.
the first one returns about 6000 numbers. i.e 123454, 15432, 2343545 etc
My second query i want to use the results from the first query as a where clause?
i.e
where Number in ('123454','15432','2343545')
Clearly i dont want to type out 6000 numbers in a query. How do i use the data generated in the first query as the where criterea in the second query.
You can use the following query...(subquery)
Select Numbers From SomeTable -- Which returns 6000 numbers
on your second query..
..
..
Where Number in(Select Numbers From Sometable)