Showing posts with label time. Show all posts
Showing posts with label time. Show all posts

Tuesday, March 27, 2012

Can not Depoloy Report

Hi,
I am having a problem to deploy reports; every time I try to deploy a
report the build stage is finishing and I get this Error:
A connection could not be made to report server http://
localhost/reports/ pages/folder.aspx
However, when I try entering http:// localhost/reports/
pages/folder.aspx from the browser I can see the report manager
without any problem ( and without my reports...).
Does anyone knows has a solution?
Thank you.
Avi.You may not have permissions, can you use the Report Manager web interface
to show details on the folder and reports from there?
Steve MunLeeuw
"AB" <savi176@.yahoo.com> wrote in message
news:1160605034.061779.42970@.m7g2000cwm.googlegroups.com...
> Hi,
> I am having a problem to deploy reports; every time I try to deploy a
> report the build stage is finishing and I get this Error:
> A connection could not be made to report server http://
> localhost/reports/ pages/folder.aspx
> However, when I try entering http:// localhost/reports/
> pages/folder.aspx from the browser I can see the report manager
> without any problem ( and without my reports...).
> Does anyone knows has a solution?
>
> Thank you.
> Avi.
>|||The report Manager is still empty, this is the first time I use it on
my home comuter.
How can I give myself permissions?
Steve MunLeeuw =D7=9B=D7=AA=D7=91:
> You may not have permissions, can you use the Report Manager web interface
> to show details on the folder and reports from there?
> Steve MunLeeuw
> "AB" <savi176@.yahoo.com> wrote in message
> news:1160605034.061779.42970@.m7g2000cwm.googlegroups.com...
> > Hi,
> > I am having a problem to deploy reports; every time I try to deploy a
> > report the build stage is finishing and I get this Error:
> >
> > A connection could not be made to report server http://
> > localhost/reports/ pages/folder.aspx
> >
> > However, when I try entering http:// localhost/reports/
> > pages/folder.aspx from the browser I can see the report manager
> > without any problem ( and without my reports...).
> >
> > Does anyone knows has a solution?
> >
> >
> > Thank you.
> >
> > Avi.
> >|||.Thank you for your answer but evev after I define my user I still got
this message
?Any suggestions
AB =D7=9B=D7=AA=D7=91:
> The report Manager is still empty, this is the first time I use it on
> my home comuter.
> How can I give myself permissions?
>
>
> Steve MunLeeuw =D7=9B=D7=AA=D7=91:
> > You may not have permissions, can you use the Report Manager web interf=ace
> > to show details on the folder and reports from there?
> >
> > Steve MunLeeuw
> >
> > "AB" <savi176@.yahoo.com> wrote in message
> > news:1160605034.061779.42970@.m7g2000cwm.googlegroups.com...
> > > Hi,
> > > I am having a problem to deploy reports; every time I try to deploy a
> > > report the build stage is finishing and I get this Error:
> > >
> > > A connection could not be made to report server http://
> > > localhost/reports/ pages/folder.aspx
> > >
> > > However, when I try entering http:// localhost/reports/
> > > pages/folder.aspx from the browser I can see the report manager
> > > without any problem ( and without my reports...).
> > >
> > > Does anyone knows has a solution?
> > >
> > >
> > > Thank you.
> > >
> > > Avi.
> > >|||You need to be logged into you computer as a local admin to the machine.
This will automatically make you part of the RS admin role. Also, if you
have by any chance messed around with IIS and turned anonymous access on
then you will be considered anonymous and hence not have the rights to
deploy.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"AB" <savi176@.yahoo.com> wrote in message
news:1160640060.505189.232900@.b28g2000cwb.googlegroups.com...
.Thank you for your answer but evev after I define my user I still got
this message
?Any suggestions
AB ?:
> The report Manager is still empty, this is the first time I use it on
> my home comuter.
> How can I give myself permissions?
>
>
> Steve MunLeeuw ?:
> > You may not have permissions, can you use the Report Manager web
> > interface
> > to show details on the folder and reports from there?
> >
> > Steve MunLeeuw
> >
> > "AB" <savi176@.yahoo.com> wrote in message
> > news:1160605034.061779.42970@.m7g2000cwm.googlegroups.com...
> > > Hi,
> > > I am having a problem to deploy reports; every time I try to deploy a
> > > report the build stage is finishing and I get this Error:
> > >
> > > A connection could not be made to report server http://
> > > localhost/reports/ pages/folder.aspx
> > >
> > > However, when I try entering http:// localhost/reports/
> > > pages/folder.aspx from the browser I can see the report manager
> > > without any problem ( and without my reports...).
> > >
> > > Does anyone knows has a solution?
> > >
> > >
> > > Thank you.
> > >
> > > Avi.
> > >|||Make sure you do not have anonymous enabled in IIS.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"AB" <savi176@.yahoo.com> wrote in message
news:1160605034.061779.42970@.m7g2000cwm.googlegroups.com...
> Hi,
> I am having a problem to deploy reports; every time I try to deploy a
> report the build stage is finishing and I get this Error:
> A connection could not be made to report server http://
> localhost/reports/ pages/folder.aspx
> However, when I try entering http:// localhost/reports/
> pages/folder.aspx from the browser I can see the report manager
> without any problem ( and without my reports...).
> Does anyone knows has a solution?
>
> Thank you.
> Avi.
>

