Showing posts with label manager. Show all posts
Showing posts with label manager. Show all posts

Sunday, March 25, 2012

ActiveX to warm up Report Server ?

Because the IIS threads are recycled at night, the first user that calls up Report Manager in the morning has to wait 30 seconds before the page loads, as IIS is creating a thread.

I'd like to set up a job in SQL Agent that will navigate to http://localhost/reports/ every morning before users come in to work, so they won't have to wait.

I think a SAL Agent job of type ActiveX Script would be suitable for this, so I need to write the code to navigate to the reports page in VBScript.

Anyone knows how to navigate to a page in VBScript ?

tia.

I meant SQL Agent job, of course, not SAL.|||

Schedule a job with a simple plain empty record and schedule this before the needed time.

Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||

I know how to schedule a job, but what is a "plain empty record" ? I have lots of RS subscriptions scheduled already and they don't affect the way the first user has to wait 30 secs for Report Manager to load up.

What I wanted to know was how to navigate to the report manager home page in VBScript. I couldn't find any example anywhere.

|||

This isnt a solution that you are looking for but maybe you dont need to reschedule the IIS worker process every night? My reportserver serves up about 800 reports per week and its hosted on a server which also hosts 9 other web applications.

I have set it in IIS that the worker process for report server does not recycle at all, and so far it hasnt recycled for 6 weeks. I occasionally manually recycle it and then go straight to the report server home page to start up the server quickly again.

Depends on your environment but maybe you dont need to recycle it every night.

sql

Sunday, March 11, 2012

Active Directory access in SSIS

Does anyone have any examples of setting up a connection manager in SSIS to read information from Microsoft Active Directory? I would like to retrieve a list of users and populate them into a SQL Server table.

Thanks!
Harry

BOL has an example for a script task but it should be fairly straight forward to convert it to a script component. There is also an OLEDB driver for active directory that should be able to be used directly from the OLEDB source (although I don't know whether anyone has actually tried using it yet).

ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/dtsref9/html/a88fefbb-9ea2-4a86-b836-e71315bac68e.htm

HTH,

Matt

Thursday, March 8, 2012

Action Queries

Two questions.

1. How do I create action queries in SQL Server? From Enterprise Manager -> view I can create, run but NOT save the query.

2. How do I access an SQL server query from access like i would an Access query? Do i have to make a call to a stored procedure or something like that?If you like to reuse a query you can create it in Query Analyzer and then save it to a file. Using Query Analyzer you can then open the file and run the query. You can use any text editor to create a query and save it. Also by using a stored procedure you are saving the SQL to the database so it can be used at any time just by calling it. Depending on how you setup permission you can let other users call your stored procedure.|||I'm a little new at this so bear with me... OK.. I follow you up to the point of the stored procedure. Say i save that file as Test.. Is test.sql the stored procedure? I thought stored procedures were only available inside Enterprise manager. Lastly Once the file containing the sql statement is created, how do i reference the file from enterprise manager? i can figure out how to call a stored procedure in the enterprise manager from Access VBA code.|||Access_Dude,
Action Queries are a bit different in SQL Server to Access. In access, it all gets saved down in the database. In SQL Server, you've got a choice: Either save it down as a .sql file (in effect a text file - rename the extension to .txt, will open it in Notepad, no problems). This allows you to have a permanent copy which you can open from other apps without needing SQL Server - useful for saving down scripts which you want to run again but don't want to keep in the database.
Or, create a Stored Procedure in SQL Server. This will save the SQL into the database itself. As an example:

select Name, Postcode
from Customer
where CustomerID = 123

... can become a stored proc ('action query')...

create proc spGetCustomerNameAndPostcode
as
select Name, Postcode
from Customer
where CustomerID = 123

... it can then be simply called from an app, or from within SQL Server, using:
exec spGetCustomerNameAndPostcode

(Note that the exec isn't always needed, depends on what you're doing)

Hope this helps :)
Jon.|||Access_Dude,
Action Queries are a bit different in SQL Server to Access. In access, it all gets saved down in the database. In SQL Server, you've got a choice: Either save it down as a .sql file (in effect a text file - rename the extension to .txt, will open it in Notepad, no problems). This allows you to have a permanent copy which you can open from other apps without needing SQL Server - useful for saving down scripts which you want to run again but don't want to keep in the database.
Or, create a Stored Procedure in SQL Server. This will save the SQL into the database itself. As an example:

select Name, Postcode
from Customer
where CustomerID = 123

... can become a stored proc ('action query')...

create proc spGetCustomerNameAndPostcode
as
select Name, Postcode
from Customer
where CustomerID = 123

... it can then be simply called from an app, or from within SQL Server, using:
exec spGetCustomerNameAndPostcode

(Note that the exec isn't always needed, depends on what you're doing)

Hope this helps :)
Jon.

Acrord32 - why is it there?

I just looked at my Windows Task Manager and saw a program,
AcroRd32.exe, taking up about 24MBs of memory. This appears to be
something use by Acrobat reader (I think). I did look at a page in IE
that opened up acrobat, but why is it still there?
Is this a problem?
If so, how do I get rid of it?
And how do I keep it from happening again?
Thanks,
Tom.
It is AcreoReader by himself started up as COM-server. And this is not a
subject for this newsgroup I think
"Thomas Scheiderich" <tfs@.deltanet.com> wrote in message
news:40A4A764.6000308@.deltanet.com...
> I just looked at my Windows Task Manager and saw a program,
> AcroRd32.exe, taking up about 24MBs of memory. This appears to be
> something use by Acrobat reader (I think). I did look at a page in IE
> that opened up acrobat, but why is it still there?
> Is this a problem?
> If so, how do I get rid of it?
> And how do I keep it from happening again?
> Thanks,
> Tom.
>

Acrord32 - why is it there?

