Showing posts with label share. Show all posts
Showing posts with label share. Show all posts

Monday, March 26, 2012

how to share variables across packages?

I'm working on a solution in Visual Studio that has 3 SSIS packages, and now I want to add a 4th that needs access to variables defined in one of the other packages. How can I do that?

One way would be to dump out your variables and values to a raw file or db if you prefer. Then any other process from any execution context can access them anytime via a "source connection" to that file...

|||

Kevin,

Have you looked at package configurations at all. You could set parameter values from a table or a parent package variable.

Rafael Salas

|||

Rafael Salas wrote:

Have you looked at package configurations at all. You could set parameter values from a table or a parent package variable.

Yes, I intend to set my variables externally, via package configurations. But I don't know what a "parameter" is or how it differs from a variable. And I don't know how to allow my variables scoped to package X to be accessed by package Y -- how do I make package X to be a parent of package Y?

|||

Sorry I meant variable...not parameter.

In short, to make X parent of Y; you can use a Execute Package Task (control Flow) in X that would call package Y.

Rafael Salas

How to share user-defined data type in different database?

Hi,everyone.

I have defined a data type "OC_BUN_NAME" in database "CVPRO". I want to create a table tempdb.dbo.CVPRO in SQL SERVER 2005 system Database tempdb. But SQL SERVER 2005 DBMS gives a Error Messages:"Can not find the data type OC_BUN_NAME".

How can I do? How to use data types in the other database?

Please give me some advice. Thank you in advance.Hi
You should define the same data type in tempdb.
Also it would be good to define it in model database.
The tempdb is destroyed and recreated (from model) after each SQL Server restart. So if you define your data type in model database you do not have to redefine it in tempdb each time you reboot the server or restart SQL Server service.

Regards,
Kris Zywczyk|||Follow Kris, and also FYI,
http://vyaskn.tripod.com/sql_server_administration_best_practices.htm (http://vyaskn.tripod.com/sql_server_administration_best_practices.htm)|||Thank you,Kris Zywczyk.
Thank you, rudra.

However, after I define my data types in MODEL system databse, if I create a new database, the defined data types will automatically be added into the new database. I hope it can not happen. How can I do?

Thank you!|||Why do you want to create any tables in tempdb?|||Good lord. Don't even touch tempdb.
And in my opinion, don't bother with user-defined datatypes. They have little purpose.|||In SQL Server 2005, we can create a table in tempdb database so that different users can get access to data in the table. At the same time, when the SQL Server Services stop, tables created in tempdb database will be automatically destroyed. So in our project we want ot create a table in the tempdb database. However when we create the table, we can not use user-defined data type(the data types are defined in database "CVPRO"). Please give me some help.

Thanks!|||Hi
If you want to use user-defined data type you need to define it in current database (database where you create the table).

Can't you use standard tables in your 'CVPRO' database and delete it when it is not used?
You can always create the SQL Server Agent job dropping not needed tables and schedule it to run daily at i.e. 11 PM...

What exactly you want to do?

How to Share Subreport Data with the Main Report

I'm having trouble passing a record from a subreport to the main report is CR X any help would be greatly appreciated.This can be done using shared variables.Same shared variable has to be declared in main as well as sub report and in sub report the variable can be assigned the value to be passed to main report which will be accessible in the variable after the sub report.

How to share read only data

Hi,

I'm new to replication. Can anyone help with the following?

I want to publish the specific rows of data that are created on the publisher without accepting changes to those rows from subscribers, but do accept new rows (and changes to those rows) from subscribers.

EG. publisher creates rows 1 and 2 which are published to the subscriber

subscriber creates rows 3 and 4 which are merged back to the publisher

subscriber's updates (or delets) to rows 1 and 2 are not merged back to the publisher

So basically I want the publisher created rows to be published but remain as is whilst allowing subscriber created rows to be merged back to the publisher.

Hope is makes sense.

Thanks in advance,

Seedsy

Look at the properties of the articles (tables). There is an option called Synchronization Direction. That property, along with others, are what you are looking for.

By default, the Synchronization Direction property is set to Bidirectional, meaning, data will be synchronized both directions. I am pretty sure you can set this property to only allow synchronization one direction.

Hope this helps...

|||

I couldn't find any properties within the Publication's Articles' "Table Article Properties" but I found the SQLMergeObject's ExchangeType Property which allows upload / download / bidirectional. Shame its not a GUI option within the REPL tools.

Thanks I should be able to work it out from here.

|||Basically you want to publish ins/upd/del changes from the publisher to the subscriber, and only inserts at the subscriber to the publisher, correct? Seems like you want to implement bi-directional transactional replication (or possibly peer to peer replication), you can decide not to replicate upd and del commands at one of the nodes in the article properties.|||