Sunday, March 11, 2012

Can it be a bug in SQL CE?

Hi!

I use SQL CE with VS.NET 2003. I find the following bug second time.

The table has an "ID int IDENTITY(0,1) PRIMARY KEY,". That is my row identity.

I add rows to the table, then I made some select and update queries. Then I realized that the ID order not in the general order (from 0 to ........)

For example: 6,7,8,0,1,2,3,4,5.

Of course row 6,7 and 8 was added the very last.

The content of each row is not mixed, only the ID order.

Is it a very confused, because we develop mobile invoice programs for PDAs.

What I did wrong?

Thank you!

Do you mean rows are not sorted by ID should you retrieve them with select or IDs are created not in order of insertions? Say, you have integer column in addition to ID, and you've inserted numbers from 0 to 3 into it. Do you get data like this:

2 2

1 1

0 0

3 3

Or like this:

2 0

1 1

0 2

3 3

|||

Duplicate thread from the same user: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=229153&SiteID=1

Follow only the above given thread. This thread will not be monitored any more.

Thanks,

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Mobile, Microsoft Corporation

Can isolation level be set in connectionstring?

Hi,

I would like to be able to alter the default isolation level at connection time via the ADO connection string. Can this be done?

Why? I have various reporting applications (Crystal etc.) that queries against MS SQL server using ADO (SQLOLEDB). I would like to be able to alter the isolation level for these queries to readuncommitted. But many of the reporting applications does not have this option and they autogenerate the SQL making it impossible to use the use the WITH(table_hints) clause in the SELECT statement. So if I could set the isolation level in the connection string this could be a workaround.

Any help will be appreciated!

Bertrand

No, not in the connection string.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

Can isolation level be set in connectionstring?

Hi,

I would like to be able to alter the default isolation level at connection time via the ADO connection string. Can this be done?

Why? I have various reporting applications (Crystal etc.) that queries against MS SQL server using ADO (SQLOLEDB). I would like to be able to alter the isolation level for these queries to readuncommitted. But many of the reporting applications does not have this option and they autogenerate the SQL making it impossible to use the use the WITH(table_hints) clause in the SELECT statement. So if I could set the isolation level in the connection string this could be a workaround.

Any help will be appreciated!

Bertrand

No, not in the connection string.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

Wednesday, March 7, 2012

Can I use SQL 2005 script to create SQL 2000 database?