I just looked at my Windows Task Manager and saw a program,
AcroRd32.exe, taking up about 24MBs of memory. This appears to be
something use by Acrobat reader (I think). I did look at a page in IE
that opened up acrobat, but why is it still there?
Is this a problem?
If so, how do I get rid of it?
And how do I keep it from happening again?
Thanks,
Tom.It is AcreoReader by himself started up as COM-server. And this is not a
subject for this newsgroup I think
"Thomas Scheiderich" <tfs@.deltanet.com> wrote in message
news:40A4A764.6000308@.deltanet.com...
> I just looked at my Windows Task Manager and saw a program,
> AcroRd32.exe, taking up about 24MBs of memory. This appears to be
> something use by Acrobat reader (I think). I did look at a page in IE
> that opened up acrobat, but why is it still there?
> Is this a problem?
> If so, how do I get rid of it?
> And how do I keep it from happening again?
> Thanks,
> Tom.
>

Acrord32 - why is it there?

I just looked at my Windows Task Manager and saw a program,
AcroRd32.exe, taking up about 24MBs of memory. This appears to be
something use by Acrobat reader (I think). I did look at a page in IE
that opened up acrobat, but why is it still there?
Is this a problem?
If so, how do I get rid of it?
And how do I keep it from happening again?
Thanks,
Tom.It is AcreoReader by himself started up as COM-server. And this is not a
subject for this newsgroup I think
"Thomas Scheiderich" <tfs@.deltanet.com> wrote in message
news:40A4A764.6000308@.deltanet.com...
> I just looked at my Windows Task Manager and saw a program,
> AcroRd32.exe, taking up about 24MBs of memory. This appears to be
> something use by Acrobat reader (I think). I did look at a page in IE
> that opened up acrobat, but why is it still there?
> Is this a problem?
> If so, how do I get rid of it?
> And how do I keep it from happening again?
> Thanks,
> Tom.
>

Acquiring Connection manager Programmatically in SSIS

hi all,

I m new to this forum and hope i ll get warm welcome from all of you.... thank you

I m Praveen kumar Dayanithi... a master student doin my assistantship in a Company. Kindly help me with this...

Here is my issue.... i would like to know how can i pass arguments to connection manager programmatically. In other words how can i acquire connection manger through SCRIPT task(Vb script). I know it is very easy to manually select n specify database name, table name by right clicking in dataflow task but in my company if i do that it will be very cumbersome for production people to change all the database and table names manually when the project is moved to production. Rather if i programmatically acquire connection manager using global variables it will make production people's job very easy. They have to just change the value of the variables. So can any one help me with this issue.

Thanks n regards

For dynamically changing configurations have you tried Package Configurations

Check out

http://msdn2.microsoft.com/en-us/library/ms141682.aspx
http://sqljunkies.com/WebLog/knight_reign/archive/2004/12/07/5445.aspx
http://www.sqlis.com/default.aspx?26

Thanks,
Loonysan

AcquireConnection(txn) ?

In a script task I'm calling AcquireConnection(txn as Object) on a connection manager.

What is the txn parameter supposed to do or be used for?

I'm just passing an empty variable of type Object to this parameter and the method call is working fine...but I'm interested in knowing what its there for.

Thanks
JamieIt is the transaction context you want to use for any work done in that connection. Think of DTC, you need a context that can be supplied to all connections that make up that transacction so all work is marshalled together, well this is that handle.

Passing null will pretty much always work. If you have a transaction context then pass it otherwise don't worry.|||

DarrenSQLIS wrote:

It is the transaction context you want to use for any work done in that connection. Think of DTC, you need a context that can be supplied to all connections that make up that transacction so all work is marshalled together, well this is that handle.

Passing null will pretty much always work. If you have a transaction context then pass it otherwise don't worry.

Cool, that makes sense. I figured it was something I didn't have to worry about.

cheers Darren.

-Jamie|||Darren:
A follow-up on this: Ive been writitng a custom dataflow source that analyzes flatfiles by various properties (filesize, width etc.). The component works well when i have a stable flatfile connection. But when i do a for-each file in folder enumeration i cant get the updated connection information (ie filepath) from my component, it will always run against the first path passed by the connection manager. Any ideas on this?|||I've had issues with class level variables and loops since the class is only created once, that was a task though. Simple answer is I don't know, and don't have a suitable component to test with easily, but if you debug the component it should be very simple to work out what is going on. Put a break point on AcquireConnections for a start and see how many times it is called.

Another obvious test would be to add a script component, and make that consume the same connection, and just MsgBox out the connection string.

What do you get?|||

I have an SSIS package with its TransactionOption set to 'Required'. A data flow in the package has a script component that performs updates to a database table. The TransactionOption on the data flow is set to 'Supported'. However the script component does no get enlisted to the transaction because the updates made in the script component do not get rolled back when the package fails.

I'm thinking that I need to pass this 'transaction handle' to the AquireConnection method of the connection used by the script in order for the script to become part of the overall transaction.

In regard to your reply about transaction context. How do I determine it? I have no idea what value I should be passing. I am new to Sql Server beginning with Sql Server 2005. I have no background with DTC.

Thanks.

|||Please, one post will suffice. I have replied, and maybe even answered, in your new thread - http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1322436&SiteID=1

AcquireConnection(txn) ?

In a script task I'm calling AcquireConnection(txn as Object) on a connection manager.

What is the txn parameter supposed to do or be used for?

I'm just passing an empty variable of type Object to this parameter and the method call is working fine...but I'm interested in knowing what its there for.

Thanks
JamieIt is the transaction context you want to use for any work done in that connection. Think of DTC, you need a context that can be supplied to all connections that make up that transacction so all work is marshalled together, well this is that handle.

Passing null will pretty much always work. If you have a transaction context then pass it otherwise don't worry.|||

DarrenSQLIS wrote:

It is the transaction context you want to use for any work done in that connection. Think of DTC, you need a context that can be supplied to all connections that make up that transacction so all work is marshalled together, well this is that handle.

Passing null will pretty much always work. If you have a transaction context then pass it otherwise don't worry.

Cool, that makes sense. I figured it was something I didn't have to worry about.

cheers Darren.

