Sunday, March 25, 2012
active-x replication controls and slow link
Have a client who has a slow dialup connection. Synchronisation keeps
failing because of this.
I''m using the active-x controls. Are there any parameters/properties I can
set to tell it to hang on and be patient, and generally be more reliable ?
Thanks
Bruce
Bruce,
try increasing the logintimeout and querytimeout properties.
HTH,
Paul Ibison
sql
ActiveX in Reporting Services report
ActiveX controls in the client area of the report (or at least that's what I
interpreted). I'm able to add an in-house developed ActiveX control to the
toolbox in Visual Studio but the control is grayed out and will not allow me
to drag it to the main area of the report. Has anyone successfully created a
VB6 ActiveX control that works in Reporting Services? If so, what do I need
to do to allow the control to be used in the report? Here's what I'm trying
to do: I've got an ActiveX control that shells out and executes an exe on
the client machine (the exe I am shelling out to start is a DDE bridge
application).Close dev studio and reopen it - if you have installed SP1 with it open,
sometimes it will gray it out.
=-Chris
"DSlattery" <DSlattery@.discussions.microsoft.com> wrote in message
news:2FD0E033-0709-49A3-B877-2C50FA1780FC@.microsoft.com...
> Hi there. I've read on the web that Reporting Services report can support
> ActiveX controls in the client area of the report (or at least that's what
> I
> interpreted). I'm able to add an in-house developed ActiveX control to
> the
> toolbox in Visual Studio but the control is grayed out and will not allow
> me
> to drag it to the main area of the report. Has anyone successfully
> created a
> VB6 ActiveX control that works in Reporting Services? If so, what do I
> need
> to do to allow the control to be used in the report? Here's what I'm
> trying
> to do: I've got an ActiveX control that shells out and executes an exe on
> the client machine (the exe I am shelling out to start is a DDE bridge
> application).|||Hi Chris. Thanks for responding. I've tried to close and re-open VS but the
control is still disabled. I'm relatively certain I've installed the latest
service pack for Reporting Services.
The version I have is
Microsoft SQL Server Report Designer
Version 8.00.878.00
I've also tried other ActiveX controls with the same results.
"Christopher Conner" wrote:
> Close dev studio and reopen it - if you have installed SP1 with it open,
> sometimes it will gray it out.
> =-Chris
> "DSlattery" <DSlattery@.discussions.microsoft.com> wrote in message
> news:2FD0E033-0709-49A3-B877-2C50FA1780FC@.microsoft.com...
> > Hi there. I've read on the web that Reporting Services report can support
> > ActiveX controls in the client area of the report (or at least that's what
> > I
> > interpreted). I'm able to add an in-house developed ActiveX control to
> > the
> > toolbox in Visual Studio but the control is grayed out and will not allow
> > me
> > to drag it to the main area of the report. Has anyone successfully
> > created a
> > VB6 ActiveX control that works in Reporting Services? If so, what do I
> > need
> > to do to allow the control to be used in the report? Here's what I'm
> > trying
> > to do: I've got an ActiveX control that shells out and executes an exe on
> > the client machine (the exe I am shelling out to start is a DDE bridge
> > application).
>
>|||Sorry, ActiveX controls in reports are not supported.
--
Albert Yen
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"DSlattery" <DSlattery@.discussions.microsoft.com> wrote in message
news:5CF40528-C7E7-453F-81BE-C02B8D85493B@.microsoft.com...
> Hi Chris. Thanks for responding. I've tried to close and re-open VS but
the
> control is still disabled. I'm relatively certain I've installed the
latest
> service pack for Reporting Services.
> The version I have is
> Microsoft SQL Server Report Designer
> Version 8.00.878.00
> I've also tried other ActiveX controls with the same results.
> "Christopher Conner" wrote:
> > Close dev studio and reopen it - if you have installed SP1 with it open,
> > sometimes it will gray it out.
> >
> > =-Chris
> >
> > "DSlattery" <DSlattery@.discussions.microsoft.com> wrote in message
> > news:2FD0E033-0709-49A3-B877-2C50FA1780FC@.microsoft.com...
> > > Hi there. I've read on the web that Reporting Services report can
support
> > > ActiveX controls in the client area of the report (or at least that's
what
> > > I
> > > interpreted). I'm able to add an in-house developed ActiveX control
to
> > > the
> > > toolbox in Visual Studio but the control is grayed out and will not
allow
> > > me
> > > to drag it to the main area of the report. Has anyone successfully
> > > created a
> > > VB6 ActiveX control that works in Reporting Services? If so, what do
I
> > > need
> > > to do to allow the control to be used in the report? Here's what I'm
> > > trying
> > > to do: I've got an ActiveX control that shells out and executes an
exe on
> > > the client machine (the exe I am shelling out to start is a DDE bridge
> > > application).
> >
> >
> >sql
Tuesday, March 20, 2012
Active X error when trying to print
Anyone have a fix for this or an idea what's going on?
Is there a version of IE that I need to have?
How can I clear out the control and d/l it again
Thanks for any replies,
Bill
seems like the ie version might be old make sure that you have i.e 6.0 with latest service packs.
plus you may want to research the issue with the active x controls as client side printing tries to download once the active x control to the users machine.
Active X control for the client Print
Hi Tomas,
Once you've downloaded the cab on your machine, you can find the RSClientPrint.cab in the following directory:
C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer\bin
According to: http://www.kodyaz.com/articles/client-side-printing-silent-deployment-of-rsclientPrint.aspx
Then you should be able to distribute it to your clients.
Good luck!
Jessica
Tuesday, March 6, 2012
Acessing SSAS
Hi,
i am developing a BI project for a client with SQL Server 2005. I am able to access the Database Engine on my client's server through Management Studio using a specific account but i can't acess Analyis Services or Integration Services because i can only connect through Windows Authentication (all options on the connect window are greyed out) and my user is not a domain user.
How can i solve this?
Best Regards,
Tiago
Are you certain that SSAS and SSIS are online and that your login has permissions.Friday, February 24, 2012
Accessing the underlying sql query from the rdl file
Our client uses the report builder to generate reports for collection of employees. We would like to use the employee records in this report to perform some additional processing (such as the list of employees gets assigned to a particular group).
Programmatically, I can retrieve a byte stream from rs.GetReportDefinition( "\myClientEmpReport") and deserialize the stream into Report object (as define by ReportDefinition.xsd).
I can then manually drill down and retrieve the SematicQuery xml from the commandText field.
The problem is how to convert the SemanticQuery format into a T-Sql query that I can run against the view that the report model is based off of.
Is this possible?
Thanks,
Arjay
P.S. Running SQL 2005 Reporting Services, VC# 2005, ASP.Net 2.0.
After attempting to autogenerate serialization classes on the SemanticQuery xml with Xsd and XsdObjectGen, I ended up hand coding some classes that handled recursion. From there, I was able to regenerate the sql query by walking through the filter and grouping sections. While this isn't a generic solution, it works well for my needs because the model I need this for is a single datasource derived from a view.
As a feature request, it sure would be nice to be able get the query string from the reporting engine directly.
Sunday, February 19, 2012
Accessing SWebmObjectSet Objects
I'm working in an environment where domain structure and firewall rules only allow access to a SQL Server - including OS - via a SQL Server client connection. I'm attempting to collect various pieces of information for an inventory database that are not normally accessible through standard t-sql calls.
A specific example is collecting network adapter and IP information via WMI and sp_OAxxx procedures. I've been able to interface WMI and retrieve the SWebmObjectSet collection with the information I want, but I can't seem to get to the individual objects in the collection for two reasons. First, t-sql doesn't have any sort of "for each" construct that allows me to iterate through the objects. Second, the Item() method of SWebmObjectSet requires an object path that I haven't been able to enumerate.
I'm avoiding enabling xp_cmdshell in SQL 2005 so calls such as "ipconfig /all" are not at option at this point.
How can I access the individual objects in the collection via t-sql? Is there another technology I might use? Remember - I can only access via a standard SQL client.
Here is some code I've come up with so far.
-- INITIALIZE SCRIPT
DECLARE@.wmiLocatorINT,
@.wmiServicesINT,
@.wmiObjectSetINT,
@.wmiObjectCountINT,
@.wmiObjectINT,
@.wmiNetAdapterNameNVARCHAR(200),
@.wmiNetAdapterIPNVARCHAR(200),
@.loopIdxINT,
@.oleSourceNVARCHAR(500),
@.oldDescNVARCHAR(500),
@.rcBIGINT,
@.msgNVARCHAR(400)
-- INITIALIZE WMI COM OBJECTS
EXEC @.rc = master.dbo.sp_OACreate 'WbemScripting.SWbemLocator', @.wmiLocator OUTPUT
IF @.rc <> 0 BEGIN
PRINT 'Create WMI object failed'
RETURN
END ELSE BEGIN
EXEC @.rc = master.dbo.sp_OAMethod @.wmiLocator, 'ConnectServer', @.wmiServices OUTPUT, '.'
IF @.rc <> 0 BEGIN
EXEC master.dbo.sp_OADestroy @.wmiLocator
RETURN
END
END
-- COLLECT DESIRED DATA
EXEC@.rc = master.dbo.sp_OAMethod @.wmiServices, 'InstancesOf', @.wmiObjectSet OUTPUT, 'Win32_NetworkAdapterConfiguration'
EXEC@.wmiObjectCount= master.dbo.sp_OAGetProperty @.wmiObjectSet, 'Count', @.wmiObjectCount OUTPUT
SELECT@.loopIdx= 0
WHILE @.loopIdx < @.wmiObjectCount - 1 BEGIN
EXEC@.rc= master.dbo.sp_OAMethod @.wmiObjectSet, 'Item', @.wmiObject OUTPUT, @.loopIdx
IF @.rc <> 0 BEGIN
EXEC@.rc= master.dbo.sp_OAGetErrorInfo @.wmiObjectSet, @.oleSource OUTPUT, @.oldDesc OUTPUT
END ELSE BEGIN
EXEC@.rc= master.dbo.sp_OAGetProperty @.wmiObject, 'Caption', @.wmiNetAdapterName OUTPUT
EXEC@.rc= master.dbo.sp_OAGetProperty @.wmiObject, 'IPAddress', @.wmiNetAdapterIP OUTPUT
END
SELECT@.loopIdx= @.loopIdx + 1
END
-- CLEANUP
EXEC master.dbo.sp_OADestroy @.wmiServices
EXEC master.dbo.sp_OADestroy @.wmiLocator
Is it fair to assume that you have completely explored and discarded the various system metadata, security, stastical and configuration functions, as well as the ODBC functions?
Would it be possible to have a Windows Scheduler task that would freqently run, using SQLCmd.exe to populate a table in the server with the desired information?
|||If you mean the SQL Server metadata, security, statistical and configuration functions, then yes I have. But it is entirely possible I missed something which is why I posted the question.
It is possible to use the Windows Scheduler as you noted. I'm not a fan of installing DBA utilities on every server I manage if I can get away with a centralized solution. Additionally, there are many devices in scope that have firewall rules preventing console access and/or file transfer mechanisms. In short, the only mechanism I have is a standard SQL client. That is not to say that I couldn't petition the security team for relaxed access, but security is king here and it would be a battle I would likely lose.
One solution I've considered is use of the xp_cmdshell. Enabling it in SQL 2005 is possible, but I would prefer to leave it alone if I can.
Bruce.
|||This really sounds like a task for an administrative WMI script -controlled and executed by the system administrators, retrieving the data and storing it in a central server for you to access. I would think that such an approach would molify the net administrator's security concerns. Easily done with MOM/SMS or whatever monitoring/management software is being used.
Accessing SQL2005
Network storm. What's the app doing during the hang? Use Profiler to see
what the DB is doing. Does 2005 SP1 or SP2 work any better?
"Timbo" wrote:
> I have a fairly heavy duty app that can use SQL2005, however I am getting
> some rather strange behaviour, if MSDE or SQL2000 is used, this doesn't
> appear to happen. Here's what happens:
> The VB6 application makes fairly regular calls on the database (only when
> the user requests data). At what appears to be completely random times
> (when the user makes a request for data) the application will lock up for
> anything up to 1 minute before carrying on. Obviously the user thinks the
> machine has crashed and starts clicking everywhere, which does make the
> application crash!
> This does not appear to happen with MSDE or SQL2000 databases. My
> application opens and maintains only one connection to the database, where
> all the SQL requests are piped through. I'm wondering if this is good
> practice? Also my application never maintains open recordsets, I always use
> SELECT to populate a screen, and only when the user hits a save button does
> the database get updated with UPDATE and INSERT SQL commands.
> If no one can shed any light on this specific problem, does anyone have a
> guide for best practices when it comes to connection states.
> Kind Regards
> Tim
>
>
I don't know the answer to this new question. I think you should create a
new post for this question. Maybe the SQL Server OLEDB group is probably
better.
"Timbo" wrote:
> I think I may have the answer.
> After reading about connection pooling, I think I might have my answer...
> Am I right in saying....
> At the moment my application opens a OLEDB connection when the user starts
> the application. At no point is the connection closed until the application
> quits (even then I don't think I have a close command), however I ALWAYS
> close and release recordsets and commands. If I was to close the connection
> every time I retrieved a recordset or executed a command (or whatever),
> because of connection pooling the performance wouldn't be hit, but each
> command will have a nice new fresh connection to use.
> What do you reckon?
>
> "Dave Michaud" <DaveMichaud@.discussions.microsoft.com> wrote in message
> news:4E6D21D8-087E-4894-98D8-460F6ABAA58F@.microsoft.com...
>
>
|||"Timbo" <me@.home.com> wrote in message
news:%236IXdlO4HHA.5724@.TK2MSFTNGP05.phx.gbl...
> I think I may have the answer.
> After reading about connection pooling, I think I might have my answer...
> Am I right in saying....
> At the moment my application opens a OLEDB connection when the user starts
> the application. At no point is the connection closed until the
application
> quits (even then I don't think I have a close command), however I ALWAYS
> close and release recordsets and commands. If I was to close the
connection
> every time I retrieved a recordset or executed a command (or whatever),
> because of connection pooling the performance wouldn't be hit, but each
> command will have a nice new fresh connection to use.
> What do you reckon?
>
<snipped>
That sounds backwards.
I think you meant you didn't release the ADODB.Connection object until the
Application quits. You should be opening and closing "connections" before
and immediately after you use one, the same as for Commands and Recordsets.
Amplification (or confusion <g>) follows...
When using Connection Pooling in ADO if you Open a Connection the pool
provides one. Period. Whether it gets the last one in a queue, or a new one,
is all dependent on what is going on. If there is no activity for a period
of time (it used to be like a second, it is now far less) then the
connection is closed automatically.
So when using ADO Connection Pooling, standard practice is to create one
ADODB.Connection object and open it when ever one is needed. And close it
when it is not. (Again don't destroy it, just open/close) You're never
actually "Closing" the connection, you merely signalling the POOL that it
can if it wants to. ie, helps manage the Pool manage its pool.
[Just to make sure we are talking about the same thing here.
If I create an object as in...
Dim cnn As ADODB.Connection: Set cnn = New ADODB.Connection.
I have created an object which has an ADO Pool associated with it.
This object creation does all the real grunt work, it figures out the
various middle layer components that are going to be used, and checks to
make sure they are available. It then seeks out the store and asks
permission to talk. ADO and the store work out the details. ADO then sets up
a virtual wire from your app to the store. But doesn't plug it in. With all
of the real time consuming stuff out of the way. ADO announces the
Connection object ready and then waits for instructions. When it receives an
Open then it plugs the wire in, on close, it unplugs it, on long delays it
unplugs the wire rather that waste a socket.
When I do a ...
cnn.Open blah blah
I am only asking the Pool for an open connection]
Thus forget about trying to micro-manage "Connections" if using the Pool.
Just let the Pool do its job. It is likely better at it than you are. <g>
What OLEDB provider are you using. You may need to upgrade.
hth
-ralph
|||Depending on the data source, getting a connection can take some time,
however, in my experience, acquiring a SQL Server connection (after the
first) takes less than a second--whether or not you're pooling.
And no, I don't agree that connection pooling makes sense or is at all
necessary for Windows Forms applications. I agree that it's essential for
ASP-based applications or XML Web Services, but not for Windows Forms. I
recommend opening the Connection and leaving it open for the life of the
application. Does this reduce scalability? Sure, to about 3000
connections--far more than any MSDE engine could handle.
I doubt if it's connection overhead that's causing the problem, but it would
be easy to tell. Set the ConnectionTimeout to a low value (say, 10 seconds)
and trap the error/exception. If it goes off you have something to debug.
Consider that SQL Server does not pre-allocate space in the database. From
time to time as new rows are added, it must go off an build extents and
expand the database. On a wimpy system or one that's being used for other
operations (where SQL Server must share resources with other processes),
this can take 10-30 seconds. To prevent the user from clicking and
restarting, be sure to "entertain" them with a progress bar--and make sure
to disable the mouse or the ability to click again in the form. However,
I've found that if the user sees an hourglass, a progress-bar or some other
indication that the app is running they won't reboot. Of course in some
cultures, the propensity to reboot is far shorter (as in New York) or far
longer (as in Arkansas) so your success-rate may vary.
I discuss these approaches in detail in my book.
hth
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------
"Timbo" <me@.home.com> wrote in message
news:%236IXdlO4HHA.5724@.TK2MSFTNGP05.phx.gbl...
>I think I may have the answer.
> After reading about connection pooling, I think I might have my answer...
> Am I right in saying....
> At the moment my application opens a OLEDB connection when the user starts
> the application. At no point is the connection closed until the
> application quits (even then I don't think I have a close command),
> however I ALWAYS close and release recordsets and commands. If I was to
> close the connection every time I retrieved a recordset or executed a
> command (or whatever), because of connection pooling the performance
> wouldn't be hit, but each command will have a nice new fresh connection to
> use.
> What do you reckon?
>
> "Dave Michaud" <DaveMichaud@.discussions.microsoft.com> wrote in message
> news:4E6D21D8-087E-4894-98D8-460F6ABAA58F@.microsoft.com...
>
|||"William Vaughn" <billvaNoSPAM@.betav.com> wrote in message
news:u2%237GMQ4HHA.4436@.TK2MSFTNGP03.phx.gbl...
> Depending on the data source, getting a connection can take some time,
> however, in my experience, acquiring a SQL Server connection (after the
> first) takes less than a second--whether or not you're pooling.
> And no, I don't agree that connection pooling makes sense or is at all
> necessary for Windows Forms applications. I agree that it's essential for
> ASP-based applications or XML Web Services, but not for Windows Forms. I
> recommend opening the Connection and leaving it open for the life of the
> application. Does this reduce scalability? Sure, to about 3000
> connections--far more than any MSDE engine could handle.
> I doubt if it's connection overhead that's causing the problem, but it
would
> be easy to tell. Set the ConnectionTimeout to a low value (say, 10
seconds)
> and trap the error/exception. If it goes off you have something to debug.
> Consider that SQL Server does not pre-allocate space in the database. From
> time to time as new rows are added, it must go off an build extents and
> expand the database. On a wimpy system or one that's being used for other
> operations (where SQL Server must share resources with other processes),
> this can take 10-30 seconds. To prevent the user from clicking and
> restarting, be sure to "entertain" them with a progress bar--and make sure
> to disable the mouse or the ability to click again in the form. However,
> I've found that if the user sees an hourglass, a progress-bar or some
other
> indication that the app is running they won't reboot. Of course in some
> cultures, the propensity to reboot is far shorter (as in New York) or far
> longer (as in Arkansas) so your success-rate may vary.
> I discuss these approaches in detail in my book.
> hth
>
<snipped>
Whether ADODC.Connections should be Open/Closed is one of the few things I
mildly disagree with you on. I say mildly, because it is tough to defend
doing something that "probably" isn't all that necessary. The average
single-threaded client app likely doesn't need to open and close the
connection, since unless you are in a closed loop occasions where you would
ever need more than one connection at a time, seldom come up. And with the
quick time-out it would be equally difficult to keep one open anyway.
It reminds me of the same situation of whether or not to Set references
dim'd locally to Nothing, or just let the OS take care of it when the
procedure exits. Some will defend an explicit release arguing that one is
saving some clicks. (And perhaps measurable if you call the routine about
30,000 times. Others argue for completeness, that while it is unnecessary
99.9% of the time - there is always that one object, that migration to a
different environment, or chance encounter with a less attentive maintainer
who expands the routine, &etc.
I tend to side with the latter.
Both sides rarely, if ever, reach an agreement. <g>
-ralph
Thursday, February 16, 2012
Accessing SQL Server from AIX
connect to a SQL Server data souce from AIX, and if there was a SQL Client
for AIX?Hi
DataDirect have support for SQL Server via 64 bit ODBC on IBM AIX 5L (5.1
and 5.2)
http://www.datadirect.com/products/odbc64/overview/index.ssp
--
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Neall" <Neall@.discussions.microsoft.com> wrote in message
news:6F8CDEBB-B422-44AC-9097-93C5D0739512@.microsoft.com...
>I was wondering if it was possible (although not likely for our uses) to
> connect to a SQL Server data souce from AIX, and if there was a SQL Client
> for AIX?
Accessing SQL Server Analysis Services through something other than Windows Based Authentication
My company has developed several Analysis Services cubes for a client. They also developed an application for them to read the cubes. However, the problem comes from the fact that these cubes have to be read by anyone that accesses them, not just people belonging to the domain in which the server resides.
Now, my question is, how can they make the app so that anyone can access the cubes from anywhere, but by bypassing the Windows Authentication Procedure? This app is web-based.
I know you cannot use SQL Based authentication on Analysis Services. Is there a way I can set up IIS to maybe use the IUSR_<username> user for authentication? Maybe by adding the IUSR_<username> to the list of administrators?
Thanks,
If you set up HTTP authentication you can specify a username and password on the connection string. AS 2005 also supports allowing anonymous connections. I would not add the IUSR account to the administrators role, they only need to be added to a standard role that has rights to read the cube(s).
Monday, February 13, 2012
Accessing SQL Server 2000 via UNIX
I am having a problem accessing SQL Server 2000 via UNIX. I am
accessing SQL Server 2000 from Solaris using Sybase Open Client
(CT-Lib). Here is the error message:
CT-LIBRARY error:
ct_connect(): network packet layer: internal net library
error: Net-Library operation terminated due to disconnect
I have another SQL server 6.5 and I do not have any problems accessing
6.5 using the same strategy. Can someone tell me how I should
configure to access SQL Server 2000 from UNIX?
Thanks,
AmyI would guess that the network libraries have changed enough between SQL 6.5 and 2000 that using
your old Sybase connector wouldn't work any more. SQL 6.5 was very similar to Sybase; SQL 2000 is
probably much different, "under the covers".
You may need to get some updated middleware software.
"Amy Tseng" <amy_p_tseng@.yahoo.com> wrote in message
news:cf3e7e11.0307300812.a96be91@.posting.google.co m...
> Hi,
> I am having a problem accessing SQL Server 2000 via UNIX. I am
> accessing SQL Server 2000 from Solaris using Sybase Open Client
> (CT-Lib). Here is the error message:
> CT-LIBRARY error:
> ct_connect(): network packet layer: internal net library
> error: Net-Library operation terminated due to disconnect
> I have another SQL server 6.5 and I do not have any problems accessing
> 6.5 using the same strategy. Can someone tell me how I should
> configure to access SQL Server 2000 from UNIX?
> Thanks,
> Amy
Accessing SQL Server
I have installed SQL Server at client place, and client is having 30 compute
rs with 1 server network and Windows 2000 Based.
every thing was working fine and every client was able to access SQL Server,
but now i donno wut happend, it's not connecting with server and this error
message appears when i connect through ODBC or Enterprise Manager
Connection Failed:
SQLState: '01000'
SQL Server Error: 3
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()).
Connection Failed:
SQLState: '08001'
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exists or access denied.
this error does not appears if i log in as Domain Administrator, for resolvi
ng this error, i checked the authentication mode and it is Windows and SQL S
erver, wut could it be.
its very urgent
Email Response will be appreciated
Anwar
anwer_80@.yahoo.comTry making a new ODBC DSN and connect to the server. If it fails post the
entire Error message here.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.
Accessing sql database from client-side
I was told from Networking part of thsi forum to post this here in sql.
Is there a client side approach of sending and receiving data from a sql database without a web service or a server component (servicedcomponent and server app)? How can you simulate a network connection over the internet that could send and receive data from and to database? Can anyone point to a certain document or topic in internet about how to do this?
Thanks.
denpsia
I am not quite sure what you meant by "...without ... server component". Anyway, if you want to connect to sql server, the client tool "osql.exe" can do the job.
Just use osql -? for description about usage.
HTH.
|||Hi MC Wu,
Thanks for reply, MC. What I like to create a internet connection (VPN) programatically. I found some codes about RAS but not for vpn so I modified but its is not working. Can you or anyone help me solved this problem? Advanced thanks.
This inside main class
[code]
public void Dial()
{
if(_Handle!=IntPtr.Zero)
{
RASCONNSTATUS status=new RASCONNSTATUS();
uint res=RasAPI.RasGetConnectStatus(_Handle,status);
if(res==ERROR_INVALID_HANDLE) //res=ERROR_INVALID_HANDLE
_Handle=IntPtr.Zero;
else
return;
}
try
{
this._Params.szPhoneNumber = "<server ip>";
this._Params.szUserName = "<username>";
this._Params.szPassword = "dennispt200508";
RasAPI.RasCheck(RasAPI.RasDial(null,_Phonebook,_Params,1,_DialNotifyDelegate,ref _Handle));
RasAPI.RasConnectionNotification(_Handle,this._DisconnEvent.Handle,RASNOTIFICATION.RASCN_Disconnection);
RasAPI.RasDial(null,@."C:\Documents and Settings\All Users\Application Data\Microsoft\Network\Connections\Pbk\rasphone.pbk",_Params,1,_DialNotifyDelegate,ref _Handle);
StartWatch();
if (ConnectionState.IsModemConnected())
this.statusSend("Connected to 203.201.133.64");
else
this.statusSend("Unable to connect.");
}
catch(Exception e)
{
}
}
private void StartWatch()
{
StopWatch();
this._WatchThread=new Thread(new ThreadStart(RunWatch));
this._WatchThread.Start();
}
private void StopWatch()
{
if(this._WatchThread==null)
return;
if(this._WatchThread.IsAlive)
{
this._StopEvent.Set();
this._WatchThread.Join();
}
this._WatchThread=null;
}
private void RunWatch()
{
WaitHandle[] handles=new WaitHandle[]{this._StopEvent,this._DisconnEvent};
int ret;
this._StopEvent.Reset();
this._DisconnEvent.Reset();
while(true)
{
ret=WaitHandle.WaitAny(handles);
if(ret==0)
break;
if(ret==1)
{
this.OnDisconnected();
System.Diagnostics.Debug.WriteLine("Dis connected");
break;
}
}
}
private void OnConnected()
{
if(this.Connected==null)
return;
EventArgs args=new EventArgs();
if(this.SynchronizingObject!=null && this.SynchronizingObject.InvokeRequired)
{
this.SynchronizingObject.Invoke(Connected,new object[]{this,args});
}
else
{
Connected(this,args);
}
}
private void OnDisconnected()
{
if(this.Disconnected==null)
return;
EventArgs args=new EventArgs();
if(this.SynchronizingObject!=null && this.SynchronizingObject.InvokeRequired)
{
this.SynchronizingObject.Invoke(Disconnected,new object[]{this,args});
}
else
{
Disconnected(this,args);
}
}
private void OnDialNotify1(IntPtr hrasconn,uint unMsg,RASCONNSTATE rascs,uint dwError,uint dwExtendedError)
{
if(this.DialNotify1==null)
return;
string msg="";
if(dwError>0)
{
// msg=RasException.Code2RasErrorMessage(dwError);
}
else
{
// msg=RasConnection.GetRasConnStateMessage(rascs);
msg = this.GetRasConnStateMessage(rascs);
}
RasDialNotify1EventArgs args=new RasDialNotify1EventArgs(hrasconn,unMsg,rascs,dwError,dwExtendedError,msg);
if(this.SynchronizingObject!=null && this.SynchronizingObject.InvokeRequired)
{
this.SynchronizingObject.Invoke(DialNotify1,new object[]{this,args});
}
else
{
DialNotify1(this,args);
}
if(args.ConnectionState==RASCONNSTATE.RASCS_Connected)
OnConnected();
}
private string GetRasConnStateMessage(RASCONNSTATE state)
{
string ret="";
if(_Res!=null)
ret=(string)_Res.GetObject(state.ToString().Trim());
return ret;
}
[Browsable(false),Description("get or set SynchronizingObject")]
public ISynchronizeInvoke SynchronizingObject
{
get
{
if(_SynchronizingObject==null)
{
if(this.DesignMode)
{
IDesignerHost dh=this.GetService(typeof(IDesignerHost)) as IDesignerHost;
if(dh!=null)
{
_SynchronizingObject=dh.RootComponent as ISynchronizeInvoke;
}
}
}
return _SynchronizingObject;
}
set
{
_SynchronizingObject=value;
}
}
[/code]
Inside another class
[code]
internal sealed class RasAPI
{
private RasAPI(){}
[DllImport("rasapi32.dll",CharSet=CharSet.Auto)]
public extern static uint RasDial(
[In]RASDIALEXTENSIONS lpRasDialExtensions,
// pointer to function extensions data
[In]string lpszPhonebook, // pointer to full path and file
// name of phone-book file
[In]RASDIALPARAMS lpRasDialParams,
// pointer to calling parameters data
uint dwNotifierType, // specifies type of RasDial event handler
Delegate lpvNotifier, // specifies a handler for RasDial events
ref IntPtr lphRasConn // pointer to variable to receive
// connection handle
);
[DllImport("rasapi32.dll",CharSet=CharSet.Auto)]
public extern static uint RasGetConnectStatus(
IntPtr hrasconn, // handle to RAS connection of interest
[In,Out]RASCONNSTATUS lprasconnstatus
// buffer to receive status data
);
[DllImport("rasapi32.dll",CharSet=CharSet.Auto)]
public extern static uint RasGetErrorString(
uint uErrorValue, // error to get string for
StringBuilder lpszErrorString, // buffer to hold error string
[In]int cBufSize // size, in characters, of buffer
);
[DllImport("rasapi32.dll",CharSet=CharSet.Auto)]
public extern static uint RasConnectionNotification(
IntPtr hrasconn, // handle to a RAS connection
IntPtr hEvent, // handle to an event object
RASNOTIFICATION dwFlags // type of event to receive notifications for
);
public static void RasCheck(uint errorCode)
{
if(errorCode!=(uint)RasError.SUCCESS)
{
// throw new RasException(errorCode);
StringBuilder sb=new StringBuilder(512);
if(RasAPI.RasGetErrorString(errorCode,sb,sb.Capacity)>0)
throw new Exception("Unknow RAS exception.");
// string ret=sb.ToString();
}
}
}
[/code]
Inside class checking internet connection
[code]
public class ConnectionState
{
private enum ConnectionStateEnum
{
//Local system has a valid connection to the Internet, but it might or might not be currently connected.
ConnectionConfigured = 64,
//Local system uses a local area network to connect to the Internet.
ConnectionLan = 2,
//Local system uses a modem to connect to the Internet.
ConnectionModem = 1,
//No longer used.
ConnectionModemBusy = 8,
//Local system is in offline mode.
ConnectionOffline = 32,
//Local system uses a proxy server to connect to the Internet.
ConnectionProxy = 4,
//Local system has RAS installed.
RasInstalled = 16
}
class Win32
{
[DllImport("Wininet.dll", CharSet=CharSet.Auto)]
public static extern int InternetGetConnectedState(out int Flag, int Reserved);
}
private static int GetConnectionFlag()
{
int Flag;
Win32.InternetGetConnectedState(out Flag,0);
return Flag;
}
public static bool IsModemConnected()
{
return ((GetConnectionFlag() & (int)ConnectionStateEnum.ConnectionModem)==0) ?
false : true;
}
}
[/code]
den2005
Accessing shares over internet
a public IP address on our SQL server. THe program needs to access a shared
folder for printing reports in the program, but the client does not recognize
the UNC path to the folder because they are not on the network. How can I
get around this? LMHOSTS?
TIA,
S. Thompson
Hi
\\ipaddress\sharename does work over the internet, as long as the correct
ports are opened to allow Kerberos or NT Challenge/Response authentication.
If you do, you are asking to get hacked. I would not recommend doing this.
Is there not another printing solution you can use?
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"scottdog129" <scottdog129@.discussions.microsoft.com> wrote in message
news:24306B87-DD2D-4E0F-9C46-4CD8D7C9C999@.microsoft.com...
>I have a remote client accessing a SQL database via an internet connection
>to
> a public IP address on our SQL server. THe program needs to access a
> shared
> folder for printing reports in the program, but the client does not
> recognize
> the UNC path to the folder because they are not on the network. How can I
> get around this? LMHOSTS?
> TIA,
> S. Thompson
|||No, there doesnt seem to be another solution. Would I use an LMHOST entry
for that?
"Mike Epprecht (SQL MVP)" wrote:
> Hi
> \\ipaddress\sharename does work over the internet, as long as the correct
> ports are opened to allow Kerberos or NT Challenge/Response authentication.
> If you do, you are asking to get hacked. I would not recommend doing this.
> Is there not another printing solution you can use?
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "scottdog129" <scottdog129@.discussions.microsoft.com> wrote in message
> news:24306B87-DD2D-4E0F-9C46-4CD8D7C9C999@.microsoft.com...
>
>
Sunday, February 12, 2012
Accessing report parameters from code module can it be done?
each grouping in the report table displayed at the top of the report body
above the report table. It's easy to see why you can't just grab values from
the grouping footers and place them elsewhere. I had an idea to create some
report parameters and as the report is being rendered, run some custom code
that evaluates the field I'm trying to total and modifies the report
parameter I created for that specific total. Then I could use the report
parameter to display that specific total.
The problems with this are.. It seems that if I pass the parameter object
into the custom code function, it becomes read-only. Next, how would I be
able to tell the textbox that will show the total to wait to render until the
END of the report rendering. Lots of problems to try to overcome.
Basically, I need to take the value of a total in a subgroup (there are like
7 subgroups, so 7 different totals -- I can already take the ENTIRE report
total, but that's not what's neded) and copy it to a textbox either in the
report body ABOVE the report table.
Thanks for any tips.
--
Ken Fayal
Raptor Development Corp.I thought about this some and the only thing I can come up with is to have a
second dataset that has the same grouping and sums and reference the second
dataset at the top of the report. (By grouping I mean in SQL, not in RS).
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Ken Fayal" <ken@.raptordev.com.spamfree> wrote in message
news:5E4D812B-4868-44A7-BD79-F9E75C748F5C@.microsoft.com...
> I'm trying to get around a problem where my client wants to have totals
from
> each grouping in the report table displayed at the top of the report body
> above the report table. It's easy to see why you can't just grab values
from
> the grouping footers and place them elsewhere. I had an idea to create
some
> report parameters and as the report is being rendered, run some custom
code
> that evaluates the field I'm trying to total and modifies the report
> parameter I created for that specific total. Then I could use the report
> parameter to display that specific total.
> The problems with this are.. It seems that if I pass the parameter object
> into the custom code function, it becomes read-only. Next, how would I be
> able to tell the textbox that will show the total to wait to render until
the
> END of the report rendering. Lots of problems to try to overcome.
> Basically, I need to take the value of a total in a subgroup (there are
like
> 7 subgroups, so 7 different totals -- I can already take the ENTIRE report
> total, but that's not what's neded) and copy it to a textbox either in
the
> report body ABOVE the report table.
> Thanks for any tips.
> --
> Ken Fayal
> Raptor Development Corp.
>|||Bruce,
Thanks. What I ended up doing was create a subreport and put that at the
top. It works great. I guess I could have created another dataset, but he
subreport was easy because I had to use the same subreport in many other
reports.
"Bruce L-C [MVP]" wrote:
> I thought about this some and the only thing I can come up with is to have a
> second dataset that has the same grouping and sums and reference the second
> dataset at the top of the report. (By grouping I mean in SQL, not in RS).
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
>
> "Ken Fayal" <ken@.raptordev.com.spamfree> wrote in message
> news:5E4D812B-4868-44A7-BD79-F9E75C748F5C@.microsoft.com...
> > I'm trying to get around a problem where my client wants to have totals
> from
> > each grouping in the report table displayed at the top of the report body
> > above the report table. It's easy to see why you can't just grab values
> from
> > the grouping footers and place them elsewhere. I had an idea to create
> some
> > report parameters and as the report is being rendered, run some custom
> code
> > that evaluates the field I'm trying to total and modifies the report
> > parameter I created for that specific total. Then I could use the report
> > parameter to display that specific total.
> >
> > The problems with this are.. It seems that if I pass the parameter object
> > into the custom code function, it becomes read-only. Next, how would I be
> > able to tell the textbox that will show the total to wait to render until
> the
> > END of the report rendering. Lots of problems to try to overcome.
> >
> > Basically, I need to take the value of a total in a subgroup (there are
> like
> > 7 subgroups, so 7 different totals -- I can already take the ENTIRE report
> > total, but that's not what's neded) and copy it to a textbox either in
> the
> > report body ABOVE the report table.
> >
> > Thanks for any tips.
> >
> > --
> > Ken Fayal
> > Raptor Development Corp.
> >
>
>
Accessing report builder from client machine?
Accessing report builder from client machine in which there is no sql server with the url http://<server name>>/reports. The report builder tab is not getting displayed.
when accessing from http://<server name>/reportserver/reportbuilder/reportbuilder.application it gets connected to the report model but when we are running the report it say the user doesnt have sufficient permissions or database can not be processed.
The permission is given to the user on the data source. For admin permission the report is running fine.
Do anybody know the procedure to run adhoc reports from client machine?
Urgent!!
Not being able to see the Report Button means that the user doesn't have the necessary rights to run Report Builder. The user must have rights to the Execute Report Definitions system task and the Report Builder user role tasks.|||well, I can see the report builder button from client machine. But When I click on it, I go the following Error.
"Can not retrieve Application. Authentication Error."
I am sure that I have full rights to run report builder. any help will be appreciated.
Thank you
Accessing report builder from client machine?
Accessing report builder from client machine in which there is no sql server with the url http://<server name>>/reports. The report builder tab is not getting displayed.
when accessing from http://<server name>/reportserver/reportbuilder/reportbuilder.application it gets connected to the report model but when we are running the report it say the user doesnt have sufficient permissions or database can not be processed.
The permission is given to the user on the data source. For admin permission the report is running fine.
Do anybody know the procedure to run adhoc reports from client machine?
Urgent!!
Not being able to see the Report Button means that the user doesn't have the necessary rights to run Report Builder. The user must have rights to the Execute Report Definitions system task and the Report Builder user role tasks.|||well, I can see the report builder button from client machine. But When I click on it, I go the following Error.
"Can not retrieve Application. Authentication Error."
I am sure that I have full rights to run report builder. any help will be appreciated.
Thank you
Thursday, February 9, 2012
Accessing mirrored databases in SqlServer 2005
Using the new sqlserver 2005 mirroring, can client connections be made to the non-principal database for, say, reporting purposes? Does this affect the failover?
Thanks
For reporting only run with safety off and no witness. Either one is enough to disable auto failover, but quorum (2 of 3) is required to run with safety on so with no witness both systems must be up to update the principal server. Safety off allows running with the mirror down and no witness. To use the mirror as a reporting server you can create database snapshots on an active mirror. This allows point in time read only access to the database.http://msdn2.microsoft.com/en-us/library/ms175511.aspx
Accessing Member Properties trough ADOMD Client
Hi,
I have a SSAS base linked to a Datawarehouse on SQL Server 2005.
I would like to access to member properties of one of my dimensions thanks of 'Member' object proposed by Adomd.net
Unfortunately, the "MemberProperties" collection is empty and I know it should by filled with properties. Is this a known bug of the API ? I downloaded the SP2 but the problem remains.
I could avoid the trouble and directly attack the relational schema but this solution is not very elegant.
This is an exemple of my code :
For Each oNiveau In oConnexionAdomd.Cubes("$" & "MyDimension").Dimensions(1).Hierarchies("MyHierarchy").Levels
oCollectionMembres = oNiveau.GetMembers
For Each oMembre In oNiveau.GetMembers
'Here a specific treatment for all the members
For Each oPropMembre In oMembre.MemberProperties
'Here a specific treatment for all the member properties
Next
Next
Next
Thank in advance if someone can help me.
AP
hello Alexandre,
by default GetMembers method does not request member properties from the server.
However, it has an overload that allows you to specify a list of member properties that should be retrieved.
If you use it, for each member returned by GetMembers() all of the requested member properties would be returned.
for example:
oCollectionMembres = oNiveau.GetMembers(0, Long.MaxValue, New String() {"[Employee].[Employee].[Employee].[Birth Date]"}, filters)
or
oCollectionMembres = oNiveau.GetMembers(0, Long.MaxValue, New String() {oNiveau.LevelProperties("Email Address").UniqueName}, filters)
and in case you need to retrieve all available member properties, you can do something like this (rough sample):
Dim oCollectionMembres As MemberCollection
Dim props(oNiveau.LevelProperties.Count - 1) As String
Dim prop As LevelProperty
Dim index As Integer
index = 0
For Each prop In oNiveau.LevelProperties
props(index) = prop.UniqueName
index = index + 1
Next
Dim filters(-1) As MemberFilter
oCollectionMembres = oNiveau.GetMembers(0, Long.MaxValue, props, filters)
Dim oMembre As Member
For Each oMembre In oCollectionMembres
'Here a specific treatment for all the members
Dim oPropMembre As MemberProperty
For Each oPropMembre In oMembre.MemberProperties
'Here a specific treatment for all the member properties
Debug.WriteLine(oPropMembre.Name)
Next
Next
Notice however, that there might be many member properties defined, and it might slow things down if you retrieve all of them for all members.
if you anticipate that you might need access to member properties for only some (not many) members, then you might just
use member.FetchAllProperties() as needed [you will find the member properties inside member.Properties collection in that case].
FetchAllProperties requires a round trip to the server, so you should decide based on what the actual scenario is whether to request
all properties up front using proper GetMembers overload (if you need them for many members), or request them afterwards with FetchAllProperties (if just for a few).
hope this helps,
Hello Mary,
And a great thanks, it perfectly work.
Effectively, I did not use the overload.
Thank you again.
AP
Accessing Member Properties trough ADOMD Client
Hi,
I have a SSAS base linked to a Datawarehouse on SQL Server 2005.
I would like to access to member properties of one of my dimensions thanks of 'Member' object proposed by Adomd.net
Unfortunately, the "MemberProperties" collection is empty and I know it should by filled with properties. Is this a known bug of the API ? I downloaded the SP2 but the problem remains.
I could avoid the trouble and directly attack the relational schema but this solution is not very elegant.
This is an exemple of my code :
For Each oNiveau In oConnexionAdomd.Cubes("$" & "MyDimension").Dimensions(1).Hierarchies("MyHierarchy").Levels
oCollectionMembres = oNiveau.GetMembers
For Each oMembre In oNiveau.GetMembers
'Here a specific treatment for all the members
For Each oPropMembre In oMembre.MemberProperties
'Here a specific treatment for all the member properties
Next
Next
Next
Thank in advance if someone can help me.
AP
hello Alexandre,
by default GetMembers method does not request member properties from the server.
However, it has an overload that allows you to specify a list of member properties that should be retrieved.
If you use it, for each member returned by GetMembers() all of the requested member properties would be returned.
for example:
oCollectionMembres = oNiveau.GetMembers(0, Long.MaxValue, New String() {"[Employee].[Employee].[Employee].[Birth Date]"}, filters)
or
oCollectionMembres = oNiveau.GetMembers(0, Long.MaxValue, New String() {oNiveau.LevelProperties("Email Address").UniqueName}, filters)
and in case you need to retrieve all available member properties, you can do something like this (rough sample):
Dim oCollectionMembres As MemberCollection
Dim props(oNiveau.LevelProperties.Count - 1) As String
Dim prop As LevelProperty
Dim index As Integer
index = 0
For Each prop In oNiveau.LevelProperties
props(index) = prop.UniqueName
index = index + 1
Next
Dim filters(-1) As MemberFilter
oCollectionMembres = oNiveau.GetMembers(0, Long.MaxValue, props, filters)
Dim oMembre As Member
For Each oMembre In oCollectionMembres
'Here a specific treatment for all the members
Dim oPropMembre As MemberProperty
For Each oPropMembre In oMembre.MemberProperties
'Here a specific treatment for all the member properties
Debug.WriteLine(oPropMembre.Name)
Next
Next
Notice however, that there might be many member properties defined, and it might slow things down if you retrieve all of them for all members.
if you anticipate that you might need access to member properties for only some (not many) members, then you might just
use member.FetchAllProperties() as needed [you will find the member properties inside member.Properties collection in that case].
FetchAllProperties requires a round trip to the server, so you should decide based on what the actual scenario is whether to request
all properties up front using proper GetMembers overload (if you need them for many members), or request them afterwards with FetchAllProperties (if just for a few).
hope this helps,
Hello Mary,
And a great thanks, it perfectly work.
Effectively, I did not use the overload.
Thank you again.
AP