Can I use a script generated in SQL 2005 to create a database on a SQL 2000
server?
We're migrating from SQL 2000 to SQL 2005, and at the same time doing a
major upgrade to an existing SQL 2000 database. Another group created the
new database in SQL 2005 on a remote test server. I connected to the test
server and generated a script to recreate the database on another server
running SQL 2000.
Any help would be appreciated.
John
John,
As long as the script does not use any 2005 features it will work fine. But
if that was not thought about at script generation, then you may have a few
problems.
If you use the scripting tools in SQL Server Management Studio 2005 to
create a script from a database on a 2005 server, you will see that you can
choose the option to create a 2000 or a 2005 script. They are a little
different, so if that is how they generated your script, perhaps they can
(re)generate using the 2000 format.
RLF
"John Steen" <moderndads(nospam)@.hotmail.com> wrote in message
news:BD83397B-F6A9-4153-ABCF-9E84D2E7AC5D@.microsoft.com...
> Can I use a script generated in SQL 2005 to create a database on a SQL
> 2000
> server?
> We're migrating from SQL 2000 to SQL 2005, and at the same time doing a
> major upgrade to an existing SQL 2000 database. Another group created the
> new database in SQL 2005 on a remote test server. I connected to the test
> server and generated a script to recreate the database on another server
> running SQL 2000.
> Any help would be appreciated.
> John
|||Thanks for the quick reply, Russell. I'll let the other group know to
regenerate the script for 2000.
John
"Russell Fields" wrote:

> John,
> As long as the script does not use any 2005 features it will work fine. But
> if that was not thought about at script generation, then you may have a few
> problems.
> If you use the scripting tools in SQL Server Management Studio 2005 to
> create a script from a database on a 2005 server, you will see that you can
> choose the option to create a 2000 or a 2005 script. They are a little
> different, so if that is how they generated your script, perhaps they can
> (re)generate using the 2000 format.
> RLF
> "John Steen" <moderndads(nospam)@.hotmail.com> wrote in message
> news:BD83397B-F6A9-4153-ABCF-9E84D2E7AC5D@.microsoft.com...
>
>

Can I use OUTER JOIN on 2 columns at the same time?

I have Table1 with 2 columns Label_ID and Athlete_ID, I have another Table2 with 3 columns Label_ID, Athlete_ID, Data.

I need join this tables so the result table will have the same number of rows as Table1 and have extra column add Data which will correspond to Data in Table2 if Label_ID an Athlete_ID are matched and NULL if no matches found.

I have following query which does not produce desired result

SELECT Table1.label_id, Table1.athlete_id, data FROM Table1 LEFT OUTER JOIN Table2 on (Table1.label_id = Table2.label_id AND Table1.athlete_id = Table2.athlete_id)

The end result of this is table with only rows where label_id and athlete_id are matched between tables but no results when they are not. I expected OUTER JOIN to have those result but it's not working for whatever reason.

I'm pretty sure it's simple solution but can not figure out myself.

The query is correct ,it has to give the expected result.

Could you provide us with sample data?

|||

That's true it works with scenario I specified but I simplified my real life challenge. Table2 actually contains an extra column called Game of type int. It's nullable. I want the same thing I specified originally but only if Game=15, so my tables are

Table1

label_id athlete_id

1 1 2 1 3 1 1 2 2 2 3 2

Table2

label_id athlete_id data game

1 2 5 15 2 3 4 15 1 7 7 17

I want all rows from Table1 corresponding to label_id and athlete_id between tables for Game=15

Query below (

SELECT Table1.label_id, Table1.athlete_id, data, game FROM Table1

LEFT OUTER JOIN Table2 on (Table1.label_id = Table2.label_id AND Table1.athlete_id = Table2.athlete_id)

where game=15

)

returns single row. How can I return all rows with null values where no matches are found and only for game_id

|||

What is your expected result?

I think that following is the expected results from the records you given

labelid athleteid data game

1 1 NULL NULL

2 1 NULL NULL

3 1 NULL NULL

1 2 5 15

2 2 NULL NULL

3 2 NULL NULL

The following is the query

Code Snippet

Select * from

(SELECT Table1.labelid, Table1.atheleteid, data, game FROM Table1

LEFT OUTER JOIN Table2 on (Table1.labelid = Table2.labelid AND Table1.atheleteid = Table2.atheleteid)) as TempTable

where Game=15 or Game is null

|||

Use Full Outer Join:

Code Snippet

SELECT

isnull(table1.label_id,table2.label_id),

isnull(table1.athlete_id,table2.athlete_id),

data,

game

FROM

table1

FULL OUTER JOIN table2 ON

(

table1.label_id = table2.label_id

and table1.athlete_id = table2.athlete_id

)

WHERE

game=15

/*

label_idathlete_iddatagame

-- -- -- --

12515

23415

*/

Move the Where clause to ON itself