-Jamie|||Darren:
A follow-up on this: Ive been writitng a custom dataflow source that analyzes flatfiles by various properties (filesize, width etc.). The component works well when i have a stable flatfile connection. But when i do a for-each file in folder enumeration i cant get the updated connection information (ie filepath) from my component, it will always run against the first path passed by the connection manager. Any ideas on this?
|||I've had issues with class level variables and loops since the class is only created once, that was a task though. Simple answer is I don't know, and don't have a suitable component to test with easily, but if you debug the component it should be very simple to work out what is going on. Put a break point on AcquireConnections for a start and see how many times it is called.

Another obvious test would be to add a script component, and make that consume the same connection, and just MsgBox out the connection string.

What do you get?|||

I have an SSIS package with its TransactionOption set to 'Required'. A data flow in the package has a script component that performs updates to a database table. The TransactionOption on the data flow is set to 'Supported'. However the script component does no get enlisted to the transaction because the updates made in the script component do not get rolled back when the package fails.

I'm thinking that I need to pass this 'transaction handle' to the AquireConnection method of the connection used by the script in order for the script to become part of the overall transaction.

In regard to your reply about transaction context. How do I determine it? I have no idea what value I should be passing. I am new to Sql Server beginning with Sql Server 2005. I have no background with DTC.

Thanks.

|||Please, one post will suffice. I have replied, and maybe even answered, in your new thread - http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1322436&SiteID=1

Tuesday, March 6, 2012

Accuracy of Host column on SS 2000 Enterprise Manager Current Activity Process Info Screen

Yesterday and today, the Process Info screen in Enterprise Manager indicates that the "Host", a single workstation on our network, is generating around 50 connections to the database. This particular application is well-behaved and typically generates only 2 to 5 connections per instance. Furthermore, we cannot find this particular workstation/host on our network because we retired it off the network some time ago.

Anyone know of the accuracy of the Hosts column on this Enterprise Manager screen? We're suspecting that the network address column is correct but the Hosts column is incorrect. There are about 10 different network addresses pertaining to this particular Host (1-5 connections per network address).

Can you check the mAC Address for that host and find on the network?|||I have also been having that problem. I was able to use the MAC address to track down the PC when I first saw the problem, but found that the computer name was not what was displayed in SQL EM. Additionally, I am continuing to have the same problem but have found that different MAC addresses are being listed all with the same Host name. Should you find more information regarding this issue please post your results here.

Accuracy of Host column on SS 2000 Enterprise Manager Current Activity Process Info Screen

Yesterday and today, the Process Info screen in Enterprise Manager indicates that the "Host", a single workstation on our network, is generating around 50 connections to the database. This particular application is well-behaved and typically generates only 2 to 5 connections per instance. Furthermore, we cannot find this particular workstation/host on our network because we retired it off the network some time ago.

Anyone know of the accuracy of the Hosts column on this Enterprise Manager screen? We're suspecting that the network address column is correct but the Hosts column is incorrect. There are about 10 different network addresses pertaining to this particular Host (1-5 connections per network address).

Can you check the mAC Address for that host and find on the network?|||I have also been having that problem. I was able to use the MAC address to track down the PC when I first saw the problem, but found that the computer name was not what was displayed in SQL EM. Additionally, I am continuing to have the same problem but have found that different MAC addresses are being listed all with the same Host name. Should you find more information regarding this issue please post your results here.

Saturday, February 25, 2012

Account to Run SQL under?

Currently, our network/server/domain admins have admin control of our sql
servers. One manager wants to run sql under a special local admin account
to restrict this access, but then we will be effected by the password change
requirement, which could break sql every 90 days.
What is the best way to run sql so that the server admins don't have sql
admin access? Can I run it under "local system", and restrict machine
admins?Its not a wise choice to make the User IDs local to the
server, the reason is that non local user id's (i.e.
domain accounts) can be allocated email accounts so sql
server can send emails, whereas local userid's cannot.
If you do not want local administrators to have system
admin access rights then all you need to so is restrict
the BUILTIN\Administrators rights.
Peter
"Only two things are infinite, the universe and human
stupidity, and I'm not sure about the former."
Albert Einstein
>--Original Message--
>Currently, our network/server/domain admins have admin
control of our sql
>servers. One manager wants to run sql under a special
local admin account
>to restrict this access, but then we will be effected by
the password change
>requirement, which could break sql every 90 days.
>What is the best way to run sql so that the server admins
don't have sql
>admin access? Can I run it under "local system", and
restrict machine
>admins?
>
>.
>|||First of all, it is imposible to stop God from having access. And, in the
domain, Domain Administrators are God. However, you can slow them down
quite a bit. Here is a KB that details the procedures. Also know that if
you use AD Global Groups to grant the SQL Server DBAs administrative access,
which is a Best Practice, all the Domain Admin has to do is add themself or
the Domain Admins group to yours.
How to impede Windows NT administrators from administering a clustered
instance of SQL Server
http://support.microsoft.com/kb/263712/EN-US/
How to change the SQL Server or SQL Server Agent Service account without
using SQL Enterprise Manager in SQL Server 2000
http://support.microsoft.com/default.aspx?scid=kb;en-us;283811
If you suspect foul play, it would be better to run some sort of Audit
Logging on your system and then once captured, bring it the attention of the
Data Center Director's attention. Keep in mind that just like the DBAs,
with great power comes great responsibility. No one should be placed in a
role that they are not qualified, and responsible for, to perform.
Just like the DBAs have the authority to delete every user/system database,
the responsibility is to preserve that data. It is no different for the
Domain Admins. They have the authority to disrupt operations but the
responsibility to preserve them. If you find an individual, or team, that
does not play by these rules, that must be made know to the Operations
Manager, regardless of the title or the position of the offender.
Sincerely,
Anthony Thomas
"Peter The Spate" <anonymous@.discussions.microsoft.com> wrote in message
news:05b901c51b4e$87a454e0$a501280a@.phx.gbl...
Its not a wise choice to make the User IDs local to the
server, the reason is that non local user id's (i.e.
domain accounts) can be allocated email accounts so sql
server can send emails, whereas local userid's cannot.
If you do not want local administrators to have system
admin access rights then all you need to so is restrict
the BUILTIN\Administrators rights.
Peter
"Only two things are infinite, the universe and human
stupidity, and I'm not sure about the former."
Albert Einstein
>--Original Message--
>Currently, our network/server/domain admins have admin
control of our sql
>servers. One manager wants to run sql under a special
local admin account
>to restrict this access, but then we will be effected by
the password change
>requirement, which could break sql every 90 days.
>What is the best way to run sql so that the server admins
don't have sql
>admin access? Can I run it under "local system", and
restrict machine
>admins?
>
>.
>

