Showing posts with label via. Show all posts
Showing posts with label via. Show all posts

Monday, March 26, 2012

principal to proxy problem

I can successfully execute my package via Business Studio but when I schedule it in SQL Agent I get the error message, 'could not get proxy data for proxy id = 2.' I am trying to execute the scheduled job with that proxy (call it abcd_proxy) because I have a logon id (call it abcd) with access to a specific network drive folder, which holds a required source flat file. The abcd logon is defined as a sysadmin account. I am unable to see that the abcd logon id is an added principal within the abcd_proxy, which I think is because the abcd logon principal has a sysadmin role. My proxy id = 2 definition looks to be defined the same way that my first proxy id was.

Does anyone have an idea about what the message means and how I can fix it?

I had to create a proxy recently to have an SSIS package write a file to a network folder. I am by no means an expert on the subject, but here is what I had to do.

I had to first create a windows account with the right credentials. I then created a credential, a proxy for the credential, and of course set the "Run As" parameter for the step to the proxy. I made sure that the new account was added as a sysadmin in SQL Server, added the account to the "Users" group on the server, as well as to the Logon as batch security policy. When I still had problems with the package being able to read a file it was related to the credentials of the account, which I had the network admin fix. Everything now runs fine.

I apologize if I have stated the obvious to you, but just wanted to share with you all the steps I had to take to perform a task very similar to what you are trying to do. Of course, I had to also use an "absolute" network path and not a mapped drive letter.

Hope this helps.

Monday, March 12, 2012

primary key

Hi All,
I need to update a table on a server from my PDA, so what I am doing is the
following:
I pull the table to the PDA via RDA Pull. Tracking is ON and the table has
an autoincrement primary key as well. All I want to do is add to this table
the data captured by my PDA (so I am not interested in any data coming from
the server thus I am using a filter to bring an effectively empty table..)
Then, I copy all the data from my local table to this newly pulled table ...
I do an INSERT INTO Table (col1, col2, ..) select col1, col2, ... FROM the
local PDA table.. My records get copied and now I am ready to send them via
a PUSH. The problem is of course that since my newly pulled table didn't
have any records to start with, its primary key starts to increment from
1... and when I do a PUSH there is a problem because such a primary key w/ a
value of 1 already exists on the table on the server side... so in order to
force it to count from where it should, I did the following:
Instead of pulling an empty table from the server, I pull the last record
in.. I just do this in my PULL call: select * from server-table where pkey =
(select max(pkey) from server-table).. where pkey is the primary key. This
will give me the last row (the highest value of the primary key). Then, I do
the copy from the local PDA table to this newly pulled table so its primary
key instead of incremeting from 1, it increments from where it should...
Then, I do a PUSH...
Is there a better approach for this kind of situation? Anyway, I have
problems with this approach because in the future I may have multiple PDAs
that want to send their local data to the server table and then it will be a
primary key mess..
I would be really grateful if you know of a better way or at least to
confirm that this is a reasonsable way of doing things,
Thanks!
you can try to manage identity columns in an RDA architecture, but as
you said, it gets very difficult across a large pool of mobile users. you'd
be better off using a GUID and the NewID() function as your primary
key on this table. then you don't have to worry about ranges and conflicts.
Darren Shaffer
..NET Compact Framework MVP
Principal Architect
Connected Innovation
www.connectedinnovation.com
"vvf" <novvfspam@.hotmail.com> wrote in message
news:e5gz%23chyFHA.720@.TK2MSFTNGP15.phx.gbl...
> Hi All,
> I need to update a table on a server from my PDA, so what I am doing is
> the
> following:
> I pull the table to the PDA via RDA Pull. Tracking is ON and the table has
> an autoincrement primary key as well. All I want to do is add to this
> table
> the data captured by my PDA (so I am not interested in any data coming
> from
> the server thus I am using a filter to bring an effectively empty table..)
> Then, I copy all the data from my local table to this newly pulled table
> ...
> I do an INSERT INTO Table (col1, col2, ..) select col1, col2, ... FROM the
> local PDA table.. My records get copied and now I am ready to send them
> via
> a PUSH. The problem is of course that since my newly pulled table didn't
> have any records to start with, its primary key starts to increment from
> 1... and when I do a PUSH there is a problem because such a primary key w/
> a
> value of 1 already exists on the table on the server side... so in order
> to
> force it to count from where it should, I did the following:
> Instead of pulling an empty table from the server, I pull the last record
> in.. I just do this in my PULL call: select * from server-table where pkey
> =
> (select max(pkey) from server-table).. where pkey is the primary key.
> This
> will give me the last row (the highest value of the primary key). Then, I
> do
> the copy from the local PDA table to this newly pulled table so its
> primary
> key instead of incremeting from 1, it increments from where it should...
> Then, I do a PUSH...
> Is there a better approach for this kind of situation? Anyway, I have
> problems with this approach because in the future I may have multiple PDAs
> that want to send their local data to the server table and then it will be
> a
> primary key mess..
> I would be really grateful if you know of a better way or at least to
> confirm that this is a reasonsable way of doing things,
> Thanks!
>
>
|||> you can try to manage identity columns in an RDA architecture, but as
> you said, it gets very difficult across a large pool of mobile users.
> you'd
> be better off using a GUID and the NewID() function as your primary
> key on this table. then you don't have to worry about ranges and
> conflicts.
The problem is that it is not to fun to maintain a databas where primary
keys are GUID.
select * from Customer
where CustId = 123A224D-916E-40DA-B159-6E1E399D4A50
Ola Ekelund
SoftConsult, SWEDEN
|||Hi,
"Darren Shaffer" <darrenshaffer@.discussions.microsoft.com> wrote in message
news:#eM6$viyFHA.2516@.TK2MSFTNGP12.phx.gbl...
> you can try to manage identity columns in an RDA architecture, but as
> you said, it gets very difficult across a large pool of mobile users.
you'd
> be better off using a GUID and the NewID() function as your primary
> key on this table. then you don't have to worry about ranges and
conflicts.
Thanks for the answer. Copying from the local PDA table to the newly pulled
table should be done via a stored procedure right? (to improve
performance)... that's just because I always have to do the INSERT INTO...
SELECT FROM.
The other question that I have is: Let's say I have two PDAs that are trying
to do a PUSH. The first PDA does the PUSH first, and thus SQL Server is busy
receiving the PUSH from the first PDA. Meanwhile, before this PUSH is over,
the second PDA is attempting a PULL and then a PUSH... would a second PUSH
be a problem because the SQL Server would be busy "processing" the first
PUSH from the first PDA? Or should it just spawn a different thread and
server the second PUSH as well even though the first PUSH has not completed
yet?
Thanks!