Code Snippet

SELECT

Table1.label_id,

Table1.athlete_id,

data,

game

FROM

Table1 Table1

LEFT OUTER JOIN Table2 table2 ON

(

Table1.label_id = Table2.label_id

AND Table1.athlete_id = Table2.athlete_id

) and game=15

/*

label_idathlete_iddatagame

-- -- -- --

11NULLNULL

21NULLNULL

31NULLNULL

12515

22NULLNULL

32NULLNULL

*/

Can I use OUTER JOIN on 2 columns at the same time?

I have Table1 with 2 columns Label_ID and Athlete_ID, I have another Table2 with 3 columns Label_ID, Athlete_ID, Data.

I need join this tables so the result table will have the same number of rows as Table1 and have extra column add Data which will correspond to Data in Table2 if Label_ID an Athlete_ID are matched and NULL if no matches found.

I have following query which does not produce desired result

SELECT Table1.label_id, Table1.athlete_id, data FROM Table1 LEFT OUTER JOIN Table2 on (Table1.label_id = Table2.label_id AND Table1.athlete_id = Table2.athlete_id)

The end result of this is table with only rows where label_id and athlete_id are matched between tables but no results when they are not. I expected OUTER JOIN to have those result but it's not working for whatever reason.

I'm pretty sure it's simple solution but can not figure out myself.

The query is correct ,it has to give the expected result.

Could you provide us with sample data?

|||

That's true it works with scenario I specified but I simplified my real life challenge. Table2 actually contains an extra column called Game of type int. It's nullable. I want the same thing I specified originally but only if Game=15, so my tables are

Table1

label_id athlete_id

1 1 2 1 3 1 1 2 2 2 3 2

Table2

label_id athlete_id data game

1 2 5 15 2 3 4 15 1 7 7 17

I want all rows from Table1 corresponding to label_id and athlete_id between tables for Game=15

Query below (

SELECT Table1.label_id, Table1.athlete_id, data, game FROM Table1

LEFT OUTER JOIN Table2 on (Table1.label_id = Table2.label_id AND Table1.athlete_id = Table2.athlete_id)

where game=15

)

returns single row. How can I return all rows with null values where no matches are found and only for game_id

|||

What is your expected result?

I think that following is the expected results from the records you given

labelid athleteid data game

1 1 NULL NULL

2 1 NULL NULL

3 1 NULL NULL

1 2 5 15

2 2 NULL NULL

3 2 NULL NULL

The following is the query

Code Snippet

Select * from

(SELECT Table1.labelid, Table1.atheleteid, data, game FROM Table1

LEFT OUTER JOIN Table2 on (Table1.labelid = Table2.labelid AND Table1.atheleteid = Table2.atheleteid)) as TempTable

where Game=15 or Game is null

|||

Use Full Outer Join:

Code Snippet

SELECT

isnull(table1.label_id,table2.label_id),

isnull(table1.athlete_id,table2.athlete_id),

data,

game

FROM

table1

FULL OUTER JOIN table2 ON

(

table1.label_id = table2.label_id

and table1.athlete_id = table2.athlete_id

)

WHERE

game=15

/*

label_idathlete_iddatagame

-- -- -- --

12515

23415

*/

Move the Where clause to ON itself

Code Snippet

SELECT

Table1.label_id,

Table1.athlete_id,

data,

game

FROM

Table1 Table1

LEFT OUTER JOIN Table2 table2 ON

(

Table1.label_id = Table2.label_id

AND Table1.athlete_id = Table2.athlete_id

) and game=15

/*

label_idathlete_iddatagame

-- -- -- --

11NULLNULL

21NULLNULL

31NULLNULL

12515

22NULLNULL

32NULLNULL

*/

Friday, February 24, 2012

Can I update several columns with CASE expressions using SQL at the same time?

Hi, all here,

I am having a question about update several columns with CASE expression in SQL Server 2005 database engine. Is it possible to do that in SQL Server 2005 database engine?

Thanks a lot in advance for any help and guidance.

Can you be more specific about what you're trying to achieve? Using CASE in an update statement is perfectly legal. For instance you can set the value of a column based on a case statement:

declare @.var int

set @.var = 10