Accidentally dettached

Hello all, i trying to shrink db from sql express manager, then
suddently error msg appear, afterthat the db disappeared from the
list !!
I want the db back & working, i trying attach but without success.
Can anyone help me about how can i restore my db (mdf,ldf are found),
attach not work.Hi
"hamiiied@.gmail.com" wrote:

> Hello all, i trying to shrink db from sql express manager, then
> suddently error msg appear, afterthat the db disappeared from the
> list !!
> I want the db back & working, i trying attach but without success.
> Can anyone help me about how can i restore my db (mdf,ldf are found),
> attach not work.
>
It would be useful if you had said how you tried to re-attach the database
and what error number and message you recieved. There may be a more
fundamental underlying error why you can not do this!
You can re-attach a database using the sp_attach_db command in SQLCMD the
syntax of this can be found in books online or at
http://msdn2.microsoft.com/en-us/library/aa259611(SQL.80).aspx. If you dont
have the log file you can use sp_attach_single_file_db.
With SQLExpress you can also use the CREATE DATABASE with the FOR ATTACH
clause.
John|||Hi,
I think it will be easier to help you, if you'd tell which error
messages you get. Also, what makes you believe that the databases has
been detached? Detaching a database is something you'll have to do, and
not something that just happens.
Regards
Steen Schlter Persson
Database Administrator / System Administrator
hamiiied@.gmail.com wrote:
> Hello all, i trying to shrink db from sql express manager, then
> suddently error msg appear, afterthat the db disappeared from the
> list !!
> I want the db back & working, i trying attach but without success.
> Can anyone help me about how can i restore my db (mdf,ldf are found),
> attach not work.
>|||On Jun 25, 10:48 am, "Steen Schl=FCter Persson (DK)"
<steen@.REMOVE_THIS_asavaenget.dk> wrote:
> Hi,
> I think it will be easier to help you, if you'd tell which error
> messages you get. Also, what makes you believe that the databases has
> been detached? Detaching a database is something you'll have to do, and
> not something that just happens.
> --
> Regards
> Steen Schl=FCter Persson
> Database Administrator / System Administrator
>
> hamii...@.gmail.com wrote:
> - Show quoted text -
Hi, thanks for your replies, i fix the bugs by reinstalling SQL
server, then attaching the mdf.|||"hamiiied@.gmail.com" wrote:

> On Jun 25, 10:48 am, "Steen Schl|ter Persson (DK)"
> <steen@.REMOVE_THIS_asavaenget.dk> wrote:
> Hi, thanks for your replies, i fix the bugs by reinstalling SQL
> server, then attaching the mdf.
>
So we don't really know what was wrong!!
John|||For understanding what happen i can explain the problem from start to
end ...
when i complete development tasks on my db using sql express managment
studio, i right click on db --> shrink, the server hanging for tens
of seconds, afterthat it return error message, it is long msg but i
read its header like 'can't determine rows or index in sysindexes or
like this',,, i follow the instruction to solve until it routing me to
microsoft support, finally microsoft online help return sorry no idea
about this error.
i think the error happen in the master db..
after that the db disappeared from the db list..
i explore the location of mdf,ldf i found it intact.
then i try to attach my db but without benifit, it return to me error
msg like the msg when you try to attach already attached db.
then i think to add new db with the same name, the server again return
error!
So i concluded from this case my db name & alias already found in
master db or whatever sql registry, but not physically attached to
mdf,ldf files.
when i attach my db to another sql server on other pc, it work fine &
no data lost.
So i uninstalled my sql server then reinstall & attach, finally it
work fine ...
that is all.
i know it can be solved by another way if i expert in dba admin.
thank you all, & welcome to reply if any one get the idea on dba admin
basis & knowledge...|||"hamiiied@.gmail.com" wrote:

> For understanding what happen i can explain the problem from start to
> end ...
> when i complete development tasks on my db using sql express managment
> studio, i right click on db --> shrink, the server hanging for tens
> of seconds, afterthat it return error message, it is long msg but i
> read its header like 'can't determine rows or index in sysindexes or
> like this',,, i follow the instruction to solve until it routing me to
> microsoft support, finally microsoft online help return sorry no idea
> about this error.
> i think the error happen in the master db..
> after that the db disappeared from the db list..
> i explore the location of mdf,ldf i found it intact.
> then i try to attach my db but without benifit, it return to me error
> msg like the msg when you try to attach already attached db.
> then i think to add new db with the same name, the server again return
> error!
> So i concluded from this case my db name & alias already found in
> master db or whatever sql registry, but not physically attached to
> mdf,ldf files.
> when i attach my db to another sql server on other pc, it work fine &
> no data lost.
> So i uninstalled my sql server then reinstall & attach, finally it
> work fine ...
> that is all.
> i know it can be solved by another way if i expert in dba admin.
> thank you all, & welcome to reply if any one get the idea on dba admin
> basis & knowledge...
>
My guess is that you have auto close set for this database and it closed
because there was no connections to the database half way through your
process. For performance reasons auto close is not a good idea.
John|||Hi,
You need to try the following steps to get it back:
1. Put your current .mdf, .ndfs, .ldfs in a safe place - i.e. make a
copy of them and place them under a different path.
2. Delete the .mdf, .ndfs, .ldfs from the current path (where SQL
Server expects to find them).
3. Create a database with exactly the same name as your non-functioning
database and with the exact same file names and file locations.
4. Shut down the SQL Server service.
5. Delete the files of the dummy database you just created in step 3.
6. Replace the files you deleted in step 5 with the original database
files, i.e. the ones you put in a safe place in step 1.
7. Startup the SQL Server service.
8. Assuming that the database does come online properly run DBCC
CHECKDB on it.
Jonathan
hamiiied@.gmail.com wrote:
> Hello all, i trying to shrink db from sql express manager, then
> suddently error msg appear, afterthat the db disappeared from the
> list !!
> I want the db back & working, i trying attach but without success.
> Can anyone help me about how can i restore my db (mdf,ldf are found),
> attach not work.
>

