Quantcast
Channel: SQLServerCentral » Programming » SMO/RMO/DMO » Latest topics
Browsing all 99 articles
Browse latest View live

Powershell for data transfer from non-SQL Server database

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...

View Article


Microsoft.SqlServer.Management.Smo.DatabaseStatus values different from...

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...

View Article


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...

View Article

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...

View Article

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...

View Article


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...

View Article

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...

View Article

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...

View Article


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...

View Article


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',...

View Article

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...

View Article

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...

View Article

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...

View Article


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...

View Article

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...

View Article


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...

View Article

C# => EnumJobHistory() not working on SQL-Server 2008 SP1 (10.00.2531)...

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....

View Article


Programming the Data Conversion task in SQL Server Integration Services 2012...

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...

View Article

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...

View Article

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...

View Article
Browsing all 99 articles
Browse latest View live


Latest Images