update T1 set Col1 = case @.var when 1 then 'Something' when 2 then 'Something2' else 'SomethingElse' end

where Col1 = 1

can i transfer data from two tables to a single table at a time (row wise)

i need to transfer the data from allbase (old database) to sql server 2005 .

moreover the structure is different say in allbase we may have 10 tables but now we want more tables .and some tables may have more fields than the previous table's fields for ex: productdigit (previous table name) have 2 fields and present table productline have 4 fields (while using export/import wizard those are set to null but we dont want to set null).

and i dont have knowledge on ssis now i am learning it. but i could not understand how to use those items in toolbox and how to specify datasource for odbc and all.

and please help me to create custom component if needed.

thanks in advance

B L,

I would reccomend you to go to books on line; there are some tutorials that will help you on getting started. Getting some books will help you as well. Then you can come back with specific questions/issues.

http://msdn2.microsoft.com/en-us/library/bb418492.aspx

|||

thanks for immediate response .

we have different data flow sources in toolbox but there is nothing for odbc .

If i want to connect to odbc what item should i use?

and for transferring data from source to destination which item i should use in in data flow transformation.

do i need to write any script if so can i write c# instead of vb.net wt property i need to set

|||

Few things:

Toolbox is context sensitive; it will show a diffrent set of tools depending on where you are: control flow or data flow To pump data from an ODBC source: Create a connection manager that points to your ODBC source (DNSmust be define in the machine running the package) Create a data flow task in in the control flow In Data flow task add a data reader that uses the connection manager you created add a destination component COnnect the source component to the destination component.|||

thanks for valuable suggestion .

for transferring data from old database to new one when the structure is different means

--> the number of tables / name of tables is different.

--> the structure of table is also different say the old table contains n number of columns and the new table may contain either n+ or n- number of columns and some columns in new table might not be there in old table .can i have new columns as primary?

can u guide me in that way and can you tell me which items i should use in data flow task.

|||

hello,

i have data in old database which contains many tables and i want to retrive data from two tables and insert that data into one table in the destination by SSIS package.

for example:

input output

- --

userinfo ( table ) userdetails ( table )

user_id --> id

userdata ( table2 )

name --> name

city --> city

can i do like that? please suggest me to do so .

|||

There are several ways. My first approach would be to write a query (IF the 2 source tables are in the same DB); then use that query in the source component. That way the dataflow will have all required columns right out of the source component.

Another apporach is to use 2 source componnets and then a Merge Join transformation to join the 2 data sets. This approach requires the 2 data sets to be order before hiting the merge join. Performance can also suffer with this approach since the Join takes place inside SSIS rather than in the DB engine.

|||

B L Rao wrote:

do i need to write any script if so can i write c# instead of vb.net wt property i need to set

The script task and script component only support VB.NET, not C#.

You can build your own custom SSIS component DLLs using any .NET language, but this adds a LOT of complexity.

|||

hi Rafel Salas ,

thank you for your reply by which i got some idea ,

yes we have those tables in same DB.

but still some confusion in that first approach that is where to write that query and if possible what query i can write .

so plz give me clear idea .

and second approach is clear to me .

thanks and regards

B L Rao.

|||Just write the query that gives the desired output and then you can place it directly in the OLE DB source component by changing the data access mode to "SQL Command". Another option is to place the query in a SSIS string variable and then use data access mode "SQL Command from variable"|||

hi,

The approaches are best suitable in the scenario where we can make join between two tables. Means when we have one common column on the basis of which we can create join.

But what should we do if we want to fetch data of column1, column2 from table 1 and data of col5 from table 2 without making join.

For example

table 1 has

column1

column2

column3

table 2

col1

col2

col3

col4

col5

I have tried Union All task, and Merge task but it returned 2 rows like following

null,null,col5

column1,column2,null

but output through SSIS in destination table 3 should be combination of three columns in one row like this :

column1,column2,col5 .

can you please help as soon as possible?

if possible can u please send a small package or query for this?

thanks & Regards,

Hariax

|||Try creating a dummy column (like a simple sequential row number) in each table to join on and use the Merge Join.|||

Hi,

Please help me, I am getting the 'DTS_E_UNABLETORETRIEVEMETADATA' error while I am performing bellow mentioned steps.