Accidentally dettached

Hello all, i trying to shrink db from sql express manager, then
suddently error msg appear, afterthat the db disappeared from the
list !!
I want the db back & working, i trying attach but without success.
Can anyone help me about how can i restore my db (mdf,ldf are found),
attach not work.
Hi
"hamiiied@.gmail.com" wrote:

> Hello all, i trying to shrink db from sql express manager, then
> suddently error msg appear, afterthat the db disappeared from the
> list !!
> I want the db back & working, i trying attach but without success.
> Can anyone help me about how can i restore my db (mdf,ldf are found),
> attach not work.
>
It would be useful if you had said how you tried to re-attach the database
and what error number and message you recieved. There may be a more
fundamental underlying error why you can not do this!
You can re-attach a database using the sp_attach_db command in SQLCMD the
syntax of this can be found in books online or at
http://msdn2.microsoft.com/en-us/library/aa259611(SQL.80).aspx. If you dont
have the log file you can use sp_attach_single_file_db.
With SQLExpress you can also use the CREATE DATABASE with the FOR ATTACH
clause.
John
|||Hi,
I think it will be easier to help you, if you'd tell which error
messages you get. Also, what makes you believe that the databases has
been detached? Detaching a database is something you'll have to do, and
not something that just happens.
Regards
Steen Schlter Persson
Database Administrator / System Administrator
hamiiied@.gmail.com wrote:
> Hello all, i trying to shrink db from sql express manager, then
> suddently error msg appear, afterthat the db disappeared from the
> list !!
> I want the db back & working, i trying attach but without success.
> Can anyone help me about how can i restore my db (mdf,ldf are found),
> attach not work.
>
|||On Jun 25, 10:48 am, "Steen Schlter Persson (DK)"
<steen@.REMOVE_THIS_asavaenget.dk> wrote:
> Hi,
> I think it will be easier to help you, if you'd tell which error
> messages you get. Also, what makes you believe that the databases has
> been detached? Detaching a database is something you'll have to do, and
> not something that just happens.
> --
> Regards
> Steen Schlter Persson
> Database Administrator / System Administrator
>
> hamii...@.gmail.com wrote:
> - Show quoted text -
Hi, thanks for your replies, i fix the bugs by reinstalling SQL
server, then attaching the mdf.
|||"hamiiied@.gmail.com" wrote:

> On Jun 25, 10:48 am, "Steen Schl|ter Persson (DK)"
> <steen@.REMOVE_THIS_asavaenget.dk> wrote:
> Hi, thanks for your replies, i fix the bugs by reinstalling SQL
> server, then attaching the mdf.
>
So we don't really know what was wrong!!
John
|||For understanding what happen i can explain the problem from start to
end ...
when i complete development tasks on my db using sql express managment
studio, i right click on db --> shrink, the server hanging for tens
of seconds, afterthat it return error message, it is long msg but i
read its header like 'can't determine rows or index in sysindexes or
like this',,, i follow the instruction to solve until it routing me to
microsoft support, finally microsoft online help return sorry no idea
about this error.
i think the error happen in the master db..
after that the db disappeared from the db list..
i explore the location of mdf,ldf i found it intact.
then i try to attach my db but without benifit, it return to me error
msg like the msg when you try to attach already attached db.
then i think to add new db with the same name, the server again return
error!
So i concluded from this case my db name & alias already found in
master db or whatever sql registry, but not physically attached to
mdf,ldf files.
when i attach my db to another sql server on other pc, it work fine &
no data lost.
So i uninstalled my sql server then reinstall & attach, finally it
work fine ...
that is all.
i know it can be solved by another way if i expert in dba admin.
thank you all, & welcome to reply if any one get the idea on dba admin
basis & knowledge...
|||"hamiiied@.gmail.com" wrote:

> For understanding what happen i can explain the problem from start to
> end ...
> when i complete development tasks on my db using sql express managment
> studio, i right click on db --> shrink, the server hanging for tens
> of seconds, afterthat it return error message, it is long msg but i
> read its header like 'can't determine rows or index in sysindexes or
> like this',,, i follow the instruction to solve until it routing me to
> microsoft support, finally microsoft online help return sorry no idea
> about this error.
> i think the error happen in the master db..
> after that the db disappeared from the db list..
> i explore the location of mdf,ldf i found it intact.
> then i try to attach my db but without benifit, it return to me error
> msg like the msg when you try to attach already attached db.
> then i think to add new db with the same name, the server again return
> error!
> So i concluded from this case my db name & alias already found in
> master db or whatever sql registry, but not physically attached to
> mdf,ldf files.
> when i attach my db to another sql server on other pc, it work fine &
> no data lost.
> So i uninstalled my sql server then reinstall & attach, finally it
> work fine ...
> that is all.
> i know it can be solved by another way if i expert in dba admin.
> thank you all, & welcome to reply if any one get the idea on dba admin
> basis & knowledge...
>
My guess is that you have auto close set for this database and it closed
because there was no connections to the database half way through your
process. For performance reasons auto close is not a good idea.
John

Accidentally dettached