Thanks Greg.

I can see that Table Article properties allows checking of the user permissions when merging subscriber changes for Insert, Update and Delete.

So is the approach that ... one should be using the restrictions of user permissions to disallow update and delete by the subscriber?

Seedsy

PS I should mention I'm using SQL2000 (V8.00.2039) SP4 so maybe I don't have all the bells and whistles.

|||i'm not sure it will work for merge replication, but I'm sure bi-directional transactional replication is what you need if you're on SQL 2000.

How to share parameter value between main and subreport?

Hi All,

I am really lousy when it comes to creating reports. So I am seeking your expert advise/experience.

I have a report that uses a stored-procedure as its data source. This procedure has a parameter. Within this report, I created a subreport which also sources to yet another stored-procedure that also has a parameter which expects the same value as the param of the main report.

When I run the report, say in preview mode, I do not want to be prompted with the parameter twice (i.e. once for the main report, and another for the subreport). How can I edit/modify subreport so that in its select or formula it will say something like:

{?@.ParamOfSubReport} = {?@.ParamOfMainReport}

Many thanks in advance.

_msd_You need to use shared variable and you can use it anywhere in the report|||Right click on your sub-report and choose "Change sub-report links".

Example:

"?parameter1" in the main report links to "?Pm-?parameter1" in the sub-report, then choose the field in the datasource that the parameter is tested against.

When you enter the parameter in your main report it will be passed to the sub-report preview also.|||How do I pass a value returned from the stored proc in the main report to the sub report. I'm getting an error "cannot link from stored procedure" when I pass the value from main report to subreport using subreport links.

Immediate response would be appreciated. Thanks.|||Assign value to shared variable and use that in Sub report|||Hi, I saw this old thread and I am working on the same issue. I'm working on a simple dumb shell of a report in Crystal 8.5 as a test for how to pass parameters into a sql server 2000 stored procedure via a subreport. I'd like to deliver this as straight Crystal without using vb or other shells to call the report from.

Eventually I need to modify a copy of a main report with data and about 8 subreports, all pulling from stored procedures using one parameter called ID. I am getting many requests for this ID parameter, for each subreport, even though I am linking the parameters via subreport links.

The subreport wants to link into the stored procedure using the parameter name from the stored procedure, which is @.ID. The main report only wants to give the subreport a subordinate link such as ?Pm-@.ID. I cannot name the stored procedure parameter with a name like ?Pm-@.ID because it violates the rules of transact-sql. It sees the hyphen as a subtraction. I can see the logic of using the same variable names, but how do I get rid of that bothersome hyphen?

I have also tried using shared variables and they connect to the subreport ok, but I'm still not closing the loop by linking into the stored procedure based on the shared variable.

I am trying to use the same information in multiple places without making the user enter the same information over and over again.

Has anyone had this problem before?sql

How to 'share drive', SCSI HD's on servers

I am not using a SAN to setup Win2003 CLusters, two nodes.
How can I share the hard disk in order to make this work for both nodes ?
All documentation I read states that I must have shared hard disk common to
the two servers and that's not clear to me when all I have is that hard
drive on the respective servers.
You can use SCSI disks. Just make sure whatever you get is on the catalog:
http://www.microsoft.com/windows/cat...5-23e9cd3ae95b
Cheers,
Rod
MVP - Windows Server - Clustering
http://www.nw-america.com - Clustering
"Marlon Brown" <marlon_brown@.hotmail.com> wrote in message
news:OEEkMpCdEHA.3016@.tk2msftngp13.phx.gbl...
> I am not using a SAN to setup Win2003 CLusters, two nodes.
> How can I share the hard disk in order to make this work for both nodes ?
> All documentation I read states that I must have shared hard disk common
to
> the two servers and that's not clear to me when all I have is that hard
> drive on the respective servers.
>

How to share dimensions for multiple cubes in AS 2005?

Hello,

I have a couple of cubes that I created using a wizard in AS 2005. Every time I create a new cube, a AS wizard adds dimensions with 1,2 etc at the end of their names. Is it possible to use/share existing dimensions which are used by other cubes instead of having bunch of dimensions which are the same and the only difference is their name?

Thanks!

When you are going through cube building wizard, once you get to the Review Shared Dimensions page, select all the dimensions that you want to reuse. The wizard will reuse these dimensions and it won't create the dimensions with the 1,2 etc.

Hope this helps.

Van Dieu