1. Created 'Execute Sql Task'

2. In the editor of this task, General Page ->Sql statement, I wrote create table query.

3. I tried to execute the package, and got following error.


ADDITIONAL INFORMATION:

Error at Data Flow Task 1 [SQL Server Destination [376]]: The metadata for "[dbo].[temptable]" cannot be retrieved. Make sure the object name is correct and the object exists.

Error at Data Flow Task 1 [DTS.Pipeline]: "component "SQL Server Destination" (376)" failed validation and returned validation status "VS_ISBROKEN".

Error at Data Flow Task 1 [DTS.Pipeline]: One or more component failed validation.

Error at Data Flow Task 1: There were errors during task validation.

(Microsoft.DataTransformationServices.VsIntegration)


BUTTONS:

OK

If anybody has the solution of this then please let me know.

same query is running successfully from sql server management studio.

Thanks & Regards,

Hariax J. Thoria

|||If you are creating the table for the destination in the same package, make sure the DelayValidation property on the SQL Server Destination is set to TRUE.

Sunday, February 19, 2012

Can I setup Log Shipping and nightly backups?

I have backups that have been running nightly without issue for quite some
time. To minimize data loss in the event of a major server disaster I setup
log shipping. I want to know if I can continue to perform the nightly
backups or if this will interfere with the log file shipping. The nightly
backups are useful for lots of things we do but aren't entirely necessary.As long as these "nightly backups" aren't log backups then you should be fine. A database backup do
not empty the log, i.e..e., it do not affect your log backup chain sequence in any way.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Bishop" <nospam@.nospam.com> wrote in message news:uyk7Nf8qIHA.1952@.TK2MSFTNGP05.phx.gbl...
>I have backups that have been running nightly without issue for quite some time. To minimize data
>loss in the event of a major server disaster I setup log shipping. I want to know if I can
>continue to perform the nightly backups or if this will interfere with the log file shipping. The
>nightly backups are useful for lots of things we do but aren't entirely necessary.
>|||Thank You!
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:E46D838C-19D6-4FAB-A7F1-53B91CE3B005@.microsoft.com...
> As long as these "nightly backups" aren't log backups then you should be
> fine. A database backup do not empty the log, i.e..e., it do not affect
> your log backup chain sequence in any way.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Bishop" <nospam@.nospam.com> wrote in message
> news:uyk7Nf8qIHA.1952@.TK2MSFTNGP05.phx.gbl...
>>I have backups that have been running nightly without issue for quite some
>>time. To minimize data loss in the event of a major server disaster I
>>setup log shipping. I want to know if I can continue to perform the
>>nightly backups or if this will interfere with the log file shipping. The
>>nightly backups are useful for lots of things we do but aren't entirely
>>necessary.
>

Can I set Excel connection manager's data source as a variable?

I do not know the Excel file name to load in design time.

Would like to pass the value to a variable in the package in run time?

How to do this?

Thanks,

Guangming

Property Expressions is the feature you want. You can assign and expression to most properties, including the DataSource property of a connection. The expression would just be the name of your variable, e.g.

@.[User:MyVar]

Some UIs expose expressions as a separate tab, or just expand expressions from the normal properties grid.

|||I set ExcelFilePath to a variable:

varExcelFileFullPath.

I set an initial value ( \\test\testShare\aaab.xls ) to it when designing the package. It works

Later I run it inside SQL server as below. It failed.

exec xp_cmdshell 'dtexec /SQL "\NE_LoadExcel_Test_direct" /SERVER ** /USER ***** /PASSWORD ****

/CONNECTION "DataSource-Excel";"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\test\testshare\aaab2.xls;Extended Properties=""EXCEL 8.0;HDR=YES"";"

/CONNECTION "Test.NGAEarth";"Data Source=Test;Initial Catalog=NGAEarth;Provider=SQLNCLI.1;Integrated Security=SSPI;Auto Translate=False;"

/MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING EW /LOGGER "{6AA833A1-E4B2-4431-831B-DE695049DC61}";"Test.NGAEarth"

/set "\Package.Variables[User::varPreSQLAction].Properties[Value]";"delete from Features where type = ''aaab''"

