Showing posts with label instance. Show all posts
Showing posts with label instance. Show all posts

Monday, March 26, 2012

Hide a sub report from view

Is there any way to make a subreport hidden on the report server. For
instance report "A" contains subreport "B". I want the user to be able to
run report "A" that runs report "B", but I only want them to be able to see
report "A" in the report server folder.
Thanks,
--
JasonOn Mar 19, 7:38 am, JasonDWilson
<JasonDWil...@.discussions.microsoft.com> wrote:
> Is there any way to make a subreport hidden on the report server. For
> instance report "A" contains subreport "B". I want the user to be able to
> run report "A" that runs report "B", but I only want them to be able to see
> report "A" in the report server folder.
> Thanks,
> --
> Jason
You can try not letting the users have access to subreport B (via the
Report Manager permissions) and see if they can still access subreport
B via report A. If this does not work, then you will need to create
something custom that passes the User ID and another item/parameter to
the subreport to let it know that it is being called from report A:
The expression =User!UserID.ToString will get the current user and
then you would need to pass maybe a hidden parameter to subreport B
from report A (one that is not intuitive). That way, when subreport B
is called on it's own, the user will not know the parameter value it
needs. Hope this helps.
Regards,
Enrique Martinez
Sr. SQL Server Developer

Friday, March 23, 2012

Hidden Master, Model, MSDB, and Tempdb Databases.

Thanks in advance.
I have an instance of Enterprise Manager for SQL Server 2000 on my
desktop that does not list the above databases. When I attempt to add
any of them, I receive: "Error 5123: CREATE FILE encountered operating
system error 32.". I see all the databases in the server's copy of EM.
My questions are twofold. What is the likely reason my workstation
copy of EM got this way? How do I best fix this? I suspect I may have
to wait for no users to be on the system, but I hope someone knows a
way to fix this without doing so. Also the TempDB does not appear as
an mdf file, which I guess is because it is a temporary construct that
exists in memory only. So I do not even being to know how to make that
appear in my list.
Mark Simmerman
SQL Learner
Napa, CaliforniaRight-click on the Server, select 'Edit SQL Server Registration properties
and make sure 'show system databases and system objects' is checked.
Hope this helps.
Dan Guzman
SQL Server MVP
"Mark" <xxxdbaxxx@.gmail.com> wrote in message
news:1148081170.238568.164540@.38g2000cwa.googlegroups.com...
> Thanks in advance.
> I have an instance of Enterprise Manager for SQL Server 2000 on my
> desktop that does not list the above databases. When I attempt to add
> any of them, I receive: "Error 5123: CREATE FILE encountered operating
> system error 32.". I see all the databases in the server's copy of EM.
>
> My questions are twofold. What is the likely reason my workstation
> copy of EM got this way? How do I best fix this? I suspect I may have
> to wait for no users to be on the system, but I hope someone knows a
> way to fix this without doing so. Also the TempDB does not appear as
> an mdf file, which I guess is because it is a temporary construct that
> exists in memory only. So I do not even being to know how to make that
> appear in my list.
>
> Mark Simmerman
> SQL Learner
> Napa, California
>|||Except for MSDB, those system databases MUST exist on your server, so trying
to 'add' them is pointless. They're already there which is why you're
getting the message you reported.
I presume you also have Query Analyzer, so you could run a query:
exec sp_helpdb
and you should see the system databases listed with all the others.
Right click on the name of your server (or LOCAL) in Enterprise Manager.
Choose 'Edit SQL Server Registration Properties'
Check the box near the button of the dialog box that says 'Show system
databases and system objects'
Click OK
Now when you expand your Databases node in Enterprise Manager, you should
see the system databases.
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"Mark" <xxxdbaxxx@.gmail.com> wrote in message
news:1148081170.238568.164540@.38g2000cwa.googlegroups.com...
> Thanks in advance.
> I have an instance of Enterprise Manager for SQL Server 2000 on my
> desktop that does not list the above databases. When I attempt to add
> any of them, I receive: "Error 5123: CREATE FILE encountered operating
> system error 32.". I see all the databases in the server's copy of EM.
>
> My questions are twofold. What is the likely reason my workstation
> copy of EM got this way? How do I best fix this? I suspect I may have
> to wait for no users to be on the system, but I hope someone knows a
> way to fix this without doing so. Also the TempDB does not appear as
> an mdf file, which I guess is because it is a temporary construct that
> exists in memory only. So I do not even being to know how to make that
> appear in my list.
>
> Mark Simmerman
> SQL Learner
> Napa, California
>|||That was sooooo simple. Thanks, Kalen and Dan.