|||Altering what you have already generated may be complicated. I don't use the wizard to generate cubes, so I'm not sure how much work is involved to change it. It might be as simple as opening the cube editor, deleting the dimensions that are duplicates, and adding the ones that you want to use, but I doubt it. You'll probably have to alter the data source view and the dimension usage in the cube editor as well.|||

Actually, it is that easy. You can just open up the cube editor and delete all the duplicated dimensions. Then on the dimension usage tab add them back in (the dimensions that you want to share).

Van Dieu

|||Good to know Smile

How to share dataset after it was created within the report

Is there a way to share the dataset with the other reports once it was
created in once of the reports in the same project? Right now, we are
copying the same dataset from one to the others...
BrianI'm not sure if you want to pull out data from a created report, then
use that in the others.
Or, if you already have that data, and want to feed it into 5 reports?
I'm new to RS, and the only way I have used it sofar is setting up the
connections, parameters, then querying it through IIS. I myself am
wondering if I can take a Dataset (received through MSMQ), then tell a
Report 'use this data', then send it off to a printer (pdf etc).|||It looks like the solution to my problem will be to use the RS viewer
controls in VS.net 2005. Basically if it works the way I believe I can
get a dataset, then apply that to a number of reports, save them off to
PDF, then I am done.

how to setup the permission of share fold in log shipping ?

when I set up log shipping in SQL SERVER 2000
I got the following error:
'Unable to copy the initialization file to the secondary server '%s' '
I know this is permission question about the share fold to log file.
I want to know the following thing:
one is how to setup permisson about about the share fold to log file?
two is whether log shpping primary and the secondary db must be run
in domin mode or not?
thanks in advance!
1. if your logshipping jobs are owned by 'sa', the acct for sqlserver
service needs to have access to the shared.
2. no, they do not have to be running in a same domain. the key here is to
ensure each server can access the shared.
-oj
<lovexueer@.gmail.com> wrote in message
news:1143611950.475014.180370@.i39g2000cwa.googlegr oups.com...
> when I set up log shipping in SQL SERVER 2000
> I got the following error:
> 'Unable to copy the initialization file to the secondary server '%s' '
> I know this is permission question about the share fold to log file.
> I want to know the following thing:
> one is how to setup permisson about about the share fold to log file?
> two is whether log shpping primary and the secondary db must be run
> in domin mode or not?
>
> thanks in advance!
>

how to setup the permission of share fold in log shipping ?

when I set up log shipping in SQL SERVER 2000
I got the following error:
'Unable to copy the initialization file to the secondary server '%s' '
I know this is permission question about the share fold to log file.
I want to know the following thing:
one is how to setup permisson about about the share fold to log file?
two is whether log shpping primary and the secondary db must be run
in domin mode or not?
thanks in advance!1. if your logshipping jobs are owned by 'sa', the acct for sqlserver
service needs to have access to the shared.
2. no, they do not have to be running in a same domain. the key here is to
ensure each server can access the shared.
-oj
<lovexueer@.gmail.com> wrote in message
news:1143611950.475014.180370@.i39g2000cwa.googlegroups.com...
> when I set up log shipping in SQL SERVER 2000
> I got the following error:
> 'Unable to copy the initialization file to the secondary server '%s' '
> I know this is permission question about the share fold to log file.
> I want to know the following thing:
> one is how to setup permisson about about the share fold to log file?
> two is whether log shpping primary and the secondary db must be run
> in domin mode or not?
>
> thanks in advance!
>

how to setup the permission of share fold in log shipping ?

when I set up log shipping in SQL SERVER 2000
I got the following error:
'Unable to copy the initialization file to the secondary server '%s' '
I know this is permission question about the share fold to log file.
I want to know the following thing:
one is how to setup permisson about about the share fold to log file?
two is whether log shpping primary and the secondary db must be run
in domin mode or not?
thanks in advance!1. if your logshipping jobs are owned by 'sa', the acct for sqlserver
service needs to have access to the shared.
2. no, they do not have to be running in a same domain. the key here is to
ensure each server can access the shared.
--
-oj
<lovexueer@.gmail.com> wrote in message
news:1143611950.475014.180370@.i39g2000cwa.googlegroups.com...
> when I set up log shipping in SQL SERVER 2000
> I got the following error:
> 'Unable to copy the initialization file to the secondary server '%s' '
> I know this is permission question about the share fold to log file.
> I want to know the following thing:
> one is how to setup permisson about about the share fold to log file?
> two is whether log shpping primary and the secondary db must be run
> in domin mode or not?
>
> thanks in advance!
>|||sorry,I don't understand what you said to the first quesiton?
can you tell furthur detailed information about how to setup the
permisson of shared fold ?sql