/set "\Package.Variables[User::varExcelWorkbookName].Properties[Value]";"Sheet1$"

/set "\Package.Variables[User::varDestinationTableName].Properties[Value]";"Features"

/set "\Package.Variables[User::varExcelFileFullPath].Properties[Value]";"\\test\testShare\aaab2.xls"

'

Actually, I tried to change other variables. E.g., I changed the file name from aaab2.xls to aaab.xls, Excel worksheet name from Sheet1$ to Sheet2$.

It seems the package never get the parameters I set as above. It always gets the values I set in design time. The errors I got are:

Error: 2006-02-01 15:54:23.58

Code: 0xC0202009

Source: Extract AdHoc Data from Excel Excel Source [649]

Description: An OLE DB error has occurred. Error code: 0x80040E37.

End Error

Error: 2006-02-01 15:54:23.58

Code: 0xC02020E8

Source: Extract AdHoc Data from Excel Excel Source [649]

Description: Opening a rowset for "Sheet1$" failed. Check that the object exists in the database.

End Error

Error: 2006-02-01 15:54:23.58

Code: 0xC004706B

Source: Extract AdHoc Data from Excel DTS.Pipeline

Description: "component "Excel Source" (649)" failed validation and returned validation status "VS_ISBROKEN".

End Error

|||

Finally I found the problem:

The way to put the command string is not right after dtexec /SQL.

If there is not ENTER and all commands in one line (as it is a dos command), everything is OK!

Is it COOL!?

Guangming

Can I schedule SQL extract using SQL Server Express

I have downloaded almost all file related to SQL Server 2005 Express edition. Before I wast time finding out that what I want to do it not possible afteral.

What I want to is to connect to an SQL Server and extract data from that into my local db (Gues that will be my local SQL server db?) and than pass the data onto MS Access.

My question is: can I automate this procedure I.e. schedule to download and export to Access using the Express Edition.

Appreciate any feedback

Thanks,
BogdanHi Bogdan,
SQL Express does not include the SQL Agent, so it does not support any kind of scheduling for anything. What you can do is create a script that does what you and can be run via SQLCmd. You can then use the Windows Task Scheduler to schedule SQLCmd to run and use the script you created.
This same procedure can be used for any scheduled task you wish to perform when using SQL Express.
Regards,

Mike|||

yes, thanks and this is the code for the batch-file

Rem1 connect SLQ-Server (ServerName = SQLExpress)
Rem2 within command line 'use' is used for selected dB, however directly from prompt it is -d. My db name is 'Bogdan'
Rem3 Select Query to execute (from file) within command line ':r', to activate cmd use -q (or -Q to quit to connection).
Rem4 Execute 'Go' not necessary

sqlcmd -S .\SQLExpress -d Bogdan -Q ":r C:\SQL_Server_Queries\SQL_CreateQuery.sql"
Bogdan

Thursday, February 16, 2012

can i restore sql 2000 from veritas under sql 2005?

While ago my SBS 2003 which had SQL 2000 crashed so I had to rebuild everything and this time I used SBS 2003 R2. My SQL 2000 databases were backed up under Veritas 10 and now I'm trying to restore them under SQL 2005. Is this possible?

Please advice.

Thanks,

Mike

Try asking the SQL Server Disaster Recovery forum.

http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=744&SiteID=1

can i restore sql 2000 from veritas under sql 2005?

While ago my SBS 2003 which had SQL 2000 crashed so I had to rebuild everything and this time I used SBS 2003 R2. My SQL 2000 databases were backed up under Veritas 10 and now I'm trying to restore them under SQL 2005. Is this possible?

Please advice.

Thanks,

Mike

If you mean that you are using Veritas 10 to restore backups taken from a SQL 2000 database to a SQL 2005 instance, then yes this will work just fine.

If you are trying to use the native SQL utilities to restore a backup taken using Veritas, then this will not work.

|||

This is great. Thx for the quick reply. Since on my prior server I had databases on drive E and now they are all on drive C, is this going to be any problem?

|||RESTORE WITH MOVE is your friend. You can look up details on Books Online.

Tuesday, February 14, 2012

can i remove visual studio after sql 2005 install?

