Monday, March 19, 2012
Copying jobs to a new server.
Is there a faster way to move all the jobs than creating a script for each
one and then running that script in query analyzer?
TIA
Mike
There is a "Transfer Jobs" Task in DTS That will do that for you.
Greg Jackson
PDX, Oregon
|||Hi,
There are 2 more options:-
1.
You can generate the script for all jobs ( Enterprise manager -- Right click
on the jobs
node in SQl Agent -- Jobs| All tasks| Generate sql script, Save it as file).
Run this
script in the destination server.
2.
Jobs, operators , Alerts ,...are stored in msdb database.If the destination
server
is a new one and if you do not have any existing stuffs in msdb , you can
even restore a msdb backup from the source server.
-
Thanks
Hari
MCDBA
"Michael Beck" <Mikeb46NoSpam@.pacbell.net> wrote in message
news:e9ySexfaEHA.2844@.TK2MSFTNGP12.phx.gbl...
> We are moving SQL Server (2000) to a bigger dedicated server.
> Is there a faster way to move all the jobs than creating a script for each
> one and then running that script in query analyzer?
> TIA
> Mike
>
Copying jobs to a new server.
Is there a faster way to move all the jobs than creating a script for each
one and then running that script in query analyzer?
TIA
MikeThere is a "Transfer Jobs" Task in DTS That will do that for you.
Greg Jackson
PDX, Oregon|||Hi,
There are 2 more options:-
1.
You can generate the script for all jobs ( Enterprise manager -- Right click
on the jobs
node in SQl Agent -- Jobs| All tasks| Generate sql script, Save it as file).
Run this
script in the destination server.
2.
Jobs, operators , Alerts ,...are stored in msdb database.If the destination
server
is a new one and if you do not have any existing stuffs in msdb , you can
even restore a msdb backup from the source server.
-
Thanks
Hari
MCDBA
"Michael Beck" <Mikeb46NoSpam@.pacbell.net> wrote in message
news:e9ySexfaEHA.2844@.TK2MSFTNGP12.phx.gbl...
> We are moving SQL Server (2000) to a bigger dedicated server.
> Is there a faster way to move all the jobs than creating a script for each
> one and then running that script in query analyzer?
> TIA
> Mike
>
Copying jobs to a new server.
Is there a faster way to move all the jobs than creating a script for each
one and then running that script in query analyzer?
TIA
MikeThere is a "Transfer Jobs" Task in DTS That will do that for you.
Greg Jackson
PDX, Oregon|||Hi,
There are 2 more options:-
1.
You can generate the script for all jobs ( Enterprise manager -- Right click
on the jobs
node in SQl Agent -- Jobs| All tasks| Generate sql script, Save it as file).
Run this
script in the destination server.
2.
Jobs, operators , Alerts ,...are stored in msdb database.If the destination
server
is a new one and if you do not have any existing stuffs in msdb , you can
even restore a msdb backup from the source server.
-
Thanks
Hari
MCDBA
"Michael Beck" <Mikeb46NoSpam@.pacbell.net> wrote in message
news:e9ySexfaEHA.2844@.TK2MSFTNGP12.phx.gbl...
> We are moving SQL Server (2000) to a bigger dedicated server.
> Is there a faster way to move all the jobs than creating a script for each
> one and then running that script in query analyzer?
> TIA
> Mike
>
Sunday, March 11, 2012
copying Databases
MSSQL2005 system and I goto RESTORE - after creating a database with the
same name- I get
"ERROR the backup set holds a database other than the existing "Toxinet'
database. RESTORE DATABASE is terminating abnormally"
Any ideas? This process has always worked in MSSQL97 & 2000
Thanks,
Raul Rego
NJPIES
rrego@.njpies.org
Hi Raul
From your limited information, it sounds like the name in the backup is not
what you think it is.
You don't have to create a database before doing a restore. Why don't you
just try restoring and letting the restore process create the database.
Perhaps there is a spelling issue or you have a case sensitive collation.
BTW, there was no MSSQL97. The version before SQL Server 2000 was SQL Server
7.
HTH
Kalen Delaney, SQL Server MVP
www.InsideSQLServer.com
http://blog.kalendelaney.com
"Raul" <rrego@.njpies.org> wrote in message
news:BCE20BE9-3480-43A4-9B44-C6A0F628B38A@.microsoft.com...
>I backed a MSSQL2000 database into a BAK file. Now when I create a
>MSSQL2005 system and I goto RESTORE - after creating a database with the
>same name- I get
> "ERROR the backup set holds a database other than the existing "Toxinet'
> database. RESTORE DATABASE is terminating abnormally"
> Any ideas? This process has always worked in MSSQL97 & 2000
> Thanks,
> Raul Rego
> NJPIES
> rrego@.njpies.org
>
|||Use the "with replace" clause.
Jason Massie
www: http://statisticsio.com
rss: http://feeds.feedburner.com/statisticsio
"Raul" <rrego@.njpies.org> wrote in message
news:BCE20BE9-3480-43A4-9B44-C6A0F628B38A@.microsoft.com...
>I backed a MSSQL2000 database into a BAK file. Now when I create a
>MSSQL2005 system and I goto RESTORE - after creating a database with the
>same name- I get
> "ERROR the backup set holds a database other than the existing "Toxinet'
> database. RESTORE DATABASE is terminating abnormally"
> Any ideas? This process has always worked in MSSQL97 & 2000
> Thanks,
> Raul Rego
> NJPIES
> rrego@.njpies.org
>
copying Databases
MSSQL2005 system and I goto RESTORE - after creating a database with the
same name- I get
"ERROR the backup set holds a database other than the existing "Toxinet'
database. RESTORE DATABASE is terminating abnormally"
Any ideas? This process has always worked in MSSQL97 & 2000
Thanks,
Raul Rego
NJPIES
rrego@.njpies.orgHi Raul
From your limited information, it sounds like the name in the backup is not
what you think it is.
You don't have to create a database before doing a restore. Why don't you
just try restoring and letting the restore process create the database.
Perhaps there is a spelling issue or you have a case sensitive collation.
BTW, there was no MSSQL97. The version before SQL Server 2000 was SQL Server
7.
--
HTH
Kalen Delaney, SQL Server MVP
www.InsideSQLServer.com
http://blog.kalendelaney.com
"Raul" <rrego@.njpies.org> wrote in message
news:BCE20BE9-3480-43A4-9B44-C6A0F628B38A@.microsoft.com...
>I backed a MSSQL2000 database into a BAK file. Now when I create a
>MSSQL2005 system and I goto RESTORE - after creating a database with the
>same name- I get
> "ERROR the backup set holds a database other than the existing "Toxinet'
> database. RESTORE DATABASE is terminating abnormally"
> Any ideas? This process has always worked in MSSQL97 & 2000
> Thanks,
> Raul Rego
> NJPIES
> rrego@.njpies.org
>|||Use the "with replace" clause.
--
Jason Massie
www: http://statisticsio.com
rss: http://feeds.feedburner.com/statisticsio
"Raul" <rrego@.njpies.org> wrote in message
news:BCE20BE9-3480-43A4-9B44-C6A0F628B38A@.microsoft.com...
>I backed a MSSQL2000 database into a BAK file. Now when I create a
>MSSQL2005 system and I goto RESTORE - after creating a database with the
>same name- I get
> "ERROR the backup set holds a database other than the existing "Toxinet'
> database. RESTORE DATABASE is terminating abnormally"
> Any ideas? This process has always worked in MSSQL97 & 2000
> Thanks,
> Raul Rego
> NJPIES
> rrego@.njpies.org
>
Wednesday, March 7, 2012
Copying columns to table with different design
I am working with a SQL database that was migrated from MS Access and adapted for full-text search which involved creating a new table with a different design.I would like to copy three columns (YearGiven, MonthGiven, DayGiven) from the Documents table to the newly-created FullDocuments table so that I can delete the Documents table and four other tables with redundant data.Here are the two tables involved in the column copy:
Documents Table
DocID (Primary Key)
DocNo
SequenceNo
YearGiven
MonthGiven
DayGiven
FullDocuments Table
FullDocID (Primary Key)
DocNo
SequenceNo
SectionText
YearGiven (empty – no data)
MonthGiven (empty – no data)
DayGiven (empty – no data)
After the copy column procedure I want the FullDocuments table structure to look like this:
FullDocuments Table
FullDocID (Primary Key)
DocNo
SequenceNo
SectionText
YearGiven (full of transferred data)
MonthGiven (full of transferred data)
DayGiven (full of transferred data)
The problem is that the FullDocuments table contains approximately 4x as many rows as the Documents table.This is because each document has four types – the primary Text document and three supplemental documents (Background, Report, and Index).Whereas the Documents table has one row for each Document, the Full Documents table has four rows per document (the four document types).Instead of simply doing a copy and paste of columns based on a primary key and foreign key relationship (as described in the MSDN online books), I need to copy and paste based on the DocNo and SequenceNo columns.Thus the same date data (Year, Month, Day) will need to occupy four consecutive rows for each document in the FullDocuments table (as is now the case with the DocNo and SequenceNo).
I will end up with one table that meets the requirements for the full-text search (primary key and all the text to be searched) and eliminate five tables (Documents and the four document type text tables).This is a static database consisting of historical records so I am not concerned about input errors that can be associated with denormalization.
I tried exporting the data using the Export Wizard using the “Copy data from one or more tables” option.The transfer failed.The most relevant lines of the Error Report are:
·Error 0xc0202009: Data Flow Task: An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available.Source: "Microsoft SQL Native Client"Hresult: 0x80004005Description: "The statement has been terminated.".
An OLE DB record is available.Source: "Microsoft SQL Native Client"Hresult: 0x80004005Description: "Cannot insert the value NULL into column 'FullDocumentID', table 'Documents.dbo.FullDocuments'; column does not allow nulls. INSERT fails.".
(SQL Server Import and Export Wizard)
·Error 0xc0047022: Data Flow Task: The ProcessInput method on component "Destination - FullDocuments" (61) failed with error code 0xC0202009. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.
(SQL Server Import and Export Wizard)
·Error 0xc0047021: Data Flow Task: Thread "WorkThread0" has exited with error code 0xC0202009.
(SQL Server Import and Export Wizard)
I then tried the “Write a query to specify the data to transfer” option focusing on just the YearGiven column using various FETCH, INSERT AND UPDATE commands without any luck.Questions:
1.Is the query approach the best way to achieve my objective, or did I miss something in the “Copy data” option in the Export Wizard?
2.If the query approach is the best way, any suggestions on what the query will look like?
Thanks for any help you can provide.
It sounds as though you have a pretty complicated requirement here and therefore I would suggest you try to build a package using BIDS rather than using the import/export wizard.
-Jamie
|||Jamie: Thanks for the suggestion. It would never have occurred to me to use the Business Intelligence Development Studio for this purpose since I think of BIDS as a report generator instead of a tool for moving data around in a database. I'll have to look into this option.|||BIDS is the tool for building Reporting Services reports, Analysis Services cubes, and Integration Services packages. Hence its a tool for building BI components - hence its name.
-Jamie
Friday, February 24, 2012
copy wizard gives error creating share
The source server is 7.0. The destination server is 2000. I'm invoking the wizard from the 2000 machine.
Anybody know what this error means?
Thanks
SharonIf the destination SQL Server is started under a domain account that does not have local administrator privileges on the source computer then the following error message may be generated by the wizard:
Step Error Source: Microsoft Data Transformation Services (DTS) Package
Step Error Description:Unspecified error
Step Error code: 80004005
Step Error Help File:sqldts80.hlp
Step Error Help Context ID:1100
Clicking on the "MORE INFO >>>" button, you will find that permissions to create the remote share are not present.
Failed to create the share OMWWIZD
Sunday, February 19, 2012
Copy tables to a new database
If I put tables in 'Model' database and creating new database will automatic
ally copy the system files along with the additional files that I created.
I want to do the same thing, but getting all the tables from a database call
ed 'Template'. How could I
achieve this by writing a stored procedure? Any help or suggestions is appr
eciated.Steve,
Create a script of everything in Template (you could use RedGate, Enterprise
Manager,etc.) then run that script in the newly created database.
Alternatively, you create your Template database and put whatever you want
into it. Then back it up. Create your new database and use a RESTORE ...
REPLACE of your Template backup to load your template into the new database.
Russell Fields
"Steve" <anonymous@.discussions.microsoft.com> wrote in message
news:9771EEDD-FF40-4509-9EDE-7A0E04233A61@.microsoft.com...
quote:
> Hi All,
> If I put tables in 'Model' database and creating new database will
automatically copy the system files along with the additional files that I
created. I want to do the same thing, but getting all the tables from a
database called 'Template'. How could I achieve this by writing a stored
procedure? Any help or suggestions is appreciated.
Copy tables to a new database
If I put tables in 'Model' database and creating new database will automatically copy the system files along with the additional files that I created. I want to do the same thing, but getting all the tables from a database called 'Template'. How could I achieve this by writing a stored procedure? Any help or suggestions is appreciated.Steve,
Create a script of everything in Template (you could use RedGate, Enterprise
Manager,etc.) then run that script in the newly created database.
Alternatively, you create your Template database and put whatever you want
into it. Then back it up. Create your new database and use a RESTORE ...
REPLACE of your Template backup to load your template into the new database.
Russell Fields
"Steve" <anonymous@.discussions.microsoft.com> wrote in message
news:9771EEDD-FF40-4509-9EDE-7A0E04233A61@.microsoft.com...
> Hi All,
> If I put tables in 'Model' database and creating new database will
automatically copy the system files along with the additional files that I
created. I want to do the same thing, but getting all the tables from a
database called 'Template'. How could I achieve this by writing a stored
procedure? Any help or suggestions is appreciated.
Monday, February 13, 2012
Copy SQL Server 2005 DB to SQL Server Mobile - is it possible?
built and populated a database using SQL Server 2005... and then
realised where I really need it is on the PDA! Without going through
all the pain of setting up SQL replication or writing all the code is there a way to export a
2005 database to SQL Server Mobile so it results in an .SDF file?
I know I can script each table out and run it via the SS2005 management studio when connected to a local .sdf file then copy that to the PDA but the thing is I really want to keep my test data so I don't have to re-enter it again.
TIA for any help... there must be a way to do this but I'm quite new to SQL Server Mobile and 2005.
Mike
you can use Remote Data Access to pull all of the tables from the server or you can use merge replication with AddSubscription(AddOption.CreateDatabase) to dynamically create the SQL Mobile database on your device.
In this MSDN webcast, I demonstrate the latter option: http://msreadiness.com/WS_abstract.asp?eid=15003229
Darren
|||Thanks Darren - but I can't see a link on that to a webcast.... it has details of the event but nothing that I can see to get the webcast - what am I missing? I even went through and registered (for an event that took place last year!) so I'm a bit confused to say the least.
In the meantime I'll google and read up on RDA - I've not used it but it sounds like I'm going to need to work with it to do this app.
Mike|||
after you register, they send you an email with instructions to view the on-demand webcast. digging in to RDA is also a good approach.
Darren
|||
You can use the EXPORT Wizard in SQLServer
Open SQLServer (Full version)
Create a new SDF database for Mobile - no tables required
Click on the database you want to export
Right click on TASKS - EXPORT
Go through the wizard and export to the sdf its all very easy and DOESNT WORK for me
I have founfd that it creates the tables with no problem but when it tries to insert the data into the table it looks for tables called
"table1" complete with the "" round the table!!!
I have let MS know but have not had a reply yet
Can you let me know if it works
You can also get a wizard from PRIMEWORKS.COM that does it all for you
Richar@.bmwdrivers.co.uk
|||Richard,Thanks - but for me when I run the Export Data wizard from the database I need to export to an .sdf file and then go through to the "Choose a destination" dialog there is no option for SQL Server Mobile at all... what option did you use? (BTW , I used SQL server 2005 not SS 2000 - which version did you mean?)
Mike|||
I've never seen the export option Richard describes work but would love to know if someone gets it to work.
Darren
|||
look in SSEV (SqlSrver Everywhere
It adds it to the SQLKExport Wizard
But it doesnt work and MS are not going to get it to work (Bastards)
Try Primeworks.com
|||
Import/Export from/to SQL Server Everywhere Edition (SSEv) is not implemented.
The immediate question would be why is it shown their in the list of data providers?
All the data related tools (ex: SQL Server Management Studio, Microsoft Office Word, Microsoft Office Excel ..etc) show a list of data providers from a OLEDB Provider database of the system. Since, SSEv also registers its OLEDB Provider to system, it gets listed automatically.
Goof-ups like this happen as the product is still in CTP stage. We are taking care to NOT show up in these tools.
Thanks,
Laxmi
Copy SQL Server 2005 DB to SQL Server Mobile - is it possible?
built and populated a database using SQL Server 2005... and then
realised where I really need it is on the PDA! Without going through
all the pain of setting up SQL replication or writing all the code is there a way to export a
2005 database to SQL Server Mobile so it results in an .SDF file?
I know I can script each table out and run it via the SS2005 management studio when connected to a local .sdf file then copy that to the PDA but the thing is I really want to keep my test data so I don't have to re-enter it again.
TIA for any help... there must be a way to do this but I'm quite new to SQL Server Mobile and 2005.
Mike
you can use Remote Data Access to pull all of the tables from the server or you can use merge replication with AddSubscription(AddOption.CreateDatabase) to dynamically create the SQL Mobile database on your device.
In this MSDN webcast, I demonstrate the latter option: http://msreadiness.com/WS_abstract.asp?eid=15003229
Darren
|||Thanks Darren - but I can't see a link on that to a webcast.... it has details of the event but nothing that I can see to get the webcast - what am I missing? I even went through and registered (for an event that took place last year!) so I'm a bit confused to say the least.
In the meantime I'll google and read up on RDA - I've not used it but it sounds like I'm going to need to work with it to do this app.
Mike|||
after you register, they send you an email with instructions to view the on-demand webcast. digging in to RDA is also a good approach.
Darren
|||
You can use the EXPORT Wizard in SQLServer
Open SQLServer (Full version)
Create a new SDF database for Mobile - no tables required
Click on the database you want to export
Right click on TASKS - EXPORT
Go through the wizard and export to the sdf its all very easy and DOESNT WORK for me
I have founfd that it creates the tables with no problem but when it tries to insert the data into the table it looks for tables called
"table1" complete with the "" round the table!!!
I have let MS know but have not had a reply yet
Can you let me know if it works
You can also get a wizard from PRIMEWORKS.COM that does it all for you
Richar@.bmwdrivers.co.uk
|||Richard,Thanks - but for me when I run the Export Data wizard from the database I need to export to an .sdf file and then go through to the "Choose a destination" dialog there is no option for SQL Server Mobile at all... what option did you use? (BTW , I used SQL server 2005 not SS 2000 - which version did you mean?)
Mike|||
I've never seen the export option Richard describes work but would love to know if someone gets it to work.
Darren
|||
look in SSEV (SqlSrver Everywhere
It adds it to the SQLKExport Wizard
But it doesnt work and MS are not going to get it to work (Bastards)
Try Primeworks.com
|||
Import/Export from/to SQL Server Everywhere Edition (SSEv) is not implemented.
The immediate question would be why is it shown their in the list of data providers?
All the data related tools (ex: SQL Server Management Studio, Microsoft Office Word, Microsoft Office Excel ..etc) show a list of data providers from a OLEDB Provider database of the system. Since, SSEv also registers its OLEDB Provider to system, it gets listed automatically.
Goof-ups like this happen as the product is still in CTP stage. We are taking care to NOT show up in these tools.
Thanks,
Laxmi
Copy SQL Server 2005 DB to SQL Server Mobile - is it possible?
built and populated a database using SQL Server 2005... and then
realised where I really need it is on the PDA! Without going through
all the pain of setting up SQL replication or writing all the code is there a way to export a
2005 database to SQL Server Mobile so it results in an .SDF file?
I know I can script each table out and run it via the SS2005 management studio when connected to a local .sdf file then copy that to the PDA but the thing is I really want to keep my test data so I don't have to re-enter it again.
TIA for any help... there must be a way to do this but I'm quite new to SQL Server Mobile and 2005.
Mike
you can use Remote Data Access to pull all of the tables from the server or you can use merge replication with AddSubscription(AddOption.CreateDatabase) to dynamically create the SQL Mobile database on your device.
In this MSDN webcast, I demonstrate the latter option: http://msreadiness.com/WS_abstract.asp?eid=15003229
Darren
|||Thanks Darren - but I can't see a link on that to a webcast.... it has details of the event but nothing that I can see to get the webcast - what am I missing? I even went through and registered (for an event that took place last year!) so I'm a bit confused to say the least.
In the meantime I'll google and read up on RDA - I've not used it but it sounds like I'm going to need to work with it to do this app.
Mike|||
after you register, they send you an email with instructions to view the on-demand webcast. digging in to RDA is also a good approach.
Darren
|||
You can use the EXPORT Wizard in SQLServer
Open SQLServer (Full version)
Create a new SDF database for Mobile - no tables required
Click on the database you want to export
Right click on TASKS - EXPORT
Go through the wizard and export to the sdf its all very easy and DOESNT WORK for me
I have founfd that it creates the tables with no problem but when it tries to insert the data into the table it looks for tables called
"table1" complete with the "" round the table!!!
I have let MS know but have not had a reply yet
Can you let me know if it works
You can also get a wizard from PRIMEWORKS.COM that does it all for you
Richar@.bmwdrivers.co.uk
|||Richard,Thanks - but for me when I run the Export Data wizard from the database I need to export to an .sdf file and then go through to the "Choose a destination" dialog there is no option for SQL Server Mobile at all... what option did you use? (BTW , I used SQL server 2005 not SS 2000 - which version did you mean?)
Mike|||
I've never seen the export option Richard describes work but would love to know if someone gets it to work.
Darren
|||
look in SSEV (SqlSrver Everywhere
It adds it to the SQLKExport Wizard
But it doesnt work and MS are not going to get it to work (Bastards)
Try Primeworks.com
|||
Import/Export from/to SQL Server Everywhere Edition (SSEv) is not implemented.
The immediate question would be why is it shown their in the list of data providers?
All the data related tools (ex: SQL Server Management Studio, Microsoft Office Word, Microsoft Office Excel ..etc) show a list of data providers from a OLEDB Provider database of the system. Since, SSEv also registers its OLEDB Provider to system, it gets listed automatically.
Goof-ups like this happen as the product is still in CTP stage. We are taking care to NOT show up in these tools.
Thanks,
Laxmi
Copy SPROCs to different database
another without opening each one, copying, creating a new SPROC in target db
and pasting?
Can DTS accomplish this?You can use DTS. If you have enterprise manager, you can also just
right-click on a database and choose to import or export data. When you get
into the wizard, choose to "Copy objects and data betwen SQL Server
databases". You can then save this entire thing as a DTS package, which you
can manipulate, schedule, etc.
MeanOldDBA
derrickleggett@.hotmail.com
http://weblogs.sqlteam.com/derrickl
When life gives you a lemon, fire the DBA.
"scott" wrote:
> Is there a manual or code way to copy stored procedures from 1one sql db t
o
> another without opening each one, copying, creating a new SPROC in target
db
> and pasting?
> Can DTS accomplish this?
>
>|||You can use Enterprise Manager and right click on the db and choose "All
Tasks - Generate SQL Script". Then choose all the sp's and you will get one
script for all the sps. Just run that in the other db.
Andrew J. Kelly SQL MVP
"scott" <sbailey@.mileslumber.com> wrote in message
news:e45c5eteGHA.5104@.TK2MSFTNGP04.phx.gbl...
> Is there a manual or code way to copy stored procedures from 1one sql db
> to another without opening each one, copying, creating a new SPROC in
> target db and pasting?
> Can DTS accomplish this?
>|||You can use DTS to copy database objects from one database to another.
Are you using Sql Server 2000 or Sql Server 2005? I think, if I rememer
correctly, there is a copy database or copy database objects task in 2000.
2005 makes it a whole lot easier.
-Tim
"scott" <sbailey@.mileslumber.com> wrote in message
news:e45c5eteGHA.5104@.TK2MSFTNGP04.phx.gbl...
> Is there a manual or code way to copy stored procedures from 1one sql db
> to another without opening each one, copying, creating a new SPROC in
> target db and pasting?
> Can DTS accomplish this?
>