Wednesday, March 21, 2012

Hi knights, do you get error "Invalid Instance" ?

I create 2 instances SQL Server in the same server using port 1433, unluckily when i connect they from the remote pc, it doesn't connect and alert "Invalid Instance". How can i use many instances? And what special when i replicate them?Check out KB #287932 (http://support.microsoft.com/default.aspx?scid=kb;en-us;287932). It explains what you need in more detail than I care to retype!

-PatP|||What a pity PatP, it happens even all clients and the server in a Lan group with a hub without firewall on server.|||So it isn't the remote clients as you originally posted? Did the local clients work and then stop, or never work at all? Can you connect from any machine except the server itself? Can you connect to the instances on the server itself?

-PatP|||All clients can't connect to but the server can.|||I suspect that the problem may be because you've set up two instances to use the same TCP port. If you check the KB article I cited, each instance normally has its own port, and the port usages are arbitrated by port 1434. Only the default (unnamed) instance of SQL Server should use port 1433.

I'd suggest that you try to reconfigure the server that way to see if it works.

-PatP

Hi Dan Guzman

hi dan
Some of my pals are facing a very rare kinda problem. Thay have a
Java app that connects to a SQL server instance. Currently they are
testing the app on the same comp where SQL server is installed. Few
days back when they executed the app it couldnt connect to the
database. But yesterday it found a way out. The same thing happened
but this time they restarted SQL server. None of them including me
could figure out what is the problem.
Any advises??

Cheers
DebashishWhat error message was returned when the connection failed? Do you have any
related messages in the SQL Server error log? Check out
http://support.microsoft.com/defaul...kb;en-us;827422.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"debashish" <debashish_majumdar@.rediffmail.com> wrote in message
news:bb05cfc5.0410170408.4ee5f030@.posting.google.c om...
> hi dan
> Some of my pals are facing a very rare kinda problem. Thay have a
> Java app that connects to a SQL server instance. Currently they are
> testing the app on the same comp where SQL server is installed. Few
> days back when they executed the app it couldnt connect to the
> database. But yesterday it found a way out. The same thing happened
> but this time they restarted SQL server. None of them including me
> could figure out what is the problem.
> Any advises??
> Cheers
> Debashish|||Hi

In addition to Dan's reply the following may also help:

http://support.microsoft.com/defaul...kb;en-us;313178

http://support.microsoft.com/defaul...kb;en-us;313100

It would also be useful to know which driver and version of the driver you
are using.

John

"debashish" <debashish_majumdar@.rediffmail.com> wrote in message
news:bb05cfc5.0410170408.4ee5f030@.posting.google.c om...
> hi dan
> Some of my pals are facing a very rare kinda problem. Thay have a
> Java app that connects to a SQL server instance. Currently they are
> testing the app on the same comp where SQL server is installed. Few
> days back when they executed the app it couldnt connect to the
> database. But yesterday it found a way out. The same thing happened
> but this time they restarted SQL server. None of them including me
> could figure out what is the problem.
> Any advises??
> Cheers
> Debashish

Friday, March 9, 2012

help-login failed for MACHINE_NAME\IUSR_MACHINE_NAME

HI,
i have some problem,

one database 'SMS' is installed in sql server which instance is
BARODA\EMIS.

now i want to connect my web app to this database.
for that
my connectionstring is
--
conn.ConnectionString = "workstation id=BARODA;packet size=4096;integrated security=SSPI;data source=BARODA\EMIS;persist security info=True;initial catalog=SMS"
--