it's been a while since i installed sql2005, but doesn't visual studio get installed at the same time? all the servers that i installed sql2005 on have visual studio on them too. the sysadmins think having VS on the servers is a security risk and want to remove it. if we remove VS from the servers, will that impact SQL Server 2005?

If you have the SQL Server 2005 tools installed you can not remove Visual Studio from the server. The SQL Server 2005 tools are based on the Visual Studio IDE making it required to have the tools.

Can I read from multiple table at run time

Hi,

My Issue is that, I have to create a package which should read from multiple table from a RDBMS Source.

Right now I have different Source adapters for each table. I want to reduce the number of source adapters.

Can I

1) Create a connection manager and set the connection string from a variable. Set the variable from a script task. Put both of these into for loop container (no of tables).

Issues

a) Most of the table has same schema, but few have different, so all tables which has same schema will work.

For different schema anyway I have to create different data source.

b) Will Destination column mapping work.

If any one has already worked on it let me know.

Thanks

Dharmbir

Hi Dharmbir,

I think you are on the right track and I have succeeded with a similar requirement in the past.

Your variable SQL statement will need to return a consistent list of columns back to SSIS. Eg if your first iteration through the loop ran:

select col_a, col_b from table_1

... but your second iteration was just

select col_a from table_2

... this would fail. To avoid this, rejig your second sql statement along these lines:

select col_a, 'any string' as col_b from table_2

This technique will trick SSIS into thinking it is receiving the same answer set each time. Beware of datatype mismatches.

Good luck.

Mike

Can I read from multiple table at run time

Hi,

My Issue is that, I have to create a package which should read from multiple table from a RDBMS Source.

Right now I have different Source adapters for each table. I want to reduce the number of source adapters.

Can I

1) Create a connection manager and set the connection string from a variable. Set the variable from a script task. Put both of these into for loop container (no of tables).

Issues

a) Most of the table has same schema, but few have different, so all tables which has same schema will work.

For different schema anyway I have to create different data source.

b) Will Destination column mapping work.

If any one has already worked on it let me know.

Thanks

Dharmbir

Hi Dharmbir,

I think you are on the right track and I have succeeded with a similar requirement in the past.

Your variable SQL statement will need to return a consistent list of columns back to SSIS. Eg if your first iteration through the loop ran:

select col_a, col_b from table_1

... but your second iteration was just

select col_a from table_2

... this would fail. To avoid this, rejig your second sql statement along these lines:

select col_a, 'any string' as col_b from table_2

This technique will trick SSIS into thinking it is receiving the same answer set each time. Beware of datatype mismatches.

Good luck.

Mike

Sunday, February 12, 2012

Can I place Lock for some time in a Transaction

Dear all,

I have a transaction performing some oeprations. Can I Lock (UPDLOCK) some table for some time in transaction and then release the lock. Basically if i place the lock on table it remains there for whole transaction duration. What to do if I want to release it explicitly in transaction?

Thanks in advance,
AvneeshI do not understand,
can you please be more specific?|||Lets take an example to be more specific about problem
--------------------
Begin tran
Lock mytab with UPDLOCK
...Do Some operation...
Release lock on mytab
...Do some operation....
Commit tran
--------------------

Is this possible?

If you have some idea then most welcome.

Thanks in advance,
Avneesh

Friday, February 10, 2012

Can I keep the border of an image visible all the time?

Here is my problem. I have a series of checkmark images in a table that have
the visibility toggled with an expression. That works fine, however, the
border around the image is not displayed if the image is not. I need to have
a "grid" appearance because the majority of times these images will not be
shown, but I need to to indicate its placement.
Any suggestions would be appreciated.
Thank you,
BobInstead of placing the image directly on a table column, First place a
rectangle in the table column, and then the image in the rectangle, and set
the properties on the rectangle to show its borders, and with your toggle,
since your are only toggling the visiblity of the image, the rectangle should
always be visible.
"Bob" wrote:
> Here is my problem. I have a series of checkmark images in a table that have
> the visibility toggled with an expression. That works fine, however, the
> border around the image is not displayed if the image is not. I need to have
> a "grid" appearance because the majority of times these images will not be
> shown, but I need to to indicate its placement.
> Any suggestions would be appreciated.
> Thank you,
> Bob