I have a tool that uses SSIS and stored procedures to extract data from a non-SQL Server database (Sybase) and loads the data into a SQL Server database. I have upgraded to SQL Server 2008 R2 and I am in the process of upgrading to Powershell 2.0. I want
↧
Powershell for data transfer from non-SQL Server database
↧
Microsoft.SqlServer.Management.Smo.DatabaseStatus values different from sysdatabases status column values
Not sure if anyone noticed this. Looks like the status bits defined in SMO object is not actually same as that stored in status column of sysdatabases. As I am using SMO i am not able to exactly figure out the status of the database when status goes to of
↧
↧
How to retrieve the table names from a View using SMO
Hi,
I am writing a User Interface to view all the SMO.View objects and display the components involved in it. One of the issues I am having is to retrieve all the tables involved in an existing View. I can see all the columns involved. But the Colum
↧
sqlparser parseresult - How do you parse?
I was looking for some sample code to figure out how to effectively use some of the classes in the Microsoft.SqlServer.Management.SqlParser namespace. But to my astonishment, after googling for two entire days, couldn't find even one single sample code t
↧
Schedule SQLExpress Backup using SQLDMO
is it possible to Schedule SQLExpress Backup using SQLDMO?SQL Express does not support SQL Agent then how can I view jobs created using SQLDMO?In management studio there is jobs option is unavailable. I have written code to add JObSche
↧
↧
Script difference between two databases
I need to compare two databases and update one of them. Suppose a table "Table A" is available in both databases but some columns are missing in the other table and I want to create an update sql script to update one database.
I can add columns to the
↧
Process profiler log in C#
I am in charge of migration DB from 2k5 to 2k8
One of tests to check that all functionality works same way in 2k8 as in 2k5 is “playing” trace file log on 2k5 and 2k8 in parallel and compare result for each statement as well as end result of database.
B
↧
Using SQLCMD script in SMO
Hello,
I have a C# program which uses SMO to submit tsql to SQL Server 2008 R2 for execution. The tsql is read in from a script file and this works fine.
However if I give it a script file which contains some sqlcmd syntax I get an exception saying
↧
SMO Backup event PercentCompleteEventHandler not fired
Hi,
When I run this code, the event PercentCompleteEventHandler (Backup_PercentComplete); never fired.
Then event ServerMessageEventHandler(Backup_Complete) is fired
when the backup is complete.
The backup operation run Ok and without errors
↧
↧
sqlcmd.exe is hanging after running sql statement in inno package
Hello,
I'm write installation package using inno for ms sql script. I have the following code:
[code="other"]
strParam := '-U hel -P password -S ServerName -d test -Q "sp_test"';
try
Exec('sqlcmd.exe', strParam, '', SW_SHOW,
↧
SQL Server Denali SMO calls with .NET framework 3.5
Hi,
Does SMO expect .Netframework 4.0 to talk to SQL server Denali or 3.5 is enough?
I'm trying to migrate my C#, .Net application to support SQL Server Denali. The application currently supports SQL Sever 2008 and uses .Net Framework 3.5. I'm just
↧
Using SMO for 2000 servers
Hi Friends,
I would like to know how can I take full advantage of SMO scripting on SQL Server 2000 too.
I have a working script of SMO for 2005 servers. I know that DMO is the one for 2000, but I believe SMO has a backward compatibility as well?
O
↧
how to call excel (2007/2010) macro in SSIS Package (2005/2008)
Hello,
My situation : -
Excel 2007 and 2010
MSBI - 2005 and 2008 (EE/SE)
Excel based macro has been written in above mentioned versions of excel.
Script Task : -
marco would copy and paste data from different sheets of 3 different excel files
↧
↧
Minimum permissions to allow access to SMO.Server.Databases.Users list
I have a Powershell script which I would like to run using less than sysadmin permissions.
It creates a New-Object Microsoft.SqlServer.Management.Smo.Server
Then uses FOREACH-OBJECT in the Databases collection
Then uses FOREACH-OBJECT in the User
↧
Detach database, copy to new location, attach database
Hello,
PowerShell newbie here. I'm trying to write a PS script that will detach a database, copy the data and log files to new location, and attach database using new file location. I'm stuck on getting the current physical file names. Here is the code I
↧
SSIS Vs Linked Server with SQL Agent Jobs
Dear Experts,
Need advice in planning.
There are tables which needs to be exported to / imported from databases on different SQL instances DAILY and also want to have exception handlers or notifications of the daily run and the status (especially o
↧
C# => EnumJobHistory() not working on SQL-Server 2008 SP1 (10.00.2531) with smo-dll 11.0.0.0 and 10.0.0.0
Hi there,
i am having problems enumerating the jobhistory for SQL-Server 2008 SP1 (10.00.2531).
On SQL-Server 2008 R2 and 2012, everything works fine, and the function returns a DataTable-Object. Connected to SQL-Server 2008 SP1, the function call "
↧
↧
Programming the Data Conversion task in SQL Server Integration Services 2012 in C#
I am trying to adapt C# code that configures the Data Conversion task from the code used in SQL 2005 and 2008 to 2012. Many things seem to have changed, and I am unable to figure out how to correctly assign the properties for the input->output path in
↧
Replication between two SQL 2012 Express DBs using SMO
Hi There,
I have two MSSQL Express 2012 databases each on separate machines (one for live LAN Data and the other for external IP access by a website for security reasons)
I've read that SQL Express 2012 can only use replication as a subscriber and s
↧
Problems connecting to SQL Server 2012 using 2005 SMO
Should 2005 SMO be able to access SQL 2012 please?
We are currently performing a large migration to SQL Server 2012. It's been going well, but we have hit a problem testing an app. An app server is throwing an exception "This SQL Server version (11.0)
↧