Hello all, i trying to shrink db from sql express manager, then
suddently error msg appear, afterthat the db disappeared from the
list !!
I want the db back & working, i trying attach but without success.
Can anyone help me about how can i restore my db (mdf,ldf are found),
attach not work.Hi
"hamiiied@.gmail.com" wrote:
> Hello all, i trying to shrink db from sql express manager, then
> suddently error msg appear, afterthat the db disappeared from the
> list !!
> I want the db back & working, i trying attach but without success.
> Can anyone help me about how can i restore my db (mdf,ldf are found),
> attach not work.
>
It would be useful if you had said how you tried to re-attach the database
and what error number and message you recieved. There may be a more
fundamental underlying error why you can not do this!
You can re-attach a database using the sp_attach_db command in SQLCMD the
syntax of this can be found in books online or at
http://msdn2.microsoft.com/en-us/library/aa259611(SQL.80).aspx. If you dont
have the log file you can use sp_attach_single_file_db.
With SQLExpress you can also use the CREATE DATABASE with the FOR ATTACH
clause.
John|||Hi,
I think it will be easier to help you, if you'd tell which error
messages you get. Also, what makes you believe that the databases has
been detached? Detaching a database is something you'll have to do, and
not something that just happens.
--
Regards
Steen Schlüter Persson
Database Administrator / System Administrator
hamiiied@.gmail.com wrote:
> Hello all, i trying to shrink db from sql express manager, then
> suddently error msg appear, afterthat the db disappeared from the
> list !!
> I want the db back & working, i trying attach but without success.
> Can anyone help me about how can i restore my db (mdf,ldf are found),
> attach not work.
>|||On Jun 25, 10:48 am, "Steen Schl=FCter Persson (DK)"
<steen@.REMOVE_THIS_asavaenget.dk> wrote:
> Hi,
> I think it will be easier to help you, if you'd tell which error
> messages you get. Also, what makes you believe that the databases has
> been detached? Detaching a database is something you'll have to do, and
> not something that just happens.
> --
> Regards
> Steen Schl=FCter Persson
> Database Administrator / System Administrator
>
> hamii...@.gmail.com wrote:
> > Hello all, i trying to shrink db from sql express manager, then
> > suddently error msg appear, afterthat the db disappeared from the
> > list !!
> > I want the db back & working, i trying attach but without success.
> > Can anyone help me about how can i restore my db (mdf,ldf are found),
> > attach not work.- Hide quoted text -
> - Show quoted text -
Hi, thanks for your replies, i fix the bugs by reinstalling SQL
server, then attaching the mdf.|||"hamiiied@.gmail.com" wrote:
> On Jun 25, 10:48 am, "Steen Schl|ter Persson (DK)"
> <steen@.REMOVE_THIS_asavaenget.dk> wrote:
> > Hi,
> >
> > I think it will be easier to help you, if you'd tell which error
> > messages you get. Also, what makes you believe that the databases has
> > been detached? Detaching a database is something you'll have to do, and
> > not something that just happens.
> >
> > --
> > Regards
> > Steen Schl|ter Persson
> > Database Administrator / System Administrator
> >
> >
> >
> > hamii...@.gmail.com wrote:
> > > Hello all, i trying to shrink db from sql express manager, then
> > > suddently error msg appear, afterthat the db disappeared from the
> > > list !!
> > > I want the db back & working, i trying attach but without success.
> > > Can anyone help me about how can i restore my db (mdf,ldf are found),
> > > attach not work.- Hide quoted text -
> >
> > - Show quoted text -
> Hi, thanks for your replies, i fix the bugs by reinstalling SQL
> server, then attaching the mdf.
>
So we don't really know what was wrong!!
John|||For understanding what happen i can explain the problem from start to
end ...
when i complete development tasks on my db using sql express managment
studio, i right click on db --> shrink, the server hanging for tens
of seconds, afterthat it return error message, it is long msg but i
read its header like 'can't determine rows or index in sysindexes or
like this',,, i follow the instruction to solve until it routing me to
microsoft support, finally microsoft online help return sorry no idea
about this error.
i think the error happen in the master db..
after that the db disappeared from the db list..
i explore the location of mdf,ldf i found it intact.
then i try to attach my db but without benifit, it return to me error
msg like the msg when you try to attach already attached db.
then i think to add new db with the same name, the server again return
error!
So i concluded from this case my db name & alias already found in
master db or whatever sql registry, but not physically attached to
mdf,ldf files.
when i attach my db to another sql server on other pc, it work fine &
no data lost.
So i uninstalled my sql server then reinstall & attach, finally it
work fine ...
that is all.
i know it can be solved by another way if i expert in dba admin.
thank you all, & welcome to reply if any one get the idea on dba admin
basis & knowledge...|||"hamiiied@.gmail.com" wrote:
> For understanding what happen i can explain the problem from start to
> end ...
> when i complete development tasks on my db using sql express managment
> studio, i right click on db --> shrink, the server hanging for tens
> of seconds, afterthat it return error message, it is long msg but i
> read its header like 'can't determine rows or index in sysindexes or
> like this',,, i follow the instruction to solve until it routing me to
> microsoft support, finally microsoft online help return sorry no idea
> about this error.
> i think the error happen in the master db..
> after that the db disappeared from the db list..
> i explore the location of mdf,ldf i found it intact.
> then i try to attach my db but without benifit, it return to me error
> msg like the msg when you try to attach already attached db.
> then i think to add new db with the same name, the server again return
> error!
> So i concluded from this case my db name & alias already found in
> master db or whatever sql registry, but not physically attached to
> mdf,ldf files.
> when i attach my db to another sql server on other pc, it work fine &
> no data lost.
> So i uninstalled my sql server then reinstall & attach, finally it
> work fine ...
> that is all.
> i know it can be solved by another way if i expert in dba admin.
> thank you all, & welcome to reply if any one get the idea on dba admin
> basis & knowledge...
>
My guess is that you have auto close set for this database and it closed
because there was no connections to the database half way through your
process. For performance reasons auto close is not a good idea.
John|||Hi,
You need to try the following steps to get it back:
1. Put your current .mdf, .ndfs, .ldfs in a safe place - i.e. make a
copy of them and place them under a different path.
2. Delete the .mdf, .ndfs, .ldfs from the current path (where SQL
Server expects to find them).
3. Create a database with exactly the same name as your non-functioning
database and with the exact same file names and file locations.
4. Shut down the SQL Server service.
5. Delete the files of the dummy database you just created in step 3.
6. Replace the files you deleted in step 5 with the original database
files, i.e. the ones you put in a safe place in step 1.
7. Startup the SQL Server service.
8. Assuming that the database does come online properly run DBCC
CHECKDB on it.
Jonathan
hamiiied@.gmail.com wrote:
> Hello all, i trying to shrink db from sql express manager, then
> suddently error msg appear, afterthat the db disappeared from the
> list !!
> I want the db back & working, i trying attach but without success.
> Can anyone help me about how can i restore my db (mdf,ldf are found),
> attach not work.
>