Saturday, February 25, 2012

Preview pane not showing data

I have a problem within the Report Designer in Visual Studio .NET. I a new
report, I define a dataset that returns data via a SQL query fine. I design
the report without issues, but when I try to preview the report, no data is
displayed.
This error seems to have occured after applying reporting services SP1 to my
machine. No errors are reported, and nothing appears in the event log.
Any ideas as to how I can correct this problem out there?
Thanks in advance.
MattIs there an .rdl.data file in the same directory as your .rdl file? If so, delete it and try again.
Also, does hitting the Refresh button in the preview pane have any effect?
--
Thanks.
Donovan R. Smith
Software Test Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
"Matt Pothier" <Matt.Pothier@.sonepar-us.com> wrote in message
news:eEtr8WvfEHA.596@.TK2MSFTNGP11.phx.gbl...
> I have a problem within the Report Designer in Visual Studio .NET. I a new
> report, I define a dataset that returns data via a SQL query fine. I design
> the report without issues, but when I try to preview the report, no data is
> displayed.
> This error seems to have occured after applying reporting services SP1 to my
> machine. No errors are reported, and nothing appears in the event log.
> Any ideas as to how I can correct this problem out there?
> Thanks in advance.
> Matt
>|||Thanks for the response. There were .rdl.data files in the same directory.
I tried deleting them, but got the same results. The refresh button did not
help either.
In a moment of frustration I uninstalled reporting services; performed a
repair install on VS .Net, reinstalled Reporting services; applied the
service pack and started over again. Everything seems to be working now.
"Donovan R. Smith [MSFT]" <donovans@.online.microsoft.com> wrote in message
news:%23iGKIuvfEHA.3556@.TK2MSFTNGP12.phx.gbl...
> Is there an .rdl.data file in the same directory as your .rdl file? If
so, delete it and try again.
> Also, does hitting the Refresh button in the preview pane have any effect?
> --
> Thanks.
> Donovan R. Smith
> Software Test Lead
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> "Matt Pothier" <Matt.Pothier@.sonepar-us.com> wrote in message
> news:eEtr8WvfEHA.596@.TK2MSFTNGP11.phx.gbl...
> > I have a problem within the Report Designer in Visual Studio .NET. I a
new
> > report, I define a dataset that returns data via a SQL query fine. I
design
> > the report without issues, but when I try to preview the report, no data
is
> > displayed.
> >
> > This error seems to have occured after applying reporting services SP1
to my
> > machine. No errors are reported, and nothing appears in the event log.
> >
> > Any ideas as to how I can correct this problem out there?
> >
> > Thanks in advance.
> >
> > Matt
> >
> >
>

Monday, February 20, 2012

Preventing [sa ] to login via Query analyzer [SQL Server 2005]

I am implementing the security and add different windows domain group and also assign then appropriate rights and permission.

No i want that if some knows the "sa" password and want to connect to sql server 2005 via query analyzer then message should display to user that u can not login with sa login while using SQL Server Query analyzer.

How i can identify and can display the message?

Thanks a lot in advance.

I don't think you can block sa access only for query analyser. The identity of the application connecting to SQL Server is spoofable so it really can't be trusted.

If you want to prevent the sa from accessing at all you can disable it with

ALTER LOGIN sa disable

and this will prevent sa from connecting.

hth,

-Steven Gott

S/DET

SQL Server