Showing posts with label configuration. Show all posts
Showing posts with label configuration. Show all posts

Friday, March 23, 2012

How to run SQL Server Exp 2005

Dear friends

I have installed SQL Server Express Edition (55 mb).
Program >> Start >> MS SQL Server 2005 >> Configuration Tool ... this is what being displayed. This is my first use of MS Sql Server, before this I was using Oracle and after installation one could see Sql Plus from where the user can log in.

I am confused how to start SQL Server Expr 2005 edition and try some sql.
Please help me out..

Have a nice day
Ramniklal

Yo have to download a graphical management tool as a separate download: http://go.microsoft.com/fwlink/?LinkId=64064

--
SvenC

|||Thanks dear

Will get you back after downloading and using the graphical mgt. tool

bye n have a nice day
ramniklal|||

If you want to run commandline queries (I know that Oracle guys like that :-) ) you can use the OSQL.EXE (but this will be deprecated in the future) or the SQLCMD.EXE which is the successor of the OSQL.exe.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

sql

Wednesday, March 7, 2012

How to retrieve Global Variables in an ActiveX Script Task using VBScript in SSIS

I need to retrieve the Global Variables set in my package configuration file within an ActiveX Script Task within an SSIS package. In DTS, I could access the Global Variables to execute a SQLXMLBulkLoad for the following statement:

==========================================

Function Main()

Response.Expires=-1

set objBL = CreateObject("SQLXMLBulkLoad.SQLXMLBulkLoad")
objBL.ConnectionString =
"provider=SQLOLEDB.1;server=ABC123;database=MyDB;Trusted_Connection=Yes;"
objBL.KeepIdentity = False
objBL.CheckConstraints = False

objBL.Execute DTSGlobalVariables("gv_XSDSchemaFile").Value, DTSGlobalVariables("gv_XMLFullPath").Value
Main = DTSTaskExecResult_Success
set objBL=Nothing

End Function
=========================================

I have tried using the Script Task to write this in VB.NET, however the MSXML4.0 is not exposed within the limited object model of the Script Task Designer. I have written a Data Flow Object using the XML Source, however it requires quite a bit of effort to have the Data Flow Component parse the XML (with 10 hierarchical nodes), transform each and provide a SQL Server Destination. This works, however the XML Source Component requires a hardcoded reference to the XSD Schema file and does not allow for a Global Variable to used. (They do provide this functionality for the XML file source though).

My requirement is to allow for the Global Variable to be passed for the Schema file at runtime. The only way I can think of is to recreate what I was doing in DTS where I could simply pull in the XML and XSD Global Variables and execute the SQLXMLBulkLoad in VB Script.

Any ideas on how to write this in VBScript within the ActiveX Script Task in SSIS?...

Michael

No answer on all your questions but stick with using the XML source as this is what SSIS is designed for.

While the XML source does not cater for a variable for the XSD path, it does allow you to set it via expressions. Essentially the same thing.

When the data flow is highlighted, see properties > Expressions. There is a [XMLSource.DataSchemaDefinition] property which you can set if a variable or a value built up from expressions.

Also, stay away from the Active X Script task...