Sunday, February 19, 2012

Accessing SSAS Cube from Report Manager Error

Hey Forum Community

I seem to have a problem creating a model for my AS cube through Report Manager.

I have set up the data source as follows:

Name: Gates Aust Business Intelligence

Connection Type: MS SQL Server Analysis Services

Connection String: Data Source=MANT4003;initial catalog="GAPL Sales Analysis"

Connect Using: Windows Interegrated Security

This part works, but when i go to generate the model, i get the following error in the browser:

"

Cannot create a connection to data source ''. (rsErrorOpeningConnection) Get Online Help

For more information about this error navigate to the report server on the local server machine, or enable remote errors

In the reporting services log file i have the following errors:

w3wp!library!7!07/03/2006-10:51:40:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.DataSourceOpenException: Cannot create a connection to data source ''., ;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.DataSourceOpenException: Cannot create a connection to data source ''. > Microsoft.AnalysisServices.AdomdClient.AdomdConnectionException: The connection either timed out or was lost. > System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. > System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
End of inner exception stack trace
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.IO.BufferedStream.Read(Byte[] array, Int32 offset, Int32 count)
at Microsoft.AnalysisServices.AdomdClient.DimeRecord.ForceRead(Stream stream, Byte[] buffer, Int32 length)
at Microsoft.AnalysisServices.AdomdClient.DimeRecord.ReadHeader()
at Microsoft.AnalysisServices.AdomdClient.DimeRecord..ctor(Stream stream)
at Microsoft.AnalysisServices.AdomdClient.DimeReader.ReadRecord()
at Microsoft.AnalysisServices.AdomdClient.TcpStream.GetDataType()
End of inner exception stack trace
at Microsoft.AnalysisServices.AdomdClient.XmlaClient.EndRequest()
at Microsoft.AnalysisServices.AdomdClient.XmlaClient.CreateSession(ListDictionary properties, Boolean sendNamespaceCompatibility)
at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.XmlaClientProvider.Microsoft.AnalysisServices.AdomdClient.AdomdConnection.IXmlaClientProviderEx.CreateSession(Boolean sendNamespaceCompatibility)
at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.ConnectToXMLA(Boolean createSession, Boolean isHTTP)
at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.Open()
at Microsoft.ReportingServices.Library.RSService.OpenDataSourceConnection(DataSourceInfo dataSourceInfo, CreateDataExtensionInstance createDataExtensionInstanceFunction, Boolean isUnattendedExecution, Boolean unwrapConnection, IntPtr clientToken, IDbConnection& unwrappedConnection)
End of inner exception stack trace
w3wp!library!1!07/03/2006-10:51:59:: i INFO: Call to GetPermissions:/
w3wp!library!1!07/03/2006-10:53:02:: i INFO: Call to GetPermissions:/

I have tried searching the forums and cannot find anything really helpful. I have had one cube setup and a model generated before and all was workin, but i had to delete it and i recreated the SSAS cube from scratch.

My user account has admin rights on the cube and also on the servers.

Server is Windows 2003

Client is Windows XP.

Any one got anythoughts on this or how i can determine what is wrong.?

Many Thanks


Scotty

Hi, i am facing the same problem. I found some information from MS though wasn't useful to me (My Report Server machine does not have an registry entry such as:

"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer\SuperSocketNetLib"). Maybe can help u:

http://support.microsoft.com/default.aspx/kb/919710/

Let me know if u can handle the problem. (By the way my report server has only Reporting Services installed on (From SQL 2005 EE DVD), and the Analysis Server has Fully installed SQL Server 2005 Standart Edition. - can this be a problem?)

|||

Hi, i am facing the same problem. I found some information from MS though wasn't useful to me (My Report Server machine does not have an registry entry such as:

"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer\SuperSocketNetLib"). Maybe can help u:

http://support.microsoft.com/default.aspx/kb/919710/

Let me know if u can handle the problem. (By the way my report server has only Reporting Services installed on (From SQL 2005 EE DVD), and the Analysis Server has Fully installed SQL Server 2005 Standart Edition. - can this be a problem?)

Accessing SSAS Cube from Report Manager Error

Hey Forum Community

I seem to have a problem creating a model for my AS cube through Report Manager.

I have set up the data source as follows:

Name: Gates Aust Business Intelligence

Connection Type: MS SQL Server Analysis Services

Connection String: Data Source=MANT4003;initial catalog="GAPL Sales Analysis"

Connect Using: Windows Interegrated Security

This part works, but when i go to generate the model, i get the following error in the browser:

"

Cannot create a connection to data source ''. (rsErrorOpeningConnection) Get Online Help

For more information about this error navigate to the report server on the local server machine, or enable remote errors

In the reporting services log file i have the following errors:

w3wp!library!7!07/03/2006-10:51:40:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.DataSourceOpenException: Cannot create a connection to data source ''., ;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.DataSourceOpenException: Cannot create a connection to data source ''. > Microsoft.AnalysisServices.AdomdClient.AdomdConnectionException: The connection either timed out or was lost. > System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. > System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
End of inner exception stack trace
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.IO.BufferedStream.Read(Byte[] array, Int32 offset, Int32 count)
at Microsoft.AnalysisServices.AdomdClient.DimeRecord.ForceRead(Stream stream, Byte[] buffer, Int32 length)
at Microsoft.AnalysisServices.AdomdClient.DimeRecord.ReadHeader()
at Microsoft.AnalysisServices.AdomdClient.DimeRecord..ctor(Stream stream)
at Microsoft.AnalysisServices.AdomdClient.DimeReader.ReadRecord()
at Microsoft.AnalysisServices.AdomdClient.TcpStream.GetDataType()
End of inner exception stack trace
at Microsoft.AnalysisServices.AdomdClient.XmlaClient.EndRequest()
at Microsoft.AnalysisServices.AdomdClient.XmlaClient.CreateSession(ListDictionary properties, Boolean sendNamespaceCompatibility)
at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.XmlaClientProvider.Microsoft.AnalysisServices.AdomdClient.AdomdConnection.IXmlaClientProviderEx.CreateSession(Boolean sendNamespaceCompatibility)
at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.ConnectToXMLA(Boolean createSession, Boolean isHTTP)
at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.Open()
at Microsoft.ReportingServices.Library.RSService.OpenDataSourceConnection(DataSourceInfo dataSourceInfo, CreateDataExtensionInstance createDataExtensionInstanceFunction, Boolean isUnattendedExecution, Boolean unwrapConnection, IntPtr clientToken, IDbConnection& unwrappedConnection)
End of inner exception stack trace
w3wp!library!1!07/03/2006-10:51:59:: i INFO: Call to GetPermissions:/
w3wp!library!1!07/03/2006-10:53:02:: i INFO: Call to GetPermissions:/

I have tried searching the forums and cannot find anything really helpful. I have had one cube setup and a model generated before and all was workin, but i had to delete it and i recreated the SSAS cube from scratch.

My user account has admin rights on the cube and also on the servers.

Server is Windows 2003

Client is Windows XP.

Any one got anythoughts on this or how i can determine what is wrong.?

Many Thanks


Scotty

Hi, i am facing the same problem. I found some information from MS though wasn't useful to me (My Report Server machine does not have an registry entry such as:

"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer\SuperSocketNetLib"). Maybe can help u:

http://support.microsoft.com/default.aspx/kb/919710/

Let me know if u can handle the problem. (By the way my report server has only Reporting Services installed on (From SQL 2005 EE DVD), and the Analysis Server has Fully installed SQL Server 2005 Standart Edition. - can this be a problem?)

|||

Hi, i am facing the same problem. I found some information from MS though wasn't useful to me (My Report Server machine does not have an registry entry such as:

"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer\SuperSocketNetLib"). Maybe can help u:

http://support.microsoft.com/default.aspx/kb/919710/

Let me know if u can handle the problem. (By the way my report server has only Reporting Services installed on (From SQL 2005 EE DVD), and the Analysis Server has Fully installed SQL Server 2005 Standart Edition. - can this be a problem?)

Thursday, February 16, 2012

Accessing SQL Server 2005 through Vista

I just bought a new HP laptop that has Vista installed. Not happy about the OS but it is what it is...

I need to use Enterprise Manager, or an equivalent, to access a remote server, running SQL 2005.

With XP, I always installed and used SQL Server 2000 Client features.

Vista does not play well with SQL 2000 so I am looking for an alternative to simply be able to access, and perform DTS functions, a remote SQL 2005 system.

Does SQL Server 2005 Express offer client alias features?

Can anyone recommend another approach or product?

Thank you,

SteveVista sucks, no doubt about it. I had to install it at work, but it will be a LONG time before I choose to install it at home.
That said, what errors or issues to you run into running Enterprise Manager on Vista? This is one thing that I have not had a problem with.|||Thanks blindman,

Are you referring to EM in SQL 2000 or 2005? I've tried both with different issues.

Steve|||EM is 2000. SSMS is 2005. I am running both on a Vista desktop.|||blindman,

I have installed SMSS and it is running. However, when I try to open or modify any tables or views, SQL stalls out.

I can see the databases, the table names but when I try to open any table, regardless of size, it shoes (expanding) but then stalls out.

I have created an exception in Windows firewall...

Thanks for any insight,

Steve|||Is the SQL Server local or remote?|||remote.

I have comfirmed that it is set up to allow remote connections.

thanks|||If SSMS opens correctly under Vista, but merely stalls out when trying to connect to a remote database server, then my guess is that you have a network issue.

Accessing SQL Server 2005 through Vista

I just bought a new HP laptop that has Vista installed.

I need to use Enterprise Manager, or an equivalent, to access a remote server, running SQL 2005.

With XP, I always installed and used SQL Server 2000 Client features.

Vista does not play well with SQL 2000 so I am looking for an alternative to simply be able to access, and perform DTS functions, a remote SQL 2005 system.

Does SQL Server 2005 Express offer client alias features?

Can anyone recommend another approach or product?

Thank you,

Steve

Just install the SQL 2005 client tools with the DTS add tool (available from microsoft.com/sql).|||SQL 2000 is not supported on Vista and you have depend only on SQL 2005 - http://www.microsoft.com/sql/prodinfo/previousversions/faq-sql_on_vista.mspx fyi on vista support.|||

SQL Server Configuration Manager lets you define aliases for servers in the SQL Native Client Configuration | Aliases node. You can register servers in Management Studio to simplify connecting to them as well.

Hope this helps,

Steve

Accessing SQL Server 2005 through Vista

I just bought a new HP laptop that has Vista installed.

I need to use Enterprise Manager, or an equivalent, to access a remote server, running SQL 2005.

With XP, I always installed and used SQL Server 2000 Client features.

Vista does not play well with SQL 2000 so I am looking for an alternative to simply be able to access, and perform DTS functions, a remote SQL 2005 system.

Does SQL Server 2005 Express offer client alias features?

Can anyone recommend another approach or product?

Thank you,

Steve

Just install the SQL 2005 client tools with the DTS add tool (available from microsoft.com/sql).|||SQL 2000 is not supported on Vista and you have depend only on SQL 2005 - http://www.microsoft.com/sql/prodinfo/previousversions/faq-sql_on_vista.mspx fyi on vista support.|||

SQL Server Configuration Manager lets you define aliases for servers in the SQL Native Client Configuration | Aliases node. You can register servers in Management Studio to simplify connecting to them as well.

Hope this helps,

Steve