but when i run this error occur

--
login failed for 'MERIDIAN\IUSR_BARODA'
--

for that what should i do?
give any solution.

it's urgent.

thanks in advance.Hi,

This blog might help you:http://weblogs.asp.net/coltk/archive/2003/07/10/9920.aspx

Colt|||hey, colt

my problem,

i want to creat user in MSDE.

how to create user in MSDE?
how to create user in MSDE during app. installation?

give any solution.
it's urgent.

thanks in advance.

Friday, February 24, 2012

Help: Object reference not set to an instance of an object.

I am getting the Object reference not set to an instance of an object. error. Here is the code:


string conString;
conString = ConfigurationSettings.AppSettings["anonConnection"];

SqlConn = new SqlConnection(conString);
SqlComm = new SqlDataAdapter("usp_SelectProductList", SqlConn);

SqlComm.InsertCommand.CommandType = System.Data.CommandType.StoredProcedure;

SqlComm.InsertCommand.Parameters.Add(new SqlParameter("prod_type", SqlDbType.VarChar, 20));
SqlComm.InsertCommand.Parameters["prod_type"].Value = m_productType;

DataSet dsProducts = new DataSet();
SqlComm.Fill(dsProducts, "Products");

here is the error:


Line 46: SqlComm = new SqlDataAdapter("usp_SelectProductList", SqlConn);
Line 47:
Line 48: SqlComm.InsertCommand.CommandType = System.Data.CommandType.StoredProcedure;
Line 49:
Line 50: SqlComm.InsertCommand.Parameters.Add(new SqlParameter("prod_type", SqlDbType.VarChar, 20));

[NullReferenceException: Object reference not set to an instance of an object.]
Yocaher.Products.SelectProductList() in e:\inetpub\wwwfndfl\yocaher\classes\clsproducts.cs:48
Yocaher.products.Page_Load(Object sender, EventArgs e) in e:\inetpub\wwwfndfl\yocaher\products.aspx.cs:30
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +29
System.Web.UI.Page.ProcessRequestMain() +724

any help would be GREATLY appreciated!


SqlComm.InsertCommand.CommandType = System.Data.CommandType.StoredProcedure;
SqlComm.InsertCommand.Parameters.Add(new SqlParameter("prod_type", SqlDbType.VarChar, 20));
SqlComm.InsertCommand.Parameters["prod_type"].Value = m_productType;

remove the insertcommand in the above lines.

hth

Help: Instance index

I need to create an instance index for a table group by studentid and classid

CREATE TABLE Table1

(ClassID varchar(10),

StudentID varchar(10),

Fee1 money,

fee2 money,

fee3 money

)

INSERT INTO Table1

VALUES ('02003', '00001', 20,10,15)

INSERT INTO Table1

VALUES ('02003', '00001', 25,15,15)

INSERT INTO Table1

VALUES ('02005', '00001', 10,10,15)

INSERT INTO Table1

VALUES ('02005', '00004', 20,10,15)

INSERT INTO Table1

VALUES ('02005', '00004', 20,10,15)

INSERT INTO Table1

VALUES ('02005', '00004', 20,10,15)

SELECT * FROM Table1

the output i'd like to see is :

ClassIDStudentIDFee1Fee2Fee3Index

020030000120.0010.0015.001

020030000125.0015.0015.002

020050000110.0010.0015.001

020050000420.0010.0015.001

020050000420.0010.0015.002

020050000420.0010.0015.003

Any suggestions on what method to use? Thanks.

Here it is,

Code Snippet

SELECT

ClassID,StudentID,Fee1, Fee2, Fee3,

ROW_NUMBER() over (Partition By ClassId, StudentId Order By ClassId, StudentId) as Index

FROM

Table1

|||

Use ROW_NUMBER()...something like this (didn't test it)

select

ClassID

,StudentID

,Fee1

,Fee2

,Fee3

,RANK() OVER (PARTITION BY ClassID, StudentID ORDER BY Fee1) AS 'Index'

from

Table1

|||